SQLite.swift: Class SQLiteXXX is implemented in both LinkServices.framework and MyApp error logs
Build Information
- SQLite.swift 0.14.1
- Xcode 14.1 (14B47b) / macOS 12.6.1 (21G217)
- Swift Package manager
Issue
Hi,
We’re seeing worrisome errors from the ObjC runtime in our logs when running an app linking both SQLite.swift and the PSPDFKit framework (https://github.com/PSPDFKit/PSPDFKit-SP / https://pspdfkit.com):
Class _TtC6SQLite6Backup is implemented in both /Applications/Xcode-14.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x1b8c21b70) and /[redacted]/SQLiteConnectionConflict.app/SQLiteConnectionConflict (0x1005a6538). One of the two will be used. Which one is undefined.
This is reported for several classes : SQLiteBackup, SQLiteConnection, SQLiteStatement, SQLiteTableBuilder.
Full logs
objc[67969]: Class _TtC6SQLite6Backup is implemented in both /Applications/Xcode-14.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x1b8c21b70) and /[redacted]/SQLiteConnectionConflict.app/SQLiteConnectionConflict (0x100c26538). One of the two will be used. Which one is undefined.
objc[67969]: Class _TtC6SQLite10Connection is implemented in both /Applications/Xcode-14.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x1b8c218a8) and /[redacted]/SQLiteConnectionConflict.app/SQLiteConnectionConflict (0x100c26788). One of the two will be used. Which one is undefined.
objc[67969]: Class _TtC6SQLite9Statement is implemented in both /Applications/Xcode-14.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x1b8c21aa0) and /[redacted]/SQLiteConnectionConflict.app/SQLiteConnectionConflict (0x100c26948). One of the two will be used. Which one is undefined.
objc[67969]: Class _TtC6SQLite12TableBuilder is implemented in both /Applications/Xcode-14.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x1b8c21460) and /[redacted]/SQLiteConnectionConflict.app/SQLiteConnectionConflict (0x100c27ef0). One of the two will be used. Which one is undefined.
You can reproduce the issue by creating a new iOS app in Xcode, and adding both SQLite.swift and PSPDFKit to the app with SwiftPM. A sample project is attached. Run the app and the message will immediately appear in the logs.
Can you help us understand why this error is reported and how we should fix it please?
Thanks for your help!
PS: This issue has also been reported to the PSPDFKit team, I’ll update here if I get some updates on the other side.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 17 (1 by maintainers)
Commits related to this issue
- Rename package 'SCSQLite' https://github.com/stephencelis/SQLite.swift/issues/1177 — committed to ipsosante/SQLite.swift by guillaumealgis 4 years ago
- Rename package 'SCSQLite' https://github.com/stephencelis/SQLite.swift/issues/1177 — committed to ipsosante/SQLite.swift by guillaumealgis 4 years ago
- Rename package 'SCSQLite' https://github.com/stephencelis/SQLite.swift/issues/1177 — committed to ipsosante/SQLite.swift by guillaumealgis 4 years ago
- Rename package 'SCSQLite' https://github.com/stephencelis/SQLite.swift/issues/1177 — committed to ipsosante/SQLite.swift by guillaumealgis 4 years ago
- Rename package 'SCSQLite' https://github.com/stephencelis/SQLite.swift/issues/1177 — committed to ipsosante/SQLite.swift by guillaumealgis 4 years ago
- Rename target + module name to avoid naming collisions with macOS's private LinkServices framework Seems like Apple uses the SQLite framework internally in the framework /System/Library/PrivateFramew... — committed to Mailbutler/SQLite.swift by tobi-mb 2 years ago
No update?
Still no update?
This also happens when an app uses both
SQLite.swiftand imports and uses theAppIntentssystem framework, so it’s a problem even without other third-party libraries.Its a real shame, this issue has been reported multiple times including myself in Apr last year and still not resolved https://github.com/stephencelis/SQLite.swift/issues/1201 https://github.com/stephencelis/SQLite.swift/issues/1226
According ‘The Eskimo’ from DTS Apple, the usage of SQLite.swift in LinkServices.framework without renaming the framework, should be fixed in macOS 15.1b1. See https://forums.developer.apple.com/forums/thread/767242
Personally I don’t see the ‘implemented in both’ logging anymore when using SQLite.swift in macOS 15.2
To resolve this I just forked the repo and renamed package from SQLite to SQLiteSwift