Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 8.0 beta give an error after import Firebase

I create empty swift project with Xcode 8.0 beta 5 or 6 and import Firebase with use cocoapods like Firebase guidelines. Everythings fine while import process. I configure firebase with FIRApp.Configure()comment. I can handle with Authentication but when I try to reach database it didn't work.

Build time error in FIRApp.h like :

"Conflicting nullability specifier on return types, 'nullable' conflicts with existing specifier 'non null'"

Screenshot of FIRApp.h Build-time error

Also these kind of error in the console:

2016-08-26 13:00:32.719: <FIRInstanceID/WARNING> STOP!! Will reset deviceID from memory.
2016-08-26 13:00:32.719: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=6 "(null)"

2016-08-26 13:02:08.329: <FIRInstanceID/WARNING> Failed to retrieve the default GCM token after 5 retries

I couldn't solve the problem.

like image 734
cagricalis Avatar asked Aug 26 '16 10:08

cagricalis


2 Answers

The build time warning is related to Xcode 8 updates in nullability declaration checking. It should be innocuous and fixed in an upcoming release.

The FIRInstanceID errors are related to a keychain bug in the Xcode 8 beta. See this radar. The keychain problem only impacts simulator runs. There should be a fix before the beta ends. In the meantime, the workaround is to enable keychain sharing (see Benjamin's answer) or to use a real device.

The keychain bug is fixed in Xcode 8.2.

like image 162
Paul Beusterien Avatar answered Nov 15 '22 22:11

Paul Beusterien


Actually it is not related to any sort of bug but to the fact your Keychain Sharing is off by default and you need to enable it.

From the Project Navigator, select the target. Under the Capabilities tab, turn on Keychain Sharing. This should get rid of all the issues.

like image 39
Benjamin Avatar answered Nov 15 '22 21:11

Benjamin