Я найду решение
Добавьте над реализацией.
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
@interface AppDelegate() <ASWebAuthenticationPresentationContextProviding>
@end
#endif
В вашем коде для аутентификации.
self.authSessionAS = [[ASWebAuthenticationSession alloc]initWithURL:[[NSURL alloc] initWithString:self.authUrl] callbackURLScheme:@"app://" completionHandler:^(NSURL * _Nullable callbackURL, NSError * _Nullable error) {
if(callbackURL)
{
self.resultStream(callbackURL.absoluteString);
}else
{
self.resultStream(@"");
}
self.resultStream = NULL;
}];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
if (@available(iOS 13, *)) {
self.authSessionAS.presentationContextProvider = self;
}
#endif
[self.authSessionAS start];
Добавьте метод
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
#pragma mark - ASWebAuthenticationPresentationContextProviding
- (ASPresentationAnchor)presentationAnchorForWebAuthenticationSession:(ASWebAuthenticationSession *)session API_AVAILABLE(ios(13.0)){
return UIApplication.sharedApplication.keyWindow;
}
#endif