tumblr / TMTumblrSDK

Unopinionated and flexible library for easily integrating Tumblr data into your iOS or OS X application.
http://tumblr.github.com/TMTumblrSDK
Apache License 2.0
432 stars 125 forks source link

Apple Rejected OAuth login with Safari app. #139

Closed manshiro closed 6 years ago

manshiro commented 6 years ago

Apple Reviewer said "We noticed that the user is taken to Safari to sign in or register for an account, which provides a poor user experience."

It is attention.

manshiro commented 6 years ago

Tumblr Sign in not use Safari App. Use SafariServices like this.

extension AppDelegate: TMOAuthAuthenticatorDelegate {
    func openURL(inBrowser url: URL!)
    {
        DispatchQueue.main.async {
            let safariViewController = SFSafariViewController(url: url)
            UIApplication.shared.keyWindow?.rootViewController?.present(safariViewController, animated: true, completion: {
            })
        }
    }
}