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

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?

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

Related

Xcode 8 Beta (null) was unable to service the request

I have an app that worked fine in the released version of Xcode. I downloaded the beta and after I fixed all the little changes I ran it and it worked. I just came back and ran it again and I get an error saying
The request to open "com.matthewhsingleton.Smoke" failed . (null) was unable to service the request.
I have quit Xcode and reopened it, I have restarted my computer, tried different iPhone simulators and all produce the same resulte
My error was similar, instead of "(null)", the message was: "SpringBoard was unable to service the request"
Restarting the simulator worked for me.
After reading #Droppy suggestion I read the thread and it is a common issue. To solve it is as follows
Problem solved for by an Apple Engineer in the lab. It's an issue they're working on. The bottom line was that when I copied Xcode to Applications folder, there was a bit set on it and that was preventing it from communicating with the simulator.
To fix it:
Copy-paste Xcode-beta.app from Applications folder to somewhere else, e.g. Documents folder.
Delete Xcode-beta.app from Applications folder.
Move Xcode-beta.app from Documents to Applications folder again.
Seen here https://forums.developer.apple.com/message/143094#143094
I had 2 versions of Xcode installed. Xcode 7 and 8. I resolved this issue by setting the command line tools to Xcode 8 in preferences. Open preferences -> Locations -> Command Line tools. Set that to Xcode 8.

Sticker Pack Interface Builder Storyboard Compiler Error Group

WWDC 2016 came up with a new concept of creating Sticker Pack & push it to store from iOS10 onwards. I downloaded XCode 8 Beta, & tried to create a sticker pack app for the message extensions.
I did everything as explained but on building the project I am getting error
Interface Builder Storyboard Compiler Error Group
Strange thing is for Sticker Pack we don't need to write any code, but still it is showing error of Interface Builder.
I am getting this error under build time
I have also reported this to apple, but would like to know if anyone has any idea to remove this & execute my code.
In my case, I rename application xcode-beta to xcode 8.0b in finder. After what IDE cann't open any xib and storyboard.
Solution: don't rename app.
I found the solution:
When you will download the Xcode-beta & when you will unzip the .xip file, the xcode-beta will present in same folder where the min file is downloaded, strange thing is that apple is not automatically pushing xcode-beta to Application folder.
If you are experiencing the same issue, push the xcode-beta executable to Applications folder, & execute your project from there & you will find that it will work like charm.
Got it working finally. In my case, Xcode was there in the Applications folder, but for some reason it was named "Xcode-beta 2". Renamed it to "Xcode-beta", restarted the application, cleared derived data, and it started working.

xcode sumbission the application you have selected does not exist

