[GH-ISSUE #129] OAuthSwift does not work within a widget #77

Closed
opened 2026-03-03 16:45:29 +03:00 by kerem · 3 comments
Owner

Originally created by @DennisDreissen on GitHub (Oct 16, 2015).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/129

*/Pods/OAuthSwift/OAuthSwift/OAuthSwiftURLHandlerType.swift:33:31: 'sharedApplication()' is unavailable: Use view controller based solutions where appropriate instead.

Originally created by @DennisDreissen on GitHub (Oct 16, 2015). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/129 */Pods/OAuthSwift/OAuthSwift/OAuthSwiftURLHandlerType.swift:33:31: 'sharedApplication()' is unavailable: Use view controller based solutions where appropriate instead.
kerem 2026-03-03 16:45:29 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@phimage commented on GitHub (Oct 16, 2015):

OAuthSwiftURLHandlerType is a protocol that you can implement

OAuthSwiftOpenURLExternally is just the default one, and simply use application method to open externally the URL

To allow compilation I don't think there is an other way than add "#if/#else/#endif" preprocessor macros to exclude code in widget/extension

<!-- gh-comment-id:148791551 --> @phimage commented on GitHub (Oct 16, 2015): OAuthSwiftURLHandlerType is a protocol that you can implement OAuthSwiftOpenURLExternally is just the default one, and simply use application method to open externally the URL To allow compilation I don't think there is an other way than add "#if/#else/#endif" preprocessor macros to exclude code in widget/extension
Author
Owner

@phimage commented on GitHub (Nov 9, 2015):

PR #143 add OAUTH_APP_EXTENSIONS var to disable code UIApplication. sharedApplication

With cocoapod post install setting must be add into podfile for extension target
https://guides.cocoapods.org/syntax/podfile.html#post_install

<!-- gh-comment-id:155034679 --> @phimage commented on GitHub (Nov 9, 2015): PR #143 add OAUTH_APP_EXTENSIONS var to disable code `UIApplication. sharedApplication` With cocoapod post install setting must be add into podfile for extension target https://guides.cocoapods.org/syntax/podfile.html#post_install
Author
Owner

@phimage commented on GitHub (Nov 10, 2015):

wiki page added, PR merge is next
https://github.com/dongri/OAuthSwift/wiki/Work-with-application-extension

<!-- gh-comment-id:155420762 --> @phimage commented on GitHub (Nov 10, 2015): wiki page added, PR merge is next https://github.com/dongri/OAuthSwift/wiki/Work-with-application-extension
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#77
No description provided.