简体   繁体   中英

Firebase SDK doesn't work with iOS 10

I'm using Firebase in my Xcode project. And I am using cocoapods to install it.

In Podfile I've set platform to ios, '9.0' .

All works correctly in iOS 9.3.3 but when I test my app with iOS 10 , I get lots of errors and the Google Sign-in doesn't work. How can I solve this problem? Can I set multiple platforms like platform:ios, '9.0', '10.0' in my Podfile?

Apple更改了iOS 10中使用钥匙串的方式。要解决此问题,您只需转到“目标”>“功能”并启用钥匙串共享(即可访问应用程序的钥匙串)。

openURL is Deprecated in iOS10, therefore you have to use the new one.

func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
    return GIDSignIn.sharedInstance().handle(url as URL!,sourceApplication: options[.sourceApplication] as? String, annotation: options[.annotation])
}

At this moment, Firebase does not work on iOS 10, neither a device nor a simulator. This is a work in progress, so please stay tuned for updates. You can follow general discussion on Firebase at the firebase-talk group, and the Firebase Blog will have announcements as they occur.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM