Sorry, my english is bad!
I developed a today widget. I need to launch Maps App (for example) from the widget and do not work when the device is locked. How to detect a locked device and launch the unlock screen in this situation?
Regards,
Sorry, my english is bad!
I developed a today widget. I need to launch Maps App (for example) from the widget and do not work when the device is locked. How to detect a locked device and launch the unlock screen in this situation?
Regards,
Instead of using
UIApplication.SharedApplication.OpenUrl(new NSUrl("myapp://foo"));
Use
ExtensionContext.OpenUrl(new NSUrl("myapp://foo"), null);
The code is in C# using Xamarin.iOS, but the ObjectiveC-code is equivalent:
NSURL *url = [NSURL URLWithString:@"myapp://foo"];
[self.extensionContext openURL:url completionHandler:nil];