mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #362] Example with authorize in class and not in ViewController #229
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#229
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 @GlitchEclipse on GitHub (Apr 15, 2017).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/362
Description:
I have created a singleton of a custom class that holds the authorization and returns data fine, but I am trying to figure out with the provided examples how to use the authorizeURLHandler to create the webview when the authorization for the callback is not the ViewController since opening a separate Safari page will not be approved by the App Store. The example is everything done in the ViewController for these actions. Are there any examples don't included everything in one ViewController?
OAuth Provider (Twitter, Github, ..):
Etsy
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
8.0 (Swift 3.0)
8.0 (Swift 2.3)
7.3.1
other: (Please fill in the version you are using.)
objective c
@phimage commented on GitHub (Apr 15, 2017):
for app store if your app is >= ios9 you have the SafariURLHandler
you need a view... to see a webview. so you have a parent view controller. could be one that already exist, a new one just to display the webview and anything else
@oshitub123 commented on GitHub (Apr 26, 2017):
it is okay but what happen when you use ios10 and xcode 8.3.2 we can't use correctly SafariUrlHandler because cause this error :
2017-04-25 12:05:03.680 pruebaslibrary[7476:136239] Warning: Attempt to present <SFSafariViewController: 0x7fdf8ef02960> on <pruebaslibrary.ViewController: 0x7fdf8ef07420> whose view is not in the window hierarchy!
@phimage commented on GitHub (Apr 26, 2017):
look for the error in issue
the message is clear, you present it from a bad view controller
you make SFSafariViewController(viewController: XXX, and XXX is not the current view controller
I think I will add a closure, to get this controller....allowing to get the current one
@oshitub123 commented on GitHub (Apr 26, 2017):
i put this
code:
@oshitub123 commented on GitHub (Apr 26, 2017):
but still don't work @phimage
@phimage commented on GitHub (Apr 26, 2017):
I will not help
Please read all my advice
@phimage commented on GitHub (Jun 4, 2017):
I try to explain again and close
SafariURLHandler(viewController: VCXXX: VCXXX must be the viewController on top of all view controllers, the one displayed when you makeauthorize(...,@oshitub123 commented on GitHub (Jun 5, 2017):
i solve this , the problem was that i try to do it into viewdidload but when we use xcode 8.3.2 we have to do it into @IBAction or a func that its called into @ ibaction
@oshitub123 commented on GitHub (Jun 5, 2017):
some like this
@IBAction func check(_ sender: Any) {
autorizathion { (bo) in
self.reponseAuth = bo
@oshitub123 commented on GitHub (Jun 9, 2017):
so thanks for all @phimage