Closed Michelasso closed 5 years ago
I have managed to launch the Safari view controller. The setClientID in the readme sample had some spaces in them, so the oauthURL was always nil. With this line now it connects to the Trakt.tv login screen:
TraktManager.sharedManager.setClientID(clientID: "Client-ID", clientSecret: "Secret", redirectURI: "Redirect-URI")
I get an oauth error, though after logging in trakt with my Google account (the one I always use).
Hey there, so sorry I haven't replied sooner! Just saw this now. I will work on updating the ReadMe to be easier, and I'll look into providing a sample project. You are correct in the first message that queryDict()
does not exist. I've been using an extension I found online in my personal project, the important thing is just getting the value of the code
parameter passed back. I posted the exact code for the extension I'm using in https://github.com/MaxHasADHD/TraktKit/issues/27
All right, thanks. I eventually went forward and managed to make a small (tvOS) app. Then in August I have got stuck as well, due to many personal issues. But I promised myself to get my hands on it again, so once I'll do it I will pull a request for the tvOS port (made by me). That includes an extra module to do the typical Trakt authorisation using a generated 8 chars code (well, to be honest I have stolen it from another Trakt project in Github - forgot its name - and modified it).
First of all thanks for this great project. At least judging at the code it looks impressive! Still I have problems make it running. The examples in the README.md file aren't working. My biggest issue is with
"url.queryDict()" for starting doesn't exist. So I had to make a class extension, which I don't know if does the right thing:
Most importantly
func application(application: UIApplication, handleOpenURL url: NSURL) -> Bool
renamed to
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool
(since I am using Swift 4.2) never gets called. Is there any change you can provide a Swift 4.0 example or at least some better guidelines/documentation about how to authenticate? Also for macOS, and in case some ideas for tvOS as well (I migrated the framework to tvOS, it compiles and links, but I have no idea about how to start the first communication). There isn't
SFSafariViewController(url: oauthURL)
in either. Thanks!