NSExtensionContext -openURL:completionHandler: fails to open URLs in Action Extension

Originator:mert
Number:rdar://17551744 Date Originated:
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 8 Beta 2
Classification: Reproducible:Always
 
Summary:
-[NSExtensionContext openURL:completionHandler:] doesn't open the custom URL scheme its container app has and passes success = NO in its completion handler.

I know that it's not supposed to open arbitrary URLs, but I couldn't see anything in the docs stating that I should do anything specific to enable this or make the extension recognize its container app's scheme, so I'm expecting it to work right away.

Steps to Reproduce:
1. Create an iOS 8 Beta 2 app.
2. Specify a custom URL scheme for your app. (myapp://)
3. Add an Action Extension to the app.
4. in ActionViewController -viewDidLoad add:
        [self.extensionContext openURL:[NSURL URLWithString:@"myapp://"] completionHandler:^(BOOL success) {
            NSLog(@"%d", success);
        }];
5. Attach debugger to the extension process

Expected Results:
The container app should be launched and "success" should equal YES.

Actual Results:
The container app doesn't open and "success" equals no.

Version:
iOS 8 Beta 2

Configuration:
iOS Simulator

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!