I'm trying to validate my OS X application's archive, but I keep running into the following errors.
Bad CFBundleExecutable. Cannot find executable file that matches the value of CFBundleExecutable in the nested bundle MySafariExtension [My-Company.MyMacApp.pkg/Payload/MyMacApp.app/Contents/PlugIns/MySafariExtension.appex] property list file.
An unknown error occurred.
Bad CFBundleExecutable. Cannot find executable file that matches the value of CFBundleExecutable in the nested bundle MySafariExtension [My-Company.MyMacApp.pkg/Payload/MyMacApp.app/Contents/PlugIns/MySafariExtension.appex/Contents] property list file.
An unknown error occurred.
When I explore the contents of my app I can see the the nested executable in MyMacApp.app/Contents/Plugins/MySafariExtension.appex/Contents/MacOS/MySafariExtension
But when I install the app from a .pkg file the extension does not show in Safari. I still see the executable in the same path. I looked at this question without any luck figuring out what's going on.
Resources are scarce for Safari App Extension so hopefully some clarification as to what's going on here will help a lot of people! Thanks in advance.
UPDATE
After installing the package, if I click Allow Unsigned Extensions
in Safari I can see the extension in safari preferences. So maybe there is an issue when signing the Safari App Extension. I'm using the same team/cert that is signing the OS X app though.
Turns out the issue was with the SafariAppExtension Info.plist. I mistakenly had it targeted as a member of the SafariExtension bundle and that was causing the issue.