mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #166] tvOS support doesn't work #99
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#99
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sjorsvb on GitHub (Dec 27, 2015).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/166
Hi,
I was looking into writing an app requiring OAuth for Apple TV. However, this will not work in most (or all) cases, because tvOS simply has no browser to show the custom authentication webpage. So for example, in this snippet:
tvOS will try to open a custom web page (i.e. http://www.tumblr.com...), not being able to find a fitting URL scheme and give up. The OAuth methods will not get a callback because of this failure, and hence there is no error message.
I presume the same goes for watchOS, but that is clearly not implemented in this code. Maybe it's nice for you to point out these shortcomings (of OAuth, your framework is nice) on the README, because it cost me a few hours.
Thanks!
Sjors
@phimage commented on GitHub (Dec 27, 2015):
Ok you are right I will add something into readme to alert about that, if I find the good word (my english can be poor sometimes)
The 0.5.0 has been created yesterday with fixed tvos target, I have not yet draft the release with explanation, I can add it also here, and I will edit previous release.
Readme do not advertise about TVOS. Only roadmap (and maybe shell.io badge)
I don't know anythings about TVOS and WatchOS and just looking now on internet show me that webview is not supported or don't want to be supported.
https://medium.com/bpxl-craft/apple-tv-a-world-without-webkit-5c428a64a6dd#.nmjezv38w
http://thenextweb.com/apple/2015/09/14/apples-made-it-difficult-to-build-tvos-apps-and-thats-good-for-users/
The code you point out is the default handler for authorisation URL, I don't use it, I use mine each times, I have my own web view embedded, I don't try to open externally link (it's bad I think).
The demo app show that, the documentation talk about that (Handle authorize URL)
iOS application on the store do not allow to use this default handler with a page open into the web browser.
You must open into an embedded webview or the new safari controller that I add into the framework.
For TVOS if you want to make an application that are not supposed to go in the app store, I think it's possible because code is shared with iOS. Just need some trick like
NSClassFromString("UIWebView")!.But do not loose time with this ;)
Maybe one day apple will think about oauth and let an application like twitter or facebook handle the url and return token to our application...maybe I am dreaming...