App and CLT have the same Team and Bundle Identifier.
The CLT sends an apple script message to the app using SBApplication:applicationWithBundleIdentifier
First strange behaviour - Running app from XCode (Product -> Run)
If I launch the app from XCode (for debug purpose) and the CLT from terminal window I obtain the error
Code Block failed to get scripting definition from .../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug/my.app; it may not be scriptable
If I run the app from Finder (double click it) and the CLT from terminal window everything works fine
Obviously both App and CLT launched are the same, the CLT is inside the Contents/Resources's App directory
Why launching from XCode doesn't work????
Second strange behaviour - Running app from another computer
The app must be distributed from Mac App Store but for test purpose I notarize and copy it to other computers.
If I launch the notarized app from /Applications everything works fine
If I launch the notarized app from another path (e.g. /Users/dave/My.app) the command line tool bundle identifier is nil
Is this the normal behaviour?