我安装了iOS 13后,通过Safari进行身份验证的功能不再可用。
除了self.authSessionAS.presentationContextProvider = self;
之外,我的iOS 12配置相同。
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;
}];
self.authSessionAS.presentationContextProvider = self;
[self.authSessionAS start];