iOS9 open another app by urlSchemes first will pop up the confirm alertView.How to get the callBack when press the cancel Button.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"app://"]];
As @Alan pointed out himself, the following UIApplicationDelegate
methods can be used to determine the stats of the openURL
UIAlertView
:
applicationWillResignActive
applicationDidEnterBackground
is-processing-app-switching
will be called I guess a flag like "is-processing-app-switching" based on NSUserDefaults
can be set to true
before the openURL
call, and when it's true applicationDidEnterBackground
can be used to determined if user chooses cancel or not. In is-processing-app-switching
the flag should be set to false. This workaround seems ugly to me but when you really want to determine the stats of the build in UIAlertView
, at least is doable.
Thanks the poster again for figuring out a solution himself.