App Store Validation failed (409)

In the latest release of my app, I received a "Validation failed (409)" notification and cannot release my app. The full context is : Validation failed (409) No architectures in the binary. Lipo failed to detect any architectures in the bundle executable.

The only thing I did that lead into this problem is, I changed the display name of my app. (in plist file, CFBundleDisplayName)

I have tried different times with different configs of my app, Now the app was rejected even I switch back to the old branch which is succeed last week.

The way I approach issues like this is to work backwards from the contents of the built app to understand why you received an error message, and then keep going backwards from there to see why the app was built that way.

For this error, you need to inspect your built app bundle. You can do this by going to the Xcode Organizer, selecting the version of your app receiving this message, right-clicking, and selecting Show in Finder. You'll see a .xcarchive package in Finder, and you select this, right-click, and select Show Package Contents.

Inside of this Xcode archive package, you'll see the folders Products/Applications/YourCoolApp.app. Right click on your .app and select Show Package Contents.

We're now looking at the inner contents of your app bundle.

Take a look at the contents of your Info.plist file inside this bundle, and look at the value of the CFBundleExecutable key — the value of that key is the file name of your main app binary. Does that file exist?

A Missing Bundle Executable

If that executable file doesn't exist, then you found the source of the problem — if the executable file here doesn't exist, then of course the validation of your app can't find any CPU architectures contained within a non-existent file.

You should look around the root folder of your .app bundle to see if you can spot the executable, if it exists, as a different file name. Depending on how you renamed your app, this is what may have gone wrong.

In your Xcode project, take a look at the PRODUCT_NAME build setting — the value should be $(TARGET_NAME), which will resolve at build time to the name of your Xcode target. This value is then used during the build as the file name of the main app executable, and also to fill in the value of the CFBundleExecutable key inside the final app's Info.plist file.

There's one other things to check in Xcode, mainly for projects created many years ago — if there's an Info.plist file in the Xcode source code (not to be confused with the one you inspected earlier), check if it has a CFBundleExecutable key. If so, make sure the value is set to ${EXECUTABLE_NAME}, which is determined at build time and related to the value of the PRODUCT_NAME build setting that you verified earlier.

If you rebuild your app after fixing these issues, you should inspect the new Xcode archive using the same steps as before so that you see that there's a CFBundleExecutable key in your built app's Info.plist file, and that the actual executable file inside of your app is present with the same name.

The Bundle Executable Exists

If you skipped the previous section because you found there was a bundle executable in your app bundle, and its filename is identical to the value of the CFBundleExecutable in your built Info.plist file, then you should inspect the contents of the binary with lipo in Terminal to see what CPU architectures are inside this executable:

% lipo -archs /Path/To/YourCoolApp.xcarchve/Products/Applications/YourCoolApp.app/YourCoolApp

For a correctly built app, the output of that command should be arm64, with no additional values listed. If you get any other output, review that the Xcode project build settings for CPU architectures are correct. TN3117 provides a good reference of what build settings to look at, what values they should be.

Once those settings are set to the values defined in TN3117, you can rebuild your app, and inspect the newly built archive with the lipo command again to confirm that your changes have resolved the problem.

— Ed Ford,  DTS Engineer

App Store Validation failed (409)
 
 
Q