Andrewer016
Andrewer016

Reputation: 39

How to fix '_sqlite3_prepare_v3' linker error in Xcode

I have an iOS project, in which I'd like to use Firebase Firestore. I've installed Firebase/Core, Firebase/Firestore and Firebase/Auth with CocoaPods. "pod install" ran without error, and I also successfully added my project to Firebase in its console.

My problem is, that when I try to build the project, I get an error, that says: Undefined symbols for architectuire x86_64: "_sqlite3_prepare_v3", referenced from: ... (see below image for exact error)

https://i.sstatic.net/orp9u.png

The reason I think that this error is Firebase-related, is that it says it's referenced from GoogleAppMeasurement, which is installed with Firebase.

The weird thing is, that I'm working on this project for several days now, and the very first thing I did, was adding Firebase to it. And I got no errors related to Firebase so far. Yesterday evening I left the project with no errors at all, then when I tried to build it this morning, without doing anything, this error occured. I didn't update the pods, didn't write any code. I literally did nothing other than trying to build it.

(Environment: High Sierra 10.13, Xcode 9.2, Swift 4.0, iOS 11.2)

I've pretty much done everything I could find on the internet, even remotely related to my problem, as I haven't find anything specific to my problem so far.

I've updated the pods - didn't work. I've included every framework in "Linked Frameworks and Libraries" that had anything to do with sqlite3 - didn't work (as expected)

I've cleaned the project many times.

I've completely purged Firebase (and all other pods) from my project. After that Xcode built the project successfully. Then I added Firebase again, the same error occured.

Now I'm out of ideas about what could I do.

I'm completely new to Xcode and Swift, even MacOS, so I'm sorry if I didn't provide enough background. If further information is needed, please tell me and I'll provide it.

(edit: Didn't show image)

Upvotes: 2

Views: 1996

Answers (1)

Paul Beusterien
Paul Beusterien

Reputation: 29572

Use at least Xcode 10.1.

Since App Store submissions starting requiring Xcode 10.1 in March 2019, Firebase versions release after that, also require at least Xcode 10.1.

If you must use Xcode 9, you should stick with older versions of the Firebase pods.

Upvotes: 3

Related Questions