It is recommended by Apple to use SFAuthenticationSession and you will require it for SSO in iOS 11+, it can certainly help streamline the process of integration. Although you should still be supporting iOS 10 pathway with SafariViewController
Thanks so much for updating the material for the latest version. It’s so much easier to use one of these SDKS for Google or Facebook, but do you think you could do a tutorial on another auth that is not part of an SDK? I am trying to build something with a third party medical record system, and it gets much more problematic when it’s not built in to Oauth.
Maybe it’s just me but I found the UI on the web to be different from the UI shown in this tutorial. Not sure why, but you may want to check quick to see if it changed.
Hi rafaelcsa,
Correct, using Apple’s SFAuthenticationSession is the preferred solution for iOS 11 and beyond. We discussed this at RW before updating the tutorial, but felt the 3rd party solutions are still viable.
Hi mashype,
Yes, SFAuthenticationSession is in our ‘Brainstorm’ list and will likely be pulled in as a new tutorial.
Sorry, I can’t give ETA on this :]
Hi, I see your UI is built by AutoLayout, then you change the location by assigning a new value to recognizerView.center. Is that ok? Because I don’t see an official document pointing that. Thank you.
Hello vietstone,
Nice question. According to Apple docs, translations work well with AutoLayout. Here is a quote from the developer site:
In iOS 8.0 and later, the transform property does not affect Auto Layout. Auto layout calculates a view’s alignment rectangle based on its untransformed frame.
Hi, as the document writes for transform, I can understand if it’s translation (x, y) in transform for changing position, but you change position by center, so I don’t understand why it does not interfere with AutoLayout. Can you explain more? Thank you.
I opened the Incognito project and noticed that it is using Top/Bottom Layout Guides and Constraints. I don’t have that when I create single view applications, I have a safe area instead. This is confusing for me because I think I read somewhere that those Guides and Restraints are deprecated?
I can not run the app. I have not changed anything, but got an error saying that I need a team, so I added myself as a ‘personal team’, now I can’t run it because I get 2 errors:
Yeah, safe area is recommended over top/bottom guides. It must have been left over from the project it was updated from. Either one will still work for the current version.
Yes, on all downloaded projects (or new Xcode project) you must select your own developer account and add the bundle identifier.
I am attempting to follow your OAuth2Swift piece, but run into an error on the callback in the Application Delegate Oauth2Swift.handle(url: url).
I have my callback url set up just like the tutorial: guard let rwURL = URL(string: "com.devetry.ytp:oauth2Callback") else { return }. But when it comes back,
The error I am getting states that operation could not be complete. My only assumption could be that the callback url is not configured correctly? Is there additional steps I need to take to get the OAuth2Swift.handle(url: url) to succeed?