I have an application that I have been developing for some time now. Recently launching the application via a double click presents a dialog that says \"You can\'t open the
The problem is likely due to an invalid CFBundleExecutable property value in the Info.plist
file you are copying into the application.
In Xcode projects the default value for this property is a special variable (placeholder) value (${EXECUTABLE_NAME}
) that is expanded (replaced) when the build system builds the application. Are you sure you need to copy this file manually? Maybe you can add a script build phase that makes whatever changes you need after it has been expanded and copied into place by the normal build process.
While you are at it, you should check for other placeholder values in the file. It is likely that you will need to fill in CFBundleName
(others may also be necessary, depending on your application type).
OK, some (more) shots in the dark.
./RepoWatch.app/Contents/MacOS/RepoWatch
to run it manually, are you using some sort of completion or filename generation, or are you typing it all in (especially the filename of the executable)?
Info.plist
. Try ls -w /path/to/RepoWatch.app/Contents/MacOS/ | xxd
to look at the bytes for anything non-ASCII.plutil -lint /path/to/Info.plist
give you an “OK”?@
after the permissions in the ls -l
output indicates some xattrs. These could be harmless, but have you looked at which ones are there with ls -l@
?
(cd /path/to/RepoWatch.app/Contents/ && mv Info.plist Info.plist.save && cat Info.plist.save > Info.plist)
to get a copy without the xattrs and test with it..save
above) to see if you can cause a different error message that might help indicate the problem.Building on the answer that @smokris posted:
The problem seems to be with your app's registration in the Launch Services database. There is no need to rebuild the entire database. To force-update the entry for your app (specifically), use lsregister
with the -f
option:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f MyApp.app
I was having the same problem you describe, and this worked for me. Thanks, @smokris!
Project Menu > Set Active Executable
Rebuilding the Launch Services database solves this problem for me.
Try executing the following command in Terminal:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user