macoscode-signingosx-gatekeeper

Save Data Within Signed App


I am distributing my OS X application on individual USBs and, for this reason, everything must be self contained.

The app itself lets users input information and then saves this information to an existing text file (specifically an ObjectDB database). Herein is my problem.

I'd like to keep this text file inside the app itself (i.e. inside the Content folder) so it's out of the way and can't be deleted by the average user. But once the app is signed, it seems the text file can't be altered with any new information without getting flagged by Gatekeeper. Is this really the case? There's no way to store data files within apps now?

I'd appreciate any suggestions. Thanks.


Solution

  • Yes, you are correct. If you modify the application package, the signed package is no longer valid. That's kind of the purpose of signing a package.

    Your options are to store the text file in a temporary folder on the user's computer, or to instruct your users to disable gatekeeper (don't do this).