Closed llemeurfr closed 4 years ago
The message is of type:
I still see this issue with a license generated from my local server and shared on iCloud. The message is: Error while importing the publication: The file "xxxx.lcpl" couldn't be opened because there is no such file.
The same license is correctly handled if I import the license from the "+" button inside the app. Funny think is that if I do the same with a license corresponding to content in a remote server (e.g. the front-prod sandbox server) I have no problem importing the publication via File / share.
I believe this is actually a bug in the Files app. Basically what's happening is that Files sends the local path to our app regardless of whether the file is downloaded or not (small cloud icon overlay). So if the file we try to open is not already on the device, our app can't read it.
I did find a workaround, by setting LSSupportsOpeningDocumentsInPlace
to NO
in the Info.plist
of the app. This forces Files to first download the file, and then copy it in our app's sandbox. However to do that I had to remove UISupportsDocumentBrowser=YES
, because it implicitely sets LSSupportsOpeningDocumentsInPlace
to YES
. Since we are not using UIDocumentBrowserViewController
in the app, it's probably fine.
On a side note, after upgrading to iOS 13 to check if the issue was fixed in Files, Readium was not recognized for LCPL files anymore from the Files app. Adding a new Document Type in the app with exactly the same parameters but a different extension worked as intended. I can't explain it and didn't find a way to reset the shared Document Types so far.
@mickael-menu this is a known issue with iOS 13 that almost all apps are facing right now.
I secretly hoped that Apple would fix it, but so far it hasn't been the case, even with 13.2.
I guess they are too busy fixing SwiftUI... 😬
Does closing means that lcpl files are now recognized again in Files?
@llemeurfr the issue was tagged to the PR, so this would mean it should work now again, i haven't gotten a chance to test all scenarios, but a new testflight is on its way
One cannot anymore import a license in the app by selecting it in the Files app and Share with R2 Reader.