Xcode App Store Connect Operation Error: Could not find or load main class 12

Viewed 1229

I'm trying to upload my build to the App Store using Xcode 12 and I receive the error message:

App Store Connect Operation Error

Could not find or load main class 12

The app is built with SwiftUI. Has anyone faced a similar issue?

3 Answers

Any chance you had renamed the Xcode executable?

I originally experienced the same behavior (I had renamed Xcode.app to XcodeGM.app). The issue went away after I closed Xcode & renamed the executable back to Xcode.app.

Note that my app is swift + some objc so I don't think that the language is a factor.

I had the same problem... It was because I had several versions of Xcode on my computer.

Make sure the current version of Xcode you are using is titled Xcode and not Xcode-beta, Xcode-2, Xcode 2 or anything other than just Xcode.

You can change the application's title in the Finder (you may need to rename the old version to something else first).

I had the same problem. It was because I download Xcode from browser and did not add Xcode to the applications. I add it and then run xcode from applications, app successfully uploaded.

edited:

I just simply drag Xcode(that I downloaded from browser) to the applications folder enter image description here

Related