Has anyone seen such an error ? What does it mean ?
It was an update of already existed app.
Xcode automatically manage provisioning profiles.
Xcode 6.3.2
OS X Yosemite 10.10.3
try to use Application Loader (https://itunesconnect.apple.com/apploader/ApplicationLoader_3.0.dmg)
Had the same problem with Xcode 6.4, but went thru using Application Loader
Or you can open it from Xcode -> Open Developer Tools -> Application Loader
I finally got my binary uploaded to iTunesConnect.
Archive your app in Xcode as normal. (I'm still using 6.2)
In Organizer, select the archive, Export, select Ad Hoc or App Store. This saves an .ipa file.
Open AppLoader, select "Deliver Your App", click "Choose", select the .ipa file from step 2. Follow the prompts.
Notes
Going this route, you won't need to recreate the In-App-Purchase that AppLoader expects when you start from scratch.
I got a warning that the API analysis file being too large, but I think that can be safely ignored.
The uploaded binary has a warning that the entitlement for TestFlight Beta testing is missing, but I don't use that, and it can also be ignored.
If you have xcode < 7.x then you are going to face this problem..What fixed for me was building the project from xcode 6.x(mine 6.4) and then opening xcode > 7.x (mine 7.0) and then uploading app from there...
Note:You dont need to build app from xcode 7.x . Just open the xcode
and select window organizer...select the build and upload...
In my case firstly I installed last Xcode version 7.1
In my application I used GoogleMaps.framework, I opened it's bundle and removed "Executable file" and "CFSupportedPlatforms" from Info.plist, then I did the same to all my added frameworks
Finally fixed this problem, first you need to upload it with Application loader. Cause when the error happen, you can have more detail about it.
This is the Issues I got, and I found that the version numbers are the same as those library in cocoapod or other library. To solve this. Go thought all the info.plist. And change the Bundle versions string, short, and Bundle version to higher value, in my cause version number > 1.3.5.
hope this can help :D
Im stuck with the same issued, solved by download xcode 7 and submit app with it, error gone!. Hope it help everyone!.
I was using atool from a shell script to verify and upload builds to TestFlight, then I found this thread and decided to follow #bwang's advice to use the Application Loader, and it worked!
I didn't have to download ApplicationLoader because it already comes bundled with Xcode 6.4, I just opened Xcode, then from the Dock I right clicked the Xcode icon, and then I selected "Open Developer Tools > Application Loader".
I hope Apple fixes this issue soon, because its breaking many CI tools like jenkins when using it to upload builds using atool.
Encountered the same issue, tried all the options mentioned but no luck, Finally could solve the issue by modifying 3rd parties info.plist
Search all info.plist files in your project and see where each and every plist has "Bundle Identifier". If not add it and submit via application loader.
When Xcode submission isn't working, upload using Application Loader instead:
Archive from Xcode.
Save the resulting .IPA file.
Upload with Application Loader.
That solves this issue and many other times when Xcode upload isn't working. Additionally, if it still fails, it will often give you a more detailed error message output.

Non-public selectors in App?

I'm trying to submit an app via iTunes Connect. Xcode is throwing the following error:
iTunes Store operation failed.
The app referenced non-public selectors in Payload/Inflation Calculator.app/Inflation Calculator: allocBatch:withEntity:count:,allowWithEntity:, fastIndexForKnownKey:, indexForKey:
I have no idea what "non-public selectors" I would be using, because I stuck pretty close to the book with my code. Anyone have any ideas?
Code for the view controller (only .swift in my app):
https://gist.github.com/Calda/aefc2f19bae5f3cf2e54
EDIT: As a reference for the future, I confirmed with iTunes Connect Support that this was an issue with iTunes Connect and not a problem with my project. For anyone experiencing this same problem, my best advice would be to wait and try again later.
I had the same problem. I could not submit some of my apps because using non-public selectors. I also tried using Application Loader, but still the same error message
To solve the problem I installed Xcode 6.0.1 - it is still available to download here:
https://developer.apple.com/downloads/index.action
Before installing i moved the old Xcode to trash.
I can now submit any app.
I solved this by doing the following:
edit: I don't think the first step is needed
1) Cleaning the build folder (Hold Alt, Click Product -> Clean)
2) Deleting the Derived Data (Organizer -> Projects -> Select your project -> Delete Derived Data
The API differs between iOS 7 and iOS 8.
I got my App validated by switching to Deployment Target "8.0" - built with XCode 6.1.
It might not be the solution to all you guys but you could give it a try.
Might have happened to me because I recently started using UIAlertController -> seems to be an iOS-8-Feature. On iOS 7 this would be UIAlertView. So if you use some nifty new features they might not have been available with previous iOS versions - thus non-public API.
For the same app, I got this error today on XCode 6.1.
I submit the same app (little variation) 2/3 days ago with XCode 6.0.1 without any error!
Just updated XCode 6.1 and trapped with this error.
I switched back to XCode 6.0.1 and it do not have any problem with the submission. No non-public API usage error. I just download the dmg file and rename xcode.app to XCode_6.0.1. So it coexists with XCode 6.1.
I delete all derived data for xcode projects
/Users/{user_home_folder}/Library/Developer/Xcode/DerivedData
And app was submitted without any problem
I was running into the same issue that looked like an issue on Apple's end. I submitted the same app (v 1.0.1) yesterday, then rejected it, then submitted again today with a one-line code difference. Today's submission got rejected for the reason mentioned above.
I was able to solve this, using the latest versions of everything, by changing the version # of my app (e.g. 1.0.1 -> 1.0.2). Think this worked as I had a previous submission sitting in the queue for my older version that I had rejected, YMMV.

Xcode 6.01 Archive validation error: Invalid Segment Alignment

I have been working on an iOS project solely in Xcode. Deployment target is iOS 8.0. After updating to Xcode 6.x, building and testing on my iPhone 5s and iPhone 6 as well as the simulators works fine. However, when I create an archive and want to validate it, I get the following error:
Archive validation failed due to the issues listed below.
iTunes Store operation failed.
Invalid Segment Alignment. This app does not have proper segment alignment and should be rebuilt with the latest version of Xcode. Please contact Developer Technical Support if you need further assistance.
I have googled for the past couple of days and it seems that this problem mostly occurs in connection with other development tools, especially from Adobe. However, I have only used Xcode for development.
This is what I have tried so far:
Reinstalling Xcode 6.01
Turning Autolayout on and off
Set target from 8.0 to 7.1
Just submit the archive (no error message, but new version is not found in Testflight)
Unfortunately, none of this has worked. My questions:
What does the error message want to tell me?
Has anyone any idea how to solve this problem?
Thanks a lot!
I found the solution. XCode seems to have lost track of two of my files (XX.h and XX.c) This file name (with a .o extension) was in the summary of the 1st step of the validation.
I removed the references to both files, added them again and everything works fine. Hope that helps someone!
(Edit: sorry, cannot flag this answer as the right answer, will do so in two days when stackoverflow lets me)
More detailed instructions:
When pressing "Validate" in the Organizer, look at the "Summary" dialog that pops up
If there are any .o files listed in addition to your app, go back to Xcode and remove the corresponding .h AND .m files from your project (removing the reference is sufficient)
Re-add them by dragging and dropping them back into your project
Recompile and it should work (assuming you're not using Adobe Air components in your app)
(thanks a million for this post Fynh, your fix made it finally work for me!)
In my case I was submitting an app that include a framework I had built that was a universal framework - created using lipo (for use with both device and simulator).
After replacing the universal compiled framework with device compiled framework, validation was successful.
To fix this bug I had to go Targets / Build Phases / Expand Copy Bundle Resources and remove the empty.cpp file (my error was about a empty.o file)
Hope this helps someone

Resources