UIApplication's openURL Crashes My App

…衆ロ難τιáo~ 提交于 2019-12-10 15:37:53

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!