We have an enormous legacy based application which has been ported from Windows. The build system is make and has literally hundreds of .cpp, .c, .h, .m, and .mm files.
I've gotten it successfully running on MacOSX and managed to build nice installation packages using the "Packages" package which have been sucessfully signed, notarized and stapled, and install nicely on "clean" Machines.
The .app/bundle format has been lovingly laid out to match the app.
Now, I'd like to use Testflight to deliver the app, and eventually the Mac App Store.
In my first attempt, I tried xcrun altool --validate-app .. to validate the Packages built app. It, not surprisingly, failed spectacularly because I guess it hasn't kept up with however packages need to be build to pass --validate.
(It's an amazing tool though)
So, I decided to use pkgbuild and productbuild to build the package:
pkgbuild --root App_name.app --identifier com.mycompany.myapp --sign "Developer ID Installer: ...." --scripts Scripts --install-location "/Applications/MyApp.app" Distribution.pkg
productbuild --synthesize --package Distribution.pkg Distribution.xml
productbuild --distribution Distribution.xml --sign "Developer ID Installer..." --package-path . MyApp.productbuild.pkg
xcrun altool --validate-app -f MyApp.productbuild.pkg -u username --type macos
This fails with:
{
NSLocalizedDescription = "Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in \U2018MyApp.productbuild.pkg\U2019.";
NSLocalizedFailureReason = "Unable to validate your application.";
}
I confirmed I have an info.plist and if contains a valid CFBundleIdentifier, and I extracted the package using Pacifist and confirmed it's there, too.
I'm at a loss. Converting the package to XCode would be a monumental effort right now, and I'd really like to avoid it.
Is there something I'm missing, or should this work?
Thanks!