Home > database >  Error after adding FirebaseFireStoreSwift-Beta with Swift Package Manager
Error after adding FirebaseFireStoreSwift-Beta with Swift Package Manager

Time:03-11

I setup a new project using Firebase SDK and only get this error when I add FirebaseFirestoreSwift-Beta. I have it in other projects that was built before Mar-8th and have no issues running them but it won't work on any new projects. I have went back and watched videos to make sure I wasn't missing a step when installing. I am using Xcode 12.4

Is this an issue with the Beta or is there something I am missing on my end?

enter image description here

CodePudding user response:

Many apologies, the issue was introduced by me.

It appears that symbol resolution has changed slightly in Swift between Xcode 12.4 and Xcode 13.

I have made a PR that fixes the compilation issue on Xcode 12.4 here: https://github.com/firebase/firebase-ios-sdk/pull/9438

Until then, if possible, you can update to the latest version of Xcode. If that is not possible, then if you use a package manager where you can make local edits, you can rename the variable data to something else (like d) to make it compile.

If you can't do that, then a more substantial workaround would be to fork the repository, check out the release tag, create a new branch and fix the error, then pointing your package manager to you own branch including the fix.

Another solution is of course to stay on 8.12 of Firebase until the PR above is merged and released.

  • Related