ios-keyboard-extension

preferredScreenEdgesDeferringSystemGestures in keyboard extension doesnt work

孤者浪人 提交于 2020-04-18 05:46:05
问题 I trying to make keyboard extension on SwiftUI . My keyboard uses gestures a lot. But gestures up from keys located near the screen bottom are to be recognized as a system gesture. As it was said here I tried to use preferredScreenEdgesDeferringSystemGestures parameter of UIInputViewController but it does not help. here is my code: class MyController<Content: View>: UIHostingController<Content>{ open override var preferredScreenEdgesDeferringSystemGestures: UIRectEdge{ return [.bottom] } }

Keyboard Extension Crash on Device

。_饼干妹妹 提交于 2020-01-02 23:26:23
问题 maybe you can help me? I've got a keyboard extension to work before on a device, but in my new project, it doesn't work... On the simulator, it works fine. I add the keyboard in Settings, and allow full access on both simulator and device. On the device, when I switch from any other keyboard to the new keyboard, it pauses for a bit, like it is loading, and a Xcode error pops up: Lost connection to "Kjell Connelly’s iPhone". Restore the connection to "Kjell Connelly’s iPhone" and run "com

Run Xcode Instruments on device with a ios keyboard extension

匆匆过客 提交于 2019-12-21 21:27:23
问题 I'm developing a custom keyboard but it's very slow and sometimes it's crashing. Because I'm not sure where it comes from, I'd like to Time Profiler with Instruments . But when I select MyIphone > Keyboard Extension (target), I get: Target failed to run or Waiting for x.x.x.Keyboard Please take appropriate action to initiate the launch of 'x.x.x.Keyboard.' Is it even possible to use Instruments with an app extension? If yes, how should I proceed? 回答1: I can't use Instruments to analyze my

How to test if “Allow Full Access” permission is granted from containing app?

孤街醉人 提交于 2019-12-21 04:59:04
问题 I'm working on a keyboard extension project. At some points of the application code I need to test if the user have granted the "Allow Full Access" permission for the keyboard extension. The deal is that I need to do those tests from the application side, and based on this let the user to access keyboard settings or alert him in case the permission wasn't granted. The problem is that the methods that provided here like: func isOpenAccessGranted() -> Bool { return UIPasteboard

How to detect from iOS keyboard extension that a textfield is cleared via actions like hitting “Send” in iMessage?

爱⌒轻易说出口 提交于 2019-12-20 12:29:09
问题 In my iOS keyboard app, I currently have a text suggestions bar much like the default iOS 8 Keyboard's suggestion bar. I would like to clear all text on the suggestion bar whenever the user does something that clears the text field (for example, when someone hits " Send " on iMessage or Whatsapp,). As hitting "Send" is not a keystroke , I was wondering if there is way to detect from the keyboard when a textfield is cleared. I have tried detecting empty text "" or new line "\n" , but so far

Prevent custom keyboard in textfield

六月ゝ 毕业季﹏ 提交于 2019-12-18 19:04:29
问题 I was experimenting with how a custom keyboard affects my app. I installed Swype on my iPhone 6. I find that in some of my views where I have custom inputView property set on a text field, the Swype keyboard is overriding and presenting instead of my picker. This completely breaks my UI and cannot be allowed. Is there a way to explicitly tell iOS 8 only to use the inputView I have set? Is this a bug, perhaps? It is not at all expected behavior to allow a third party to override my input spec?

UICollectionview in a keyboard extension

[亡魂溺海] 提交于 2019-12-12 02:38:38
问题 I have tried to get a UICollectionview into my keyboard extension, which i made in swift. But i can´t get it to work. The keyboard just crashes on launch. Anyone know how to fix this? Or is it even possible to use a UICollectionview in a keyboard extension. class KeyboardViewController: UIInputViewController, UICollectionViewDelegateFlowLayout, UICollectionViewDataSource{ @IBOutlet var nextKeyboardButton: UIButton! @IBOutlet var testButton: UIButton! var collectionView: UICollectionView!

Communicate with Custom Keyboard extension with Host App not working in device but works in simulator

淺唱寂寞╮ 提交于 2019-12-09 20:08:34
问题 I am working with custom keyboard extension. that almost done but i just facing issue with device when i communicate data with extension and my host app that not woking in device but same thing this working in simulator. My code is following: HostApp View controller: - (void)viewDidLoad { _defaultvalue = [[NSUserDefaults alloc] initWithSuiteName:@"group.myapp.myappname.targetKeyboard"]; [_defaultvalue setBool:YES forKey:@"Layout"]; [_defaultvalue synchronize]; [super viewDidLoad]; // Do any

Crashlytics doesn't work in iOS keyboard extension

这一生的挚爱 提交于 2019-12-08 06:38:18
问题 I'm using the latest version of the Fabric and Fabric/Crashlytics cocoapods (so, version 3.0.8 according to the debugger output) to integrate Crashlytics into an iOS keyboard extension. Recently, it simply stopped reporting crashes from the keyboard extension. I've checked both my code which initializes Crashlytics and the Crashlytics script build phase of my project, both are executed (and the build phase is in my keyboard extension's target). It's hard to tell if this is related, but when I

How to hide Toolbar in IQKeyboardManager iOS Swift 3

不羁岁月 提交于 2019-12-07 04:49:42
问题 I'm using the IQKeyboardManger library to scroll text fields when started typing using the keyboard, but I don't want to display the default toolbar from their library. Below is the code I've used. override func viewDidLoad() { super.viewDidLoad() self.chatTextField.inputAccessoryView = [[UIView alloc] init]; //This will remove toolbar which have done button. self.chatTextField.keyboardDistanceFromTextField = 8; //This will modify default distance between textField and keyboard. For exact