I packaged a Golang application into a OSX pkg file:
productbuild --component foo.app /Applications --sign "test" foo.pkg
I can install the pkg file successfully, but can NOT launch it.
Because it can NOT read any files in the /Application/foo.app/Content/Resources
.
I know that the app is running in a sandbox, and it can only read/write ~/Library/Containers/foo
folder.
Basically, there are two ways may let access files int resources folder:
Is there any APIs(Golang) available to visite files in
~/Library/Containers/foo
?Can I make
/Application/foo.app/Content/Resources
be installed to~/Library/Containers/foo
? If so, how to package the app?