Include the SQLite.swift version, commit or branch experiencing the issue.
SQLite.swift 0.13.3/0.14.0
Mention Xcode and OS X versions affected.
XCode15
How do do you integrate SQLite.swift in your project?
Swift Package manager
Problem
In my project, there're 2 framework in which SQLite is used.
And in my app, I need to import this oss as dynamic lirabray because it is used in more than one frmaework.
When I use cocoapods to do it, everything works fine.
But I was aksed to use SPM(Swift Package Manager) to import.
As I know, SPM can only import static library unless you edit the Package.swift. So I edit the Package.swift and add type:.dynamicin the product. After I do that and run the app again, I got runtime crush listed below:
Error
dyld[697]: Symbol not found: _$s6SQLite10ConnectionC8LocationO8inMemoryyA2EmFWC
Referenced from: <4B8F1B6D-C959-38BE-84E4-B93DF2BF0DDC> /private/var/containers/Bundle/Application/81E9CF1A-9A0E-4FCC-8FD2-3E05F17F62AE/MPTDKSampleApp.app/Frameworks/DeviceAgentLogs.framework/DeviceAgentLogs
Expected in: <6439E3B1-5F0E-3B00-8846-DB8CD30EAE8F> /private/var/containers/Bundle/Application/81E9CF1A-9A0E-4FCC-8FD2-3E05F17F62AE/MPTDKSampleApp.app/Frameworks/SQLite.framework/SQLite
I have checked MPTDKSampleApp.app/Frameworks/SQLite.framework/SQLite and it is actually existed. I also have tried a lot of ways but cannot find the solution.
I also edited other third-party-library's Package.swift like ZipArchive and RxSwift and both of them works fine. No build error, no runtime crush.
Build Information
Problem
In my project, there're 2 framework in which SQLite is used. And in my app, I need to import this oss as dynamic lirabray because it is used in more than one frmaework. When I use cocoapods to do it, everything works fine. But I was aksed to use SPM(Swift Package Manager) to import. As I know, SPM can only import static library unless you edit the Package.swift. So I edit the Package.swift and add
type:.dynamic
in the product. After I do that and run the app again, I got runtime crush listed below:Error
I have checked MPTDKSampleApp.app/Frameworks/SQLite.framework/SQLite and it is actually existed. I also have tried a lot of ways but cannot find the solution.
I also edited other third-party-library's Package.swift like ZipArchive and RxSwift and both of them works fine. No build error, no runtime crush.
Can anyone help me with this porblem?
Here is the Package.swift I edited:
Package.swift