Closed rgnlax closed 7 years ago
Hey @rgnlax, thanks for the pull request! I've actually thought about this a bit, so let me explain my POV on why SDKs have been using SFSafariViewController
instead of opening up the native apps. I'd love to hear your feedback on whether or not its valid, and whether or not you think this PR is still useful afterwards.
Facebook has started using SFSafariViewController
as the preferred method for doing FB login from iOS9+. Why? Several reasons:
WKWebView
or UIWebView
)Info.plist
which URL Schemes it will query, to prevent advertisers / analytics tools from querying for other apps installed on the system. See link for more details. This is more setup work for a developer. So -- Facebook is preferring SFSafariViewController
in iOS9+ in their SDKs, but does use the old app linking strategy in older versions of iOS. Since iOS9 has relatively high usage right now, I don't think we really need to work hard for iOS8 and below users.
I think there's some value in offering this solution (that Facebook doesn't do in iOS 9 and below) but I'm worried that this won't help developer offer the best user experience, and also might be deprecated in the future anyways.
Thoughts?
Looks like you're maintaining a fork for your own use @rgnlax -- feel free to respond to the thoughts I listed above, otherwise I'll close this for now =]
Hello, Edward.
I've little bit modified sources, and now there is an ability to open Vkontakte and Facebook apps if they are installed, if not - safari will be opened. I've created VkProvider and FbProvider with corresponding logic inside, and then Simplicity.swift and linkhandler.