ios-app-extension

iOS extensions with multiple targets

戏子无情 提交于 2019-12-03 18:44:04
问题 In iOS 8, when we create a new extension, we have to decide which target it is attached to. The extension will have the same bundle ID's prefix as the target. Is there any way to change the target afterward? If my project contains 2 (or more) targets (for example one for debug/simulator, one for production/device), what's the best way to work with extensions? Do I need to create another extension and duplicate the code (very bothersome to keep the same code for both targets)? 回答1: To share

ios 8 how to debug Custom Keyboard?

帅比萌擦擦* 提交于 2019-12-03 17:15:24
问题 I have successfully created a Custom Keyboard with Swift on iOS 8 simulator. Although it worked well, but I could not debug it. It is a contained target and was installed through Settings->General. Placing a bookmark in XCode not work. 回答1: I am able to debug a custom keyboard using the simulator via Xcode 6. Select the keyboard (and not it's container) as the scheme. "Run" and then select on of the apps on your simulator to debug the extension with. 回答2: It seems as of now apple didn't get

Get “Terminated due to Memory error” for ios 8 custom keyboard Extension

蹲街弑〆低调 提交于 2019-12-03 16:32:54
I am developing a ios 8 custom keyboard Extension. It run like a charm start. But I always get "Receive Memory Warning" in Xcode. So my custom keyboard extension will suddenly terminate sometimes. But I run the custom keyboard in its host app. There don't have any problem. Don't get "Receive Memory Warning" in Xcode. Don't terminate. Anybody can help me? If app have any limit size for a Extension use? Apple mentions in their App Extension Programming Guide that memory limits for app extensions are significantly lower than limits imposed on foreground apps. Additionally some types of extensions

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

霸气de小男生 提交于 2019-12-03 16:15:30
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 action:@selector(btnClicked:) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:aBtn

Making share extension with custom layout

故事扮演 提交于 2019-12-03 15:22:40
问题 I want to develop ios share extention with custom callout. In apple documents To provide a custom compose view instead of the standard one, deselect “Use standard social compose interface” in the Xcode target-adding pane. When this checkbox is deselected, the default SharingViewController class is based on NSViewController or UIViewController, depending on the platform you chose. but I can't find the check box. Can anyone show me how to disable it and is there any good tutorials for share

Too often “Unable to load” in Today Widget Extension

筅森魡賤 提交于 2019-12-03 14:06:56
问题 I'm making a Today widget for my app. My widget contains a UITableView with 10 cells. (Each cell's height is 50pt.) Function is simple. If I touch up a button on cell, reload DB from sqlite and show them on cells. It works very well on simulator and iPhone 4s, 5, 5s, 6 except only iPhone6+. I did remove widget and add again over 10 times, but It's not helpful for me. I did check memory and zombie. but that is stabilized under ~10M and no leaks. How can I solve my problem? 回答1: Okay, guys, You

iOS 8 beta 5 Today view extension (widget) stuck at Waiting to Attach

◇◆丶佛笑我妖孽 提交于 2019-12-03 12:44:24
I want to debug a today view extension (widget) in iOS 8, so I select the widget under "Scheme" in Xcode, and select my iPhone as the device and hit run. It says "running today-view on iPhone" and on the side bar on the left it says "Waiting to attach". It gets tuck at the "waiting to attach" phase forever and never shows me any debugging info on my iPhone. However this works fine if I select the simulator as my device. After a few seconds of "waiting to attach" in the simulator, the widget comes alive and debugging info is displayed. Has anybody come across why an extension won't show

iOS Extension - Fatal Exception: com.firebase.core Default app has already been configured

瘦欲@ 提交于 2019-12-03 12:38:48
iOS Extension - Fatal Exception: com.firebase.core Default app has already been configured. I run the Fir.configure() in the viewDidLoad() method and some events pass and get through to Firebase. Can someone help me figure this out.. Google is not friendly enough. PS: Yes I created a second .plist, and a second app in Firebase Console. PPS: Yes I selected the correct target for each GoogleServices plist I'm seeking the solution.. I don't know if you're still looking for a solution but I had the same issue, using firebase with extension. I ended up doing this : if(FIRApp.defaultApp() == nil){

How to launch a parent iOS App from its App Extension

北慕城南 提交于 2019-12-03 12:14:48
Does any one know how to launch the parent app from the app extension's view controller? I just want to launch the main app from its app extension. In the WWDC session Creating Extensions for iOS and OS X, Part 1 around the 22 minute mark the say to use the openURL:completionHandler: method from the UIViewController's extensionContext to open a custom URL scheme [self.extensionContext openURL:[NSURL URLWithString:@"your-app-custom-url-scheme://your-internal-url"] completionHandler:nil]; arcticmatt I asked a similar question here: Communicating with/opening Containing app from Share extension .

How to make custom keyboard extension become first responder again

这一生的挚爱 提交于 2019-12-03 11:32:49
I am making a custom keyboard extension, and in this keyboard, i have another uitextfield as a search field, so when I type on the custom keyboard, I am not sending the text to the safari's textfield or some chat app's textfield, I am sending the text to the uitextfield search field in the custom keyboard, so I can do some search and then when the search results come back, i am sending the search result to the safari's textfield or some chat app's textfield. So there is a first responder issue here. When I set the search text field as first responder, and trying to set the first responder back