How do I get permission to read/write access to database located in Resources inside sandboxed app?

StackOverflow https://stackoverflow.com/questions/10720194

سؤال

I have database in the MyApp.app/Contents/Resources folder. I want at least to read data from it in the sandboxed app.

Now I have a lot of "deny file-write-data /Users/user/Desktop/MyApp.app/Contents/Resources/DB/app_db.db" in the Console.

I can't use com.apple.security.temporary-exception.files.home-relative-path.read-write because I don't want to rely upon end user location of the app.

In spite of warnings in the Console my app is working. Is there any entitlement to give access or I should to copy my db to the container during first start?

هل كانت مفيدة؟

المحلول

Even reading from a db can require the DB to write to create locks etc., and you don't have a lot of control of that (you may have some depending on the db). Just follow your own intuition - copy the db on first run to your container.

Also file a radar, it can't harm.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top