Search code examples
swiftsqliteframeworksxcode15ios17

Xcode 15, iOS 17 - objc[3422]: Class _TtC6SQLite is implemented in both... One of the two will be used. Which one is undefined


In my app I'm using stephencelis/SQLite.swift

After updating to Xcode 15 and releasing my app without making any changes. 2 users of 4000+ reported that they can not make entries to their database. The database data entry code hasn't been changed and works fine on all test devices and iOS ranges, as well as for the remaining users, but 2 users so far, who updated to the new app version which only had colour changes; no actual code change can not add to the database and I can not debug why.

The only difference was that I used Xcode 15 to release the app, and noticed a new warning when running the code:

objc[3422]: Class _TtC6SQLite6Backup is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x1f1147048) and /private/var/containers/Bundle/Application/XX-XX-XX/App.app/Frameworks/SQLite.framework/SQLite (0x1063a1c70). One of the two will be used. Which one is undefined.
objc[3422]: Class _TtC6SQLite10Connection is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x1f03485f8) and /private/var/containers/Bundle/Application/XX-XX-XX/App.app/Frameworks/SQLite.framework/SQLite (0x1063a2228). One of the two will be used. Which one is undefined.
objc[3422]: Class _TtC6SQLite13DateFunctions is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x1f1146fb0) and /private/var/containers/Bundle/Application/XX-XX-XX/App.app/Frameworks/SQLite.framework/SQLite (0x1063a23d8). One of the two will be used. Which one is undefined.
objc[3422]: Class _TtC6SQLite12TableBuilder is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x1f1146e10) and /private/var/containers/Bundle/Application/XX-XX-XX/App.app/Frameworks/SQLite.framework/SQLite (0x1063a2fb8). One of the two will be used. Which one is undefined.
objc[3422]: Class _TtC6SQLite9Statement is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x1f03486c8) and /private/var/containers/Bundle/Application/XX-XX-XX/App.app/Frameworks/SQLite.framework/SQLite (0x1063a36c8). One of the two will be used. Which one is undefined.

This is the only difference I can see, could this cause the issue for a very few users? If so what's the correct fix to use the correct library. I have not made any changes other than releasing the app using new Xcode 15.


Solution

  • I've created an issue for this. It seems Apple is internally using this open source package since iOS 17, so you have it embedded in 2 different binaries (yours and Apple's). One way to solve this would be for Apple to fork this library and just change the name of the module so it wouldn't collide, but that would require an OS update. Either they do that or you will have to. This could cause runtime failures if Apple is using a different version with a different ABI or known bugs.

    https://github.com/stephencelis/SQLite.swift/issues/1226