I have a today extension for my app and I would like to be able to open the containing app from it. I have put what is necessary in my app's info.plist
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>iOSmyApp</string>
</array>
<key>CFBundleURLName</key>
<string>com.company.myApp</string>
</dict>
</array>
</plist>
And then I call the method openURL: completionHandler:
from the extension:
NSURL * hostURL = [NSURL URLWithString:@"iOSmyApp//:"];
[self.extensionContext openURL:hostURL completionHandler:^(BOOL success) {
NSLog(@"success opening - %d", success);
}];
I get 1 as value for success but the app is not launched. Also, it doesn't change whether I use iOSmyApp
or iOSmyApp//:
, however if I put something different I get a message about unknown URL. So obviously I am missing something but I can't find what it is.
EDIT
RCNTodayExtension[1294:835478] Failed to inherit CoreMedia permissions from 1282: (null)
This is the only error I get, I don't see how it could be related but I don't know what causes it either.
Thank for your help.