问题
I'm using UIApplication's openURL: method to open a website in Safari. When the user came back to the app (fast switching), it relaunched. It means that my app was quit instead of going to the background.
Does anyone have the same issue? Any ideas? Thank you in advance.
回答1:
It may be possible that you need to retain the URL object. That was once the issue for me
回答2:
make sure that you are using
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
in your appdelegate rather than
- (void)applicationDidFinishLaunching:(UIApplication *)application
来源:https://stackoverflow.com/questions/5775077/uiapplications-openurl-crashes-my-app