开发者

iOS returning from safari (or another app)

开发者 https://www.devze.com 2023-02-12 05:34 出处:网络
My problem is the following: in my app, I need to switch to safari for a login; however, when the user is redirected to my app, I want a specific action to be executed. Is there a way to do that? View

My problem is the following: in my app, I need to switch to safari for a login; however, when the user is redirected to my app, I want a specific action to be executed. Is there a way to do that? ViewWillAppear doesn't work, since it's c开发者_开发问答alled only the first time the views shows up....

Thanks for the help :)


You could register your iOS app to handle URL scheme 'foo', then invoke or have a link pointing to 'foo://my_custom_launch_action' from your website. When your app launches, you may read the launch options and act accordingly.

I think the official Flickr app for iPhone implements this mechanism to authenticate users through Safari from outside the app.

0

精彩评论

暂无评论...
验证码 换一张
取 消