Closed iboB closed 1 month ago
Maybe use self hosting + ngrok server so you can have easy access to files
https://github.com/TheWaWaR/simple-http-server is also useful for self hosting (as opposed to huge beasts like nginx)
After some time under investigation I can explain what approaches we have on iOS:
App Groups
External storage providers (iCloud, Firebase, etc)
Share files via URL schemes
Store them in global folder
TLDR: We should download assets to a common place like a Downloads/Documents folder which will be visible from the Files app (I guess). However, due to the iOS app's sandboxing architecture seems to be a blocker for now. I'll continue to research for a solution how to bypass the limitations we have now.
On iOS, it is not possible to create or share a global folder that multiple apps can access directly, especially between apps from different developers without user input. This is due to iOS’s strict sandboxing model, which ensures that each app is isolated from others for security and privacy reasons. Each app has its own file system and cannot access another app's files directly.
The only solution which might work for now is to to use UIDocumentPicker for accessing files (export/import) but that would require user-input which makes it very inconvenient.
Are there no permissions or one time user actions that can grant access to an entire directory?
Can we read list of directory files even if we can't access individual files?
Also can we ask permission for a file if it doesn't exist? :)
I have managed to give access to a folder which is global by the UIDocumentPicker
but it looks like it works only during lifetime of the app. Once it's closed I have to ask for a permission again from the user.
I've managed to have some working solution. It's not the best but I think it's the only one, so the process is as follows:
I'll write a document with the summarized informations. What approaches we've tried and what will work.
I'll write a document with the summarized informations. What approaches we've tried and what will work.
If this document is ready, where is it stored? - is it the .md from https://github.com/alpaca-core/alpaca-core/commit/84bb2a9e7e96d850625ef1d51acaed97d1c40787? I would like to understand you approach on iOS before starting with Android (on the same topic - download asset management). The two solutions (as implementation) are likely to be quite different, but still, the idea shall be quite similar.
@IvanFilipov That's the document, yes.
IMO, the solutions will be very platform dependent since there are a lot of restrictions on iOS platform.
@iboB Gave the idea to check if we create a framework from our library - not a static one. And it's already signed by us, will that help us to create an app.group. We'll need to check that or the app groups work only on app bundles level.
closing this as part of #139
Report results in #52