mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #585] OAuth2Swift class is no longer able to be subclassed completely. #379
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#379
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 @BrianDoig on GitHub (Apr 17, 2020).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/585
Description:
Due to a recent change in Swift, convenience initializers are no longer available to be called by subclasses, or users of that subclass. Only default initializers may be called by a subclass. Since OAuth2Swift default initializer does not allow you to set all parameters, subclasses are left calling only the default initializer and there is no way to implement all the init methods required. This caused my OAuth2Swift subclass to stop compiling because the convenience initializers become private.
I tried wrapping OAuth2Swift in a class and forwarding all calls to it, but that broke when I needed to use a Safari controller because my wrapper could not be used with its init method because it is no longer a subclass of OAuth2Swift.
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
11.x (Swift 5.1)
10.x (Swift 5.0)
10.x (Swift 4.1)
9.3 (Swift 4.1)
9.0 (Swift 4.0)
other: (Please fill in the version you are using.)
objective c
@phimage commented on GitHub (Apr 30, 2020):
I replace by one
initwith default valuefde7795, more clean way to do it@BrianDoig Let me know if it work for you
ps: do not hesitate to PR for a change like that
@phimage commented on GitHub (May 4, 2020):
feel free to comment or reopen if the issue is still there