You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have project that sqlite3 pod already installed to manipulate data stored in app.
After I installed Amplitude via SPM I got following errors when I run the project. I got Could not build Objective-C module 'SQLite3' for many files and many redefinition method errors like following:
sqlite3pod/src/sqlite3.h:654:8 Redefinition of 'sqlite3_file'
sqlite3pod/src/sqlite3.h:752:8 Redefinition of 'sqlite3_io_methods'
sqlite3pod/src/sqlite3.h:1234:8 Redefinition of 'sqlite3_vfs'
Would that be related if Amplitude also utilizes the sqlite? Any ideas on how to fix it?
Environment
SDK Version: v1.9.0
Xcode Version: 15.4.0
iOS Version: 17.5
The text was updated successfully, but these errors were encountered:
Hi @doganaltinbas we do link to the system Sqlite3 distribution to be able to import files from our legacy SDK. Is there a reason you are importing sqlite via a pod vs just using the system distribution?
The legacy code I'm working with uses SQLite pod to cache bulk data for offline mode. I resolved the issue by converting the wrapper I wrote for Amplitude into Objective-C. However, I'm still unsure why the Amplitude wrapper causes errors when used with Swift.
@doganaltinbas ObjC is generally a bit less strict with linking issues. The core issue is that we link with the system sqlite3 distribution, and you are linking to an external one, and there's no namespacing with C APIs. Generally using the system library is encouraged as it leads to smaller app sizes and launch times. You may need the pod if you need a specific SQLite3 version or using non-standard compilation options, but these tend to be extremely uncommon cases. Do you have a specific use case as to why you can't use the system SQLite distribution?
I have project that sqlite3 pod already installed to manipulate data stored in app.
After I installed Amplitude via SPM I got following errors when I run the project. I got
Could not build Objective-C module 'SQLite3'
for many files and many redefinition method errors like following:Would that be related if Amplitude also utilizes the sqlite? Any ideas on how to fix it?
Environment
The text was updated successfully, but these errors were encountered: