Codesigning/Notarizing/Stapling an app seems to change app file?
Posted: Fri Jul 30, 2021 7:28 pm
Hi all,
I'm hoping someone has some insight on this weird issue: i'm near release of an app for a limited audience - mainly PC but some Mac users. The app builds for PC and Mac just fine but is obviously not codesigned etc.
The newer version so macOS make it near impossible to run a downloaded, unsigned app, insisting the 'app is damaged' and wanting to bin it. So i ventured into codesigning/notarising/stapling process on Mac using the corresponding lesson https://lessons.livecode.com/m/4071/l/1 ... code-stack
Doing this manually exceeded my attention span by about a few hours, so i opted to use the stack mrSignNotarizeHelperV3.livecode from this same lesson, which promises to do this automatically and to my surprise it really does.
I get a message from Apple that the app is codesigned/notarised/staped and all should be good. The app can be downloaded and run without MacOS throwing a fit and wanting to bin it.
Now the problem is that this process seems to change the contents of a file added in the 'copy files' section the standalone build settings.
In particular, this is the config file which is a key for decrypting libraries used to access LiveCloud - and because contents change i can no longer decrypt the libraries for liveCode and have a nicely stapled but dead app.
I did double check by building several times by rebuilding and keeping copies of each build which weren't touched while and I codesigned/notarised/stapled the others - every time the same problem: Unsigned apps can use LiveCloud without a problem (the config file is unchanged) while codesigned/notatised/stapled apps seem to change the contents of the config file, giving me nicely stapled but dead apps...
This file resides in the following location in the app bundle: <app>/Contents/Resources/_MacOS/CanelaDB/config/config
The idea is that on first run, this folder is copied to the user's Documents folder along with the 'mainstack' as this is writeable location. This works absolutely fine on Mac and Windows with unsigned apps. But seemingly not with stapled apps and that is because the contes of said config file change.
Can anyone offer any insight into how this is happening and why??
many thanks
Stam
I'm hoping someone has some insight on this weird issue: i'm near release of an app for a limited audience - mainly PC but some Mac users. The app builds for PC and Mac just fine but is obviously not codesigned etc.
The newer version so macOS make it near impossible to run a downloaded, unsigned app, insisting the 'app is damaged' and wanting to bin it. So i ventured into codesigning/notarising/stapling process on Mac using the corresponding lesson https://lessons.livecode.com/m/4071/l/1 ... code-stack
Doing this manually exceeded my attention span by about a few hours, so i opted to use the stack mrSignNotarizeHelperV3.livecode from this same lesson, which promises to do this automatically and to my surprise it really does.
I get a message from Apple that the app is codesigned/notarised/staped and all should be good. The app can be downloaded and run without MacOS throwing a fit and wanting to bin it.
Now the problem is that this process seems to change the contents of a file added in the 'copy files' section the standalone build settings.
In particular, this is the config file which is a key for decrypting libraries used to access LiveCloud - and because contents change i can no longer decrypt the libraries for liveCode and have a nicely stapled but dead app.
I did double check by building several times by rebuilding and keeping copies of each build which weren't touched while and I codesigned/notarised/stapled the others - every time the same problem: Unsigned apps can use LiveCloud without a problem (the config file is unchanged) while codesigned/notatised/stapled apps seem to change the contents of the config file, giving me nicely stapled but dead apps...
This file resides in the following location in the app bundle: <app>/Contents/Resources/_MacOS/CanelaDB/config/config
The idea is that on first run, this folder is copied to the user's Documents folder along with the 'mainstack' as this is writeable location. This works absolutely fine on Mac and Windows with unsigned apps. But seemingly not with stapled apps and that is because the contes of said config file change.
Can anyone offer any insight into how this is happening and why??
many thanks
Stam