Hello
I'm uploading the first build of my app to the Mac App Store, but Xcode archive validation is failing just before upload with the following error:
Presenting: Error Domain=DVTFoundationNSBundleAdditionsErrorDomain Code=1 "Couldn't find platform family in Info.plist CFBundleSupportedPlatforms or Mach-O LC_VERSION_MIN for AbstractMemory.o"
UserInfo={NSLocalizedDescription=Couldn't find platform family in Info.plist CFBundleSupportedPlatforms or Mach-O LC_VERSION_MIN for AbstractMemory.o}
I've successfully built, tested, archived, validated, exported, and run several builds of this app using the Developer ID workflow (not the MAS workflow), so AFAIK there's nothing wrong with the application code itself. But something's breaking in the final stage of app validation - and there's not much documentation on why this is happening.
Some background:
- This is a Swift Mac app that uses NSTask to call a third party *nix program (the kind that you would normally invoke on the command line).
- The program binaries and dependencies are embedded in the app's Resources bundle for portability.
- Some parts of the third party program - and its own dependencies - are native code compiled by the project authors (not me).
- AbstractMemory.o is one such dependency. There are many more!
- The third party program is NOT an Xcode framework - it's just a *nix utility, and totally unaware of Xcode. This makes most of the (very few) suggested fixes out there (like putting an Info.plist inside the program's folder) not applicable.
- The corresponding app record is set up and ready to receive archive uploads in iTunes Connect, so there's probably nothing wrong there.
- During archive validation, Xcode seems to recognise native code parts of the third party program and treats them in special ways: unlike, say, a README file (which it just passes through), in the archive validation dialog it lists all of these .o, .a, .bundle, and .dylib files just underneath the main application's binary. This may be contributing to the problem - I do not want Xcode to treat these things specially, I just want it to pass them through transparently into the .app product.
Build system:
- Mac OS 10.11.6
- Xcode 7.3.1
- Mac OS SDK: *Probably* 10.11.3 but I don't know how to test for sure.
- For what it's worth, NSFoundationVersionNumber currently resolves to 1259 on my system.
As a first port of call, I have tried putting CFBundleSupportedPlatforms into the minimal plist below and putting that file in various places in the third party program's folder, cleaned, and rebuilt, but it has not worked:
<plist version="1.0">
<dict>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
</dict>
</plist>
I have also posted this question over at StackOverflow, but haven't had any luck yet: http://stackoverflow.com/q/39193295/1475135
So... does anyone know why archive validation would fail in this way, and more importantly how to solve it?
Regards,
Chris K