Application failed to be exported as an app

Hi!

We use to have several workspaces for our SDKs, one of them containing a test application. Everything worked fine.

We decided to "merge" all SDKs in one workspace. I create a new workspace, added all SDKs and application inside and made all the required changes. Everything's good, we can generate our XCFramework and run the test application on the simulator. But when I archive the application, it is now exported in an "Other" section of the organizer instead of the original app (bundles identifiers are the same, already checked). I compared with FileMerge the xcproject files from before and after the merge, there is no significant difference between the 2. I compared also the xcarchive folders, and it seems that the archive is now missing the ApplicationProperties key inside. If I add it manually, I can now generate an ipa or send it to testflight.

I checked with ChatGPT (just in case), but everything it asked me to check was fine (bundle ids, bundle versions and build number, Bundle os type in info.plist, custom xcconfig (same issue without them)). I'm pretty stuck here :-/

Thanks for your help

Answered by DTS Engineer in 814630022

The standard cause of this problem is that your your Xcode archive contains more than just a single .app item. See TN3110 Resolving generic Xcode archive issue.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

The standard cause of this problem is that your your Xcode archive contains more than just a single .app item. See TN3110 Resolving generic Xcode archive issue.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

@eskimo as always ❤️ I'll have a look at the article, thanks

Today I archived my project and exported it as an app, so I could use it on my machine. Then I set the appname>build to any Mac so I could upload it to the App Store. It started to archive it as other items. I literally didn't change anything except to build it for Intel and Apple silicon. I have been archiving the app for years with the same project settings - I didn't change anything. I have carefully studied your advice and the articles you cite about this and none of the suggestions on these have helped. This sure looks like an XCode bug to me.

I didn't change anything.

OK. That’s clearly a different issue than the one being experienced by KvotheAlThor, who definitely did change something. I recommend that you start a new thread about it, using the same topic and tags as this thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I solved the problem. I control-clicked on the archive in the organizer window to show it in the finder. It’s a .xarchive bundle. Control clicking on it shows a pop-up menu with the option to show the package contents. the package contains three things: a dSYMs folder, an Info.plist and a Products folder. The Products folder contains an Applications folder. This folder has a copy of the application and an appname.docarchive. Double clicking on the .docarchive opens the developer documentation with my application shown in the left side bar and a list of the Swift classes and functions that I implemented in my Objective-C application. So this looks like something that Xcode did when I added swift objects to the Objective-C app with a bridging header. When there’s a .docarchive in the Application folder Xcode thinks it’s an type other.

Setting the target build setting in Document Compiler - Options > Build Documentation During ‘Build’ to NO- fixes the problem.

Application failed to be exported as an app
 
 
Q