I have a Qt app I submitted to Apple Mac App Store. It’s been rejected for writing to ˜/Library/Preferences/com.mycompany.myapp
here’s the message I received:
2.30
The application accesses the following location(s):
'~/Library/Preferences/com.nourayn.AlMosaly.plist'
The application may be
* creating files
* writing files
* opening files for Read/Write access (instead of Read-Only access)
in the above location(s).
How to fix this?
I presume you’re saving your application settings using QSettings. Your code probably looks like this:
Instead, you can create your QSettings with an explicitly specified filename:
If you use QSettings at multiple places in your app, doing this might ease things a little:
Moreover, if you have a com.trolltech.plist file in ~/Library/ (which stores Qt global settings), you may need to move to Qt 4.8.1. More info here:
http://qt-project.org/doc/qt-4.8/qsettings.html#changing-the-location-of-global-qt-settings-on-mac-os-x