-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for iOS 13 Web Authentication #234
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @cocojoe,
I've tested this on the iOS 13 simulator in xCode 11 beta 6 and, and with the suggested changes, it works fine.
@@ -98,6 +106,10 @@ - (void)presentAuthenticationSession:(NSURL *)url { | |||
} | |||
self.authenticationSession = nil; | |||
}]; | |||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to
if (@available(iOS 13.0, *)) {
To prevent warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I just tried this on iOS 12.4, and is fails with this suggested change.
Looks like it may need to stay how you originally had it and live with the warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you try and compile in Xcode 10.x only with @available it will error as the compiler still sees the code. is a bit of a pain at times
ios/A0Auth0.m
Outdated
@@ -98,6 +106,10 @@ - (void)presentAuthenticationSession:(NSURL *)url { | |||
} | |||
self.authenticationSession = nil; | |||
}]; | |||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 | |||
authenticationSession.presentationContextProvider = self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires a ;
@@ -98,6 +106,10 @@ - (void)presentAuthenticationSession:(NSURL *)url { | |||
} | |||
self.authenticationSession = nil; | |||
}]; | |||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 | |||
authenticationSession.presentationContextProvider = self | |||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switch to }
to close the suggested @available
check.
ios/A0Auth0.m
Outdated
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 | ||
authenticationSession.presentationContextProvider = self | ||
#endif | ||
self.authenticationSession = authenticationSession |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires a ;
Appreciate the checks, I just added it quick with mental compiler to help unblock, let me fix up 😆 |
@robwalkerco please re-test |
I was experiencing the same issue, and this resolved it for me! 👏 |
keyWindow has been deprecated. Could this possibly be implemented using the new UIWindowScene?
|
@DMMN1992 I agree with you, although this should be tackled in a different PR. |
Is it possible to push this into a new release? Or how do I update my package to make use of this latest commit? |
@nyoung697 working on that as we speak |
* Added support fo iOS 13 presentationContextProvider property * Tweaks
Changes
Added support for iOS 13 behaviour changes in Web Authentication
References
#233
Testing
N/A
Checklist