ios-app-extension

Incorrect Keyboard Extension height after rotation

狂风中的少年 提交于 2019-12-23 04:54:22
问题 I have iOS custom keyboard that changes height when it rotates. My code works fine 95% times... But in some cases (see below) the height is not changed when rotated to landscape - portrait height is kept. Issue can be reproduced with this (almost) minimal code - create new Keyboard Extension target and copy this code to KeyboardViewController : class KeyboardViewController: UIInputViewController { private var orangeView = UIView() private var heightConstraint: NSLayoutConstraint! @IBOutlet

Why Photos app is NOT showing in the Document Provider extensions on the device?

这一生的挚爱 提交于 2019-12-22 10:26:35
问题 I'm working in app to pick photo, I have used UIDocumentMenuViewController to display list of extensions for document provider. This list shows Dropbox, iCloud, GoogleDrive but not the native Photos app, why? Sample of my code: UIDocumentMenuViewController *menuVC = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:@[@"public.image"] inMode:UIDocumentPickerModeImport]; 回答1: I'm not sure if there is another way natively to do this, but I came up with a solution to add a custom option

iOS 8 custom keyboard extension UIKeyboardType

℡╲_俬逩灬. 提交于 2019-12-22 08:22:52
问题 I'm building a iOS 8 custom keyboard and I'd like the change the layout of the keyboard based on the UIKeyboardType, however, reading the keyboard type in UIInputViewController is always 0. Any suggestions? Thanks in advance! - (void)viewDidLoad { [super viewDidLoad]; NSLog(@"TextInputMode: %ld", self.textDocumentProxy.keyboardType); } 回答1: Get the keyboardType in InputView Delegate Methods Instead of ViewDidLoad . Because you can't get the keyboardType until The keyboard is fully presented

Where does a host app handle NSExtensionContext#completeRequest?

柔情痞子 提交于 2019-12-22 05:43:12
问题 When you call completeRequest(returningItems:completionHandler:) from an extension, where does this get handled by the host app? 回答1: Disclaimer: did not checked my assumptions , but may be this helps. 1) documentation states: Call the completeRequestReturningItems:completionHandler: method, which signals the host app that its original request is complete 2) here - Figure 2-3 shows that "Host"-app - is app that starts some work with extension. For example, "Host" may be the app in which user

Launch app from INExtension in SiriKit

你离开我真会死。 提交于 2019-12-21 17:26:37
问题 I want to use SiriKit to start a workout. Starting the workout requires opening the main app from the app extension. The boilerplate that Apple provides for the INStartWorkoutIntentHandling handler is func handle(startWorkout startWorkoutIntent: INStartWorkoutIntent, completion: (INStartWorkoutIntentResponse) -> Void) { let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartWorkoutIntent)) let response = INStartWorkoutIntentResponse(code: .success, userActivity: userActivity

Are new characters possible with a custom keyboard in iOS 8?

跟風遠走 提交于 2019-12-21 16:51:47
问题 In iOS 8, Apple has given developers the ability to create custom keyboards. In the documentation, Apple states that you should create a new keyboard if you want to support a language that iOS does not currently support. Therefore, if you are able to support new languages, are you able to create a keyboard that contains new emoji characters? I would assume that by Apple stating that you can support a new language, they would expect there to be custom characters involved. If including custom

iOS 8 custom keyboard crash when debugging

限于喜欢 提交于 2019-12-21 12:27:08
问题 Issue Most times, when I try to debug my custom keyboard extension, I receive the following error and then the keyboard disappears (presumably crashes, so the system removes it from screen and replaces it with the standard keyboard) plugin com.db.Trype.TrypeKeyboard interrupted (Note: Trype is the name of my keyboard.) Process I am debugging the keyboard the following way: I have the keyboard extension as a target. I've modified the TrypeKeyboard scheme to run my app executable on launch. The

UIBarButtonItems shift position when UINavigationController is presented modally

时光总嘲笑我的痴心妄想 提交于 2019-12-21 07:55:15
问题 I'm presenting a UINavigationController modally, from within an iOS app extension: UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc]; nav.modalPresentationStyle = UIModalPresentationFormSheet; nav.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentViewController:nav animated:YES completion:nil]; When the navigation controller appears, its root view controller's UIBarButtonItems jump position: I'm creating and adding the buttons

Can't use keyboard extension in Spotlight after 8.3

女生的网名这么多〃 提交于 2019-12-21 02:45:21
问题 Since I updated my keyboard extension project to Swift 1.2 and my devices to iOS 8.3, I am no longer able to use my extension in Spotlight search. My extension is not in the list if I press and hold the "globe" key, and if it's the active keyboard when entering Spotlight the system keyboard is used instead. Other 3'rd party keyboards seems to work in Spotlight - and my own keyboard works in any other app I've tried it in (Notes, Mailbox, Safari etc). It used to work in Spotlight in all iOS 8

Core Data with WatchKit and iOS App

ⅰ亾dé卋堺 提交于 2019-12-20 14:31:48
问题 This question has already been asked, but has received no answers. My iOS app and my WatchKit extension share an App Group in which a Core Data store persists. The Core Data model (simplified) is a Person object that has an attribute for Age. Both the app and extension can change the age at will. If the value for a person changes on the watch, the app does not reflect it unless I close and rerun the app. Same going the opposite direction. If I try to change the age on the watch to 20, and