I need to access data (photos, database ...) from the application and the application extension.
But the application cannot access the document extension folder of the application. I searched and saved the data in the shared application group folder instead of saving it in the document dictionary. This is the solution.
/Users/*/Library/Developer/CoreSimulator/Devices/8B1DB861-AA3F-446F-A559-D4727CDB9285/data/Containers/Shared/AppGroup/4849394B-CD33-4A85-9C6F-70573B615D6C
But is it safe? In my previous question, I asked about the location for saving data: What is the difference between the storage database in different places in iOS?
The main difference is that storing the file in the documents folder means you can write (update) it, which is pretty important for a database file. You cannot write to a file in the app bundle.
So, saving data in the shared-app group will allow me to update, delete files after loading the application in the appstore?
What is the difference between storing data in the document directory and in the application group directory?
source
share