ios-app-extension

Installation Failed “Invalid argument” when trying to run Today application extension

雨燕双飞 提交于 2019-11-26 19:42:30
问题 I added a vanilla Today Application Extension and run with the new scheme created by XCode. After it finishes building ("Build Succeeded" pops up), it failed straight away with this error: Installation Failed Invalid argument I've been trying to find answers for 6 hours now, no luck so far. Please help! 回答1: Check if the Bundle Identifier isn't empty in the Info.plist 回答2: Try this: Quit Xcode Clean out ~/Library/Developer/Xcode/DerivedData manually rm -rf "$(getconf DARWIN_USER_CACHE_DIR)

Use Cocoapods with an App Extension

杀马特。学长 韩版系。学妹 提交于 2019-11-26 17:54:27
问题 I'm trying to build a photo App Extension in Xcode 6 Beta-6 that uses cocoapods libraries. The bridging header that Xcode creates for the photo extension can't see anything from cocoapods. For example: #import <GPUImage/GPUImage.h> results in the error "GPUImage/GPUImage.h" file not found . I've tried every conceivable path for the import (with brackets and quotes) and have had almost no success. The exception is that for simple pods like SVProgressHUD , the following ugly terrible hack works

How to debug iOS 8 extensions with NSLog?

陌路散爱 提交于 2019-11-26 12:09:35
- (void)viewDidLoad { NSLog(@"%s", __func__); // ... } in viewDidLoad of an iOS 8 extension . the NSLog outputs nothing in Xcode. NSLog works as usual in the container app though. How can I get output from debug messages from an extension? Vince Yuan Debugging works for app extensions. It works on simulator too. If your app ext crashes in the simulator, you may find it is not easy to restart your app ext. Restarting your simulator is a quick solution. Steps to debug an app extension: Run the container app. In this step, Xcode uploads the container app and app extension to the device or

iOS 8 Custom Keyboard: Changing the Height

烂漫一生 提交于 2019-11-26 11:39:01
I have tried to create a custom keyboard in iOS 8 that replaces the stock one. I really searched and could not find out if it is possible to create a keyboard with more height than the stock iOS keyboard. I replaced UIInputView but could never manage to change the height available to me. skyline75489 This is my code on Xcode 6.0 GM. Both orientations are supported. Update: Thanks to @SoftDesigner, we can eliminate the constraint conflict warning now. Warning : XIB and storyboard are not tested. It's been reported by some folks that this does NOT work with XIB. KeyboardViewController.h #import

Sharing data between an iOS 8 share extension and main app

感情迁移 提交于 2019-11-26 08:47:56
问题 Recently, I\'ve been making a simple iOS 8 share extension to understand how the system works. As Apple states in its App Extension Programming Guide: By default, your containing app and its extensions have no direct access to each other’s containers. Which means the extension and the containing app do not share data. But in the same page Apple brings a solution: If you want your containing app and its extensions to be able to share data, use Xcode or the Developer portal to enable app groups

How to debug iOS 8 extensions with NSLog?

主宰稳场 提交于 2019-11-26 02:53:25
问题 - (void)viewDidLoad { NSLog(@\"%s\", __func__); // ... } in viewDidLoad of an iOS 8 extension . the NSLog outputs nothing in Xcode. NSLog works as usual in the container app though. How can I get output from debug messages from an extension? 回答1: Debugging works for app extensions. It works on simulator too. If your app ext crashes in the simulator, you may find it is not easy to restart your app ext. Restarting your simulator is a quick solution. Steps to debug an app extension: Run the

iOS 8 Custom Keyboard: Changing the Height

吃可爱长大的小学妹 提交于 2019-11-26 02:29:11
问题 I have tried to create a custom keyboard in iOS 8 that replaces the stock one. I really searched and could not find out if it is possible to create a keyboard with more height than the stock iOS keyboard. I replaced UIInputView but could never manage to change the height available to me. 回答1: This is my code on Xcode 6.0 GM. Both orientations are supported. Update: Thanks to @SoftDesigner, we can eliminate the constraint conflict warning now. Warning : XIB and storyboard are not tested. It's

Communicating and persisting data between apps with App Groups

試著忘記壹切 提交于 2019-11-26 01:34:24
问题 iOS 8 revealed a new API yesterday concerning App Groups. It was kind of messy before to share data and communicate between apps and I believe that\'s precisely what App Groups is intended to correct. In my app I have enabled App Groups and added a new group but I just can\'t find any documentation on how to use it. Documentation and API references only state how to add a group. So what is App Groups really intended to do? Is there any documentation somewhere on how to use it? 回答1: Another

openURL not work in Action Extension

微笑、不失礼 提交于 2019-11-26 00:52:37
问题 I add following code: - (IBAction)done { // Return any edited content to the host app. // This template doesn\'t do anything, so we just echo the passed in items. NSURL *url = [NSURL URLWithString:@\"lister://today\"]; [self.extensionContext openURL:url completionHandler:^(BOOL success) { NSLog(@\"fun=%s after completion. success=%d\", __func__, success); }]; [self.extensionContext completeRequestReturningItems:self.extensionContext.inputItems completionHandler:nil]; } after I create the

openURL not work in Action Extension

余生长醉 提交于 2019-11-25 18:55:26
I add following code: - (IBAction)done { // Return any edited content to the host app. // This template doesn't do anything, so we just echo the passed in items. NSURL *url = [NSURL URLWithString:@"lister://today"]; [self.extensionContext openURL:url completionHandler:^(BOOL success) { NSLog(@"fun=%s after completion. success=%d", __func__, success); }]; [self.extensionContext completeRequestReturningItems:self.extensionContext.inputItems completionHandler:nil]; } after I create the Action Extension target. But it can not work. My purpose is that: when user view a photo in Photos.app (the iOS