Mac app issues
-
@russ I know it's been months, but I was recently working on an unrelated app and have realized a likely reason why TriggerCMD login item would get added on first run even if the app was already in the login items.
The first time a Mac app runs when its been downloaded from the internet, it is quarantined by the system.
An app can check if it's running in quarantine because its execution path will include a folder called "AppTranslocation".
A simple fix could be to detect if the app path is in this qaurantine folder and, if so, check if the app exists in /Applications. If it does, then use the /Applications path instead of the path the app returned for itself for the login item.
If for some reason a user didn't install it in /Applications then there's no loss in falling back to waiting until the second run.
-
@pico, that's interesting. I'll experiment with that. I hope it works. Thanks for the suggestion.
EDIT: I worked on it for a while and didn't get it working. I couldn't get it to add the Login item while it's quarantined. I think that's a mac security feature for apps downloaded outside of the app store.