Dim NativeMe As NativeObject = Me
NativeMe.RunMethod("openScheme:", Array(WA_URI))
#If OBJC
- (void)openScheme:(NSString *)scheme {
UIApplication *application = [UIApplication sharedApplication];
NSURL *URL = [NSURL URLWithString:scheme];
BOOL success = [application openURL:URL];
NSLog(@"Open %@: %d",scheme,success);
//if ([application respondsToSelector:@selector(openURL:options:completionHandler:)]) {
// [application openURL:URL options:@{}
// completionHandler:^(BOOL success) {
// NSLog(@"Open %@: %d",scheme,success);
// }];
// } else {
// BOOL success = [application openURL:URL];
// NSLog(@"Open %@: %d",scheme,success);
// }
}
#End If