问题
I need to access to the data (photos, database...) from the app and app extension.
But the app can't access to the app extension document folder. I've searched and storing data at shared app group folder instead of saving it in the document dictionary is the solution.
/Users/*/Library/Developer/CoreSimulator/Devices/8B1DB861-AA3F-446F-A559-D4727CDB9285/data/Containers/Shared/AppGroup/4849394B-CD33-4A85-9C6F-70573B615D6C
But, does it safe? In my previous question, i've asked about the location to save the data: What different between store database in different locations 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, storing data in shared-app group will allow me to update , delete files after upload the app to appstore?
What's different between storing data in the document directory and app group directory?
来源:https://stackoverflow.com/questions/35273038/ios-does-saving-data-in-share-group-directory-is-safe