Closed 22222912 closed 1 month ago
I'm not sure what's causing this. Maybe a permissions issue on the folder? Can you run fine on a real device?
I would open an issue on https://github.com/stephencelis/SQLite.swift, as the error is triggered by this third-party dependency.
The above error is I have runned it on iPad
in addition I run test app. by Carthage making , replace my own bundle id of "org.readium.TestApp",
I find that it run crush on device when launching with。another error. "unable to open database file"
and find some answer https://stackoverflow.com/questions/77206338/xcode-15-ios-17-objc3422-class-ttc6sqlite-is-implemented-in-both-one-o
This looks like the same error but in a different context : in the Test App SQLite database with the GRDB dependency instead of SQLite.swift.
I do have the same warnings about _TtC6SQLite*
symbols, I don't know if this is the culprit for the crash you observe, but it is definitely concerning with the StackOverflow link you shared.
There's another relevant SQLite.swift issue reported there: https://github.com/stephencelis/SQLite.swift/issues/1177
I think this will increase the priority of a task that was postponed: removing the SQLite database from the ReadiumLCP
package, for the v3
.
Unfortunately I don't have any solution to offer right now.
Just for debugging purposes, do you still have the same crash if you don't enable LCP in the Test App and your app? ReadiumLCP
is the only package that depend on SQLite.swift
.
I find that test app run successfully in simulator but crush in device, here is the key point
there. is no database.dbfile file to init with Appmodel class ,
I intergate LCP to my own app,app run successfully,but when I use some lcp class,it crush!
when I new a class extend DRMLibraryService,run in device. and new that class it also crush without daabase.db file
If you remove LCP in the Test App (generate with make dev
for example, without using the lcp=
parameter), are you able to run the app without crash on your device?
I want to know if the problem is triggered by embedding SQLite.swift
in the toolkit.
I make by Carthage
here is my operation
Run only”make carthage” instead of “make carthage lcp=https://lixxx/ios/XX/liblcp.json”
found that test app without LCPClient also crush in device
Hmm okay, then I'm not sure it's related to the StackOverflow you shared earlier. Besides something weird with your device, I don't have a better idea.
I have intergated to my app run successfully and open lcpl format file to read in simulator but faile d in device with the above problem
From:Mickaël Menu @.> Sent At:2024 Mar. 28 (Thu.) 19:12 To:readium/swift-toolkit @.> Cc:Travis Xu @.>; Author @.> Subject:Re: [readium/swift-toolkit] Error"Error initializing db." (Issue #405) If you remove LCP in the Test App (generate with make dev for example, without using the lcp= parameter), are you able to run the app without crash on your device? I want to know if the problem is triggered by embedding SQLite.swift in the toolkit. — Reply to this email directly, view it on GitHub <https://github.com/readium/swift-toolkit/issues/405#issuecomment-2024933899 >, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADD2ICEQYR3BK6IU377IMB3Y2PUHNAVCNFSM6AAAAABFIPD63SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRUHEZTGOBZHE >. You are receiving this because you authored the thread.Message ID: @.***>
I removed the SQLite.swift dependency from the ReadiumLCP
package in https://github.com/readium/swift-toolkit/pull/442. Hopefully this will allow apps to circumvent any issues integrating SQLite.swift by implementing a different repository.
Describe the bug
new class A extend DRMLibraryService, initializing cause crushing by error"Error initializing db."
How to reproduce?
1 spm like this
2 new class LCPLibraryService extend DRMLibraryService
3 LCPLibraryService *lcpService = [[LCPLibraryService alloc] init];
Readium version
2.6.1
OS version
IPADOS 17.3.1
Testing device
iPad 10
Environment
Additional context