ios8-extension

iOS8 Custom Keyboard: Detect which app is using keyboard

早过忘川 提交于 2019-12-14 02:36:39
问题 I made a custom iOS8 keyboard but I need to detect which app is using the keyboard. f.e. I need to know if its Whatsapp or just normal Messages to handle a different logic. I haven't found any related question on this. And frankly I don't think this is possible, or even allowed by Apple. The closest other Q/A I could find was this. 来源: https://stackoverflow.com/questions/27125299/ios8-custom-keyboard-detect-which-app-is-using-keyboard

How do I properly pass a NSMutableArray to NSUserDefaults with a custom data model?

浪尽此生 提交于 2019-12-13 07:48:55
问题 Let me preface that my code has been obscured a little on purpose. I know the name won't be good. I am trying to add a widget to my app with the new iOS 8 functionality. I am using this link as a tutorial Now, so far I have this in my ViewController when my submit button is called in my app. By this time I have all my data in that array to be passed on. //Passes the array of times to the shared group to be called by the notification center widget. NSUserDefaults *sharedDefaults = [

iOS8 Custom Keyboard Settings.bundle does not show up

吃可爱长大的小学妹 提交于 2019-12-13 00:43:54
问题 I added a Settings.bundle to the keyboard target. But when I add the keyboard in the settings, the Items from the Settings.bundle doesn't show up. I had it working once. But this was in Beta 4. -- best regards 回答1: In iOS8.0.2, the settings appear in the General->Keyboard section of the iOS settings app. However, a bug in iOS prevents from reading these values. The solution would be to create a settings screen in your containing app, and read/write the settings to the Shared Container, using

iOS 8 share extension show shared image issue

ⅰ亾dé卋堺 提交于 2019-12-11 10:41:22
问题 I have a problem with displaying image in my UIImageView. So this is how I get images in ShareViewController: - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; for (NSItemProvider* itemProvider in ((NSExtensionItem*)self.extensionContext.inputItems[0]).attachments ) { if([itemProvider hasItemConformingToTypeIdentifier:@"public.image"]) { ++counter; [itemProvider loadItemForTypeIdentifier:@"public.image" options:nil completionHandler: ^(id<NSSecureCoding> item, NSError

Using UITextField inside a keyboard app extension

此生再无相见时 提交于 2019-12-10 20:07:52
问题 I added textfield (keyboardTextField) on top of my custom keyboard. I can select it and enter some text (using my custom keyboard). But it's impossible for me to select the input view of the main app back. This line of code [keyboardTextField resignFirstResponder]; doesn't work correctly. If someone have any workaround or any ideas, I need your help. 回答1: I fixed this by adding a button which switches the user input from the UILabel (in my case) to the (normal - iOS) UITextField in Messages f

Using categories in iOS 8 frameworks

混江龙づ霸主 提交于 2019-12-10 11:15:42
问题 I am trying to share some code between an app and an extension, using a framework. Mostly this works, but I have several categories that do not seem to load correctly in the extension. For example, I have a category on NSString to reverse the target string, but when I try to use that selector within the extension my code traps with an "unrecognized selector" exception. I tried adding the "-all_load" linker flag, first to just the framework, and then to the extension, to try and force load all

iOS 8 Today widget alignment issue

耗尽温柔 提交于 2019-12-10 02:24:53
问题 Here is my storyboard I'm using autolayout, and NOT using size classes. When I ran it on iPhone 5s, it works fine.(both portrait and landscape) But when I ran it on iPhone 6 plus (portrait), it's not aligning properly. on iPhone 6 plus (landscape), it's worse. I know I can use -widgetMarginInsetsForProposedMarginInsets: to set the margin, but in that case I will need to customize the margin for every device. That would be horrible :( So is there a way to align the subview to the title less

iOS 8 Share Extension not working on device

橙三吉。 提交于 2019-12-08 20:16:44
问题 I have creat a new target Share Extension in xcode , then I run it on my device. I don't know why when I run my Share Extension on my devices (iPhone 5c, iPhone 5s, iPhone 6) the won't show. Pls help me! Any suggestions on how to fix this would be greatly appreciated. I have creat New/Target/ Share Extension I run it with app Notes on my device and then my extension not show 回答1: I had the same issue and I solved it with changing the "Deployment Target" of the extension to a value below the

iOS share extension dismiss keyboard

末鹿安然 提交于 2019-12-08 04:13:20
问题 I'm implementing a share extension for my app, so far everything is going good except I can't seem to dismiss the keyboard that automatically opens using the default layout/storyboard. I'm keeping the default design/layout (SLComposeServiceViewController) which includes the preview image and UITextview, the UITextview automatically gets in focus which opens the keyboard. Normally this is fine, but if you're not logged in my app I display an UIAlertController saying you need to login to share.

How to add the project prefix file to photo extension target?

倾然丶 夕夏残阳落幕 提交于 2019-12-07 15:55:41
问题 The main target typically contains a -Prefix.pch file where all the convenience imports are defined. E.g when using opencv with c++ there is #ifdef __cplusplus #import <opencv2/opencv.hpp> #endif #ifdef __OBJC__ #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #endif Unfortunately when using the new Photo Extension target in iOS 8, this file gets ignored making it a hassle to add all the files required in the extension target. Is there a way to make this Prefix file work also for the