I'm having some issues when compiling my app to iOS. I'm using sqlite3 and imported as
#import <sqlite3.h>
Well, I only found a file named libsqlite3.0.dylib in my Mac and I copied it to my project. When I compile it for iOS Simulator, it works just fine. However, when I try to compile the app for iOS Device, it throws an error (Apple Match-O Linker Error) in every call I do in my implementation to sqlite's function (such as _sqlite3_open, etc.)
How can I compile it to iOS Device?
Thank you!
Just in case someone faced that same problem as me. If you are unit testing your code, add the lib file also to your test target.
Instead of simply copying the library, do it like this:
in Xcode Navigator, click on your target (the upmost entry)
go to Build Phases
, then Link Binary With Libraries
add the libsqlite3.dylib from it's location at /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOSxx.sdk/usr/lib/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With