ios-app-extension

How to add images as text attachment in Swift using nsattributedstring

烈酒焚心 提交于 2019-12-05 20:19:53
问题 I'm trying to build a custom keyboard for iOS using images which I've put in as buttons. When I press a button, the image linked to the button is put into an attributed string which is loaded into an UiTextView inside the custom keyboard view. That is working. The problem is that when I append a new image to the attributed string both the old and new images in the string are changing to the image I currently pressed on. I can't understand why the old images in the string are changing. Any

Enabling In-App purchase for custom keyboard iOS8

江枫思渺然 提交于 2019-12-05 18:57:12
I am building a custom keyboard for iOS and I want to know how can I enable in-app purchases for that? The documentation states that I can enable in-app purchases through the containing app, but I am not sure what that means (technically)? Has anyone built iPhone extensions with in-app purchasing that could give me some guidance? An extension is bundled with an app. When the user downloads the containing app, the extensions are available for the user to add to their keyboard list, today view, etc. If you want to charge for a keyboard, currently the only way you can do that is by charging for

iOS 8 custom keyboard extension UIKeyboardType

痞子三分冷 提交于 2019-12-05 18:17:39
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); } Get the keyboardType in InputView Delegate Methods Instead of ViewDidLoad . Because you can't get the keyboardType until The keyboard is fully presented and the input object is activated . - (void)textWillChange:(id<UITextInput>)textInput { NSLog(@"TextInputMode

What is the difference between Apple's iMessage template or adding an extension to an existing app?

℡╲_俬逩灬. 提交于 2019-12-05 18:02:34
I have noticed this different regarding the creation of messages apps for iOS 10. If you create a new project using iMessage Application choice on the new project's template, Xcode will create two targets, an app and an extension. but the project is not able to run. (see by this second picture that there is only one choice on the target selector at the bottom and that target is the extension). When you create a normal app, like a single view app and then add a target that is an app extension of the type iMessage, you will have two targets there, the app and the extension. My questions are:

Extension in iOS8 - Terminating since there is no system app

白昼怎懂夜的黑 提交于 2019-12-05 15:42:00
问题 Trying to run my iOS widget that is a "Today" extension. Every time i try to add it to the notification center, i keep getting the message "Terminating since there is no System App Any ideas on how to fix this? Im trying to make an extension that has a tableview in it 回答1: In your project settings look for a setting that says "Launch Screen File" and remove anything so it is blank then clean and build. 回答2: I was having the same problem - Are you using swift? Commenting out the "init(nibName

Exception when fetching parse.com user data in iOS 8 Today Extension

会有一股神秘感。 提交于 2019-12-05 13:07:06
I am trying to fetch a list of PFObjects of a PFUser to display in the iOS 8 Today Widget. Following this blog post by Parse, I've enabled the same App Groups and Keychain Sharing in both my main app and extension in Xcode. I've also enabled the following in the AppDelegate of my main app and the viewDidLoad of my Today Extension: [Parse enableLocalDatastore]; [Parse enableDataSharingWithApplicationGroupIdentifier:@"group.com.me.myapp" containingApplication:@"com.me.myapp"]; [Parse setApplicationId:@"myAppId" clientKey:@"myClientId"]; In widgetPerformUpdateWithCompletionHandler , I constructed

Where does a host app handle NSExtensionContext#completeRequest?

假如想象 提交于 2019-12-05 07:35:29
When you call completeRequest(returningItems:completionHandler:) from an extension, where does this get handled by the host app? 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 touches "Share"-button. Then this "Host"-app sends some data (which user wants to share) to extension. 3)

openURL doesn't work in Share extension

左心房为你撑大大i 提交于 2019-12-05 05:59:45
Trying to use [self.extensionContext openURL:... completionHandler:...]; in an iOS 8 Share extension to open the containing app never opens the app, and always calls the completion handler with success = NO. Here is the same issue with Action extensions, but I think it is more reasonable for Share extensions to be able to open the containing app than Action extensions. The point of a Share extension is to upload a potentially large piece of data, and the only way to do that without opening the app is through NSURLSession , which can only do HTTP(S) uploads. But an app may wish to share content

How can I add button icons to custom keyboard iOS 8?

自作多情 提交于 2019-12-05 02:00:10
问题 I am creating custom keyboard for ios 8. Creating keyboard buttons like this UIButton *aBtn = [ UIButton buttonWithType:UIButtonTypeCustom ]; [aBtn setFrame:CGRectMake(x, 30, btnWidth, btnHeight)]; [aBtn setImage:[UIImage imageNamed:@"A"] forState:UIControlStateNormal]; [aBtn setTitle:@"A" forState:UIControlStateNormal]; [aBtn setTitleColor:[ UIColor blackColor] forState:UIControlStateNormal]; [aBtn setTitleColor:[ UIColor whiteColor] forState:UIControlStateHighlighted]; [aBtn addTarget:self

How to display an image from Asset Catalog in Today Extension?

南楼画角 提交于 2019-12-04 22:59:47
I'm working on a Today Extension for iOS8. My App Group is set up correctly and I can successfully use NSUserDefaults to send simple bits of data to my extension (using this tutorial ). In the storyboard for my extension, I've placed an image onto the storyboard and set the image to be an asset I have in my Asset Catalog. Even though it appears in Interface Builder, when I run the app on a device and simulator the image doesn't display. What am I missing? Make sure the asset catalog is included in the target for your Today extension. 来源: https://stackoverflow.com/questions/25963059/how-to