My Mac App has no write access in Applications/MyApp.app Folder

I have Signed and Notarized My pkg, and installed it in the Applications/Folder. My app will download some updated files to MyApp.app folder, But it failed due to lack of Write access, anyone can give me some advice?

Yes, app bundles are not supposed to be modified after installation. If you have configuration or assets that need to be updated later, you'll need to put the updated files somewhere else.

This is one of the things that your Application Support directory is for. You can get the URL of this standard directory with this API:

https://developer.apple.com/documentation/foundation/nsfilemanager/1407693-urlfordirectory

specifying .applicationSupportDirectory for the first parameter.

Note: By convention, you don't put your files directly in this directory, but create a subdirectory with your app's name or your bundle ID as its name, and put your files in there.

My Mac App has no write access in Applications/MyApp.app Folder
 
 
Q