IOS Uploading App to appStore errors - ios

I am trying to upload an iOS application to the App Store on Xcode, but for some reason after it passes validation the application is stuck on "Your Application is Being Uploaded". and when i have tried to edit schema -> build configuration change it to release then get the .app and compress it to upload it with application loader it gives me an error when i run the code in release "A valid provisioning profile for this executable was not found." (although its working on debug perfectly) iam sure that code signing working 100% i have put the developer profile under debug and distribution profile under release
NOTE:my project contains two projects and i have read to change the dependent project to skip install YES and i have done this to avoid errors, any thoughts ?

You need to Archive the app before release, and make sure the Archive configuration is set to Release.

Related

Xcode couldn't find any iOS App Store Provisioning Profiles

I'm using a beta of Xcode 9. I've archived my iOS Project and whenever I try to validate it, I get this error for every one of the targets in my app:
And I'm getting this error for every target like I said. The provisioning profile for each of the targets is an Xcode Managed Profile. What am I doing wrong?
You should try two options:
1) In Developer.Apple.com create a distribution provisioning profile, download it, and select it. Then re-archive your project and validate. This should dismiss the error.
2) If option 1 doesn't work for you, click the Export button beside archive and save your .app file to your Desktop. Then open Application Loader (In Xcode, click Xcode > Open Developer Tool > Application Loader). Enter your credentials, then upload the app using the .app file you generated and saved to your Desktop.
Note: Sometimes Xcode shows fake errors when validating and Application Loader will ignore those and allow you to upload a build successfully.
When Application Loader is finished, you should then be able to see your build in iTunesConnect after about 15-30 minutes.
It happened to me when I wanted to make an enterprise build but I accidentally selected to upload build to App Store.
Mine worked on a simple second attempt with no changes or rebuild.

Xcode: Problems with getting my App to the AppStore

I am trying to upload my app to the AppStore with Application Loader
I tried to archive my project in order to generate the "ipa" file for Application Loader and the archive process got stuck at "Compiling swift sources" for almost 5hrs; I took to the response I read from - Xcode 6.0 taking forever to archive my project and I successfully generated the .ipa file with iTunes but while trying to upload with Application Loader, I get the error:
ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning
profile included in the bundle com.youngbobby.MyAppName
[Payload/MyAppName.app] is invalid. [Missing code-signing
certificate]. A Distribution Provisioning profile should be used when
submitting apps to the App Store. For more information, visit the iOS
Developer Portal."
I have generated my keychain certificate and my distribution provisioning profile and I still get that error during submission. Do you think the error is related to the method I used? Do I have to maintain the traditional "archive" method? If yes, what would be the fastest way to archive and generate my .ipa file? I have tried enabling Whole Module Optimisation as suggested here all to no avail.
Any help would be greatly appreciated.
EDIT
I did a quick check on why my archive process was stuck at "Compiling swift sources" using "cmd + 8" and I noticed that my local Data store swift file which is a long Dictionary of type [[String:Anyobject]] was the cause of the problem. I can't really explain why it is so but I want to maintain the traditional method of archive and send because it seems using iTunes to generate my ipa file does not agree with my provisioning profile.
When you are building the project, it is still building for debugging, hence it is using the development provisioning profile.
Before you do the build to create the .app, go to the Scheme (just to the right of the stop button, to the left of the device on which you are running).
Click that and choose "Edit Scheme..."
Under the Run section, there is a setting for Build Configuration.
Change that from Debug to Release (if you are using the standard build config and you have configured the Release config to use your distribution profile and signing identity).
Close that window, then change your device to the generic "iOS Device option (make sure you don't have any devices plugged into your Mac).
Once you've done that, run your build again and the ipa created should be built with your release configuration and signed correctly.
You are probably using a Development Provisioning profile.
Go to your dev center.
Create a new provisioning profile, select App Store and select your bundle ID. create that and download it.
Control drag that provisioning profile to Xcode, Change build settings in target and project to the one you downloaded now and as Distribution.
Compile and build your app. Archive it and start uploading it to App store.
That should do it.
P.S do select your team correctly before you configure your build settings.
EDIT
If you already have done these steps just revoke the old one and create a new Provisioning profile and check.
Finally got my problem solved.
It seems all I needed to do while my app was compiling swift sources was to WAIT
I reduced the amount of Data in my Datastore file and the Archive process took less than 10 seconds to archive.
Pity, Xcode does not show a Timer to calculate how long it would take to archive a project and looking at the progress bar does not really guarantee that the process is working as in my case was a relatively huge one. So, maintaining the huge data I had, I simply had a 6hr nap and by the time I was up, my project was successfully archived and all other processes worked seamlessly :)
If you find your project 'stuck at compiling swift sources' during Archive Process, all you need to do is Wait.

Trying to Upload App to Mac App Store, Invalid Binary?

I'm getting ready to upload my Mac application to the Mac App Store, I've created the Application certificate and the installer certificate. When I go to validate my app, Xcode says the app has been validated and is ready to upload to the store. Every time I upload my app to iTunes Connect everything goes smoothly and the app uploads. Then the problem starts, in iTunes Connect my app state is listed as "Invalid Binary" and I receive an email from iTunes Connect saying my app was improperly signed. I really don't think I'm doing anything wrong. Right now, I have the project and the target in my app code signed, is this necessary or do I just need to sign one of them? Also, I've been having a strange issue that when I code sign the target my app builds but it doesn't run. It does not cause any error though. When only my project is signed, the app runs normally. I'm pretty confused on all of this so any help would be greatly appreciated. This is my first App Store submission so I'm excited to get an app up for sale.
Thanks for your time,
Sam
Edit: Just tried uploading the app with application loader. It uploaded to iTunes Connect but I still get the same invalid binary error. Also, I shared my archived application as a .pkg and tried to install it. I got an error saying that "This application cannot be installed on this computer". Any idea why this would happen?
You can do a:
codesign -dvvv *.app
on an app bundle directory from the Terminal command-line to see how the app you are trying to upload is signed.
Any Target setting overrides the identical Project setting for that target build. You should use a different build configuration for Distribution than for Release or Debug and running the app.

Best way for uploading binary Application Loader or Xcode organizer

I want to know best way for uploading binary to itunestore. Is it through Application loader or using Xcode organizer archive build, validate and submit.
There are significant differences which I've tried to list below (as of Xcode 6.3.2 - Jun 2015):
Xcode Organiser
The application to submit must be selected from the list of your locally archived apps (you cannot browse to a specfic file)
Gives option to 'Validate' your app before submitting
At validate/submission time will download/sync all the provisioning profiles associated with the selected Apple developer account and re-sign/re-embed the application with the appropriate one (it does indicate which one's get selected but you cannot override this)
Gives option to automatically upload the debugging symbols that are included in the archived application
NO upload progress
(Gives the option to Export to an *.ipa which could be used with Application Loader)
Application Loader
Requires you browse to an *.ipa file for its input
No option to Validate before submitting
Uses the provisioning profile that is already embedded in the *.ipa file
NO way to upload debugging symbols
Gives upload progress
You don't use Application Loader in Xcode 4 anymore. You can only upload through the Xcode Organiser...
As zekel mentions below, you can still use Application Loader to submit your IPA files. The Xcode Organiser method is useful if you are building the app yourself and want to validate and submit from one place. Application Loader method is useful if you have the IPA signed to the correct certificates installed on your system.
After using both methods, Application Loader gives you more indication of progress status which is useful if you are on a slow connection.
A sole developer or small team might just submit directly from Xcode, especially for a smaller project. But for a larger team, more complex project, or an automated build system, submitting from the Application Loader is easier.
It's a matter of workflow more than anything else.
I mostly use Application Loader it is best because:
It just requires you browse to an .ipa file.
We need not to worry about the provisioning profile that is already embedded in the .ipa file.
NO way to upload debugging symbols
We need not to Validate before submitting.
We can see the progress bar where and what is the status of app uploading.

Problems with code signing for ad-hoc distrubution for iPad App

I've been trying for a weekend now to install my application via ad-hoc means for beta testing and demo purposes. I can install from Xcode just fine, but when I try and take the app file and place it into iTunes, then try and synch, I keep getting the error "The application was not installed on the iPad because it is not signed".
I have gone through all the steps. We went to the provisioning portal and added all the devices. We then downloaded a distribution provisioning profile and installed that onto the development computer. We created an Entitlements.plist file, though there was no get-task-allow attribute, so I had to add in my own. I cleaned the targets, restarted Xcode, built the application under the ad-hoc profile with the Entitlements.plist set for the Code Signing Entitlements.
I take the app file that's generated and drag it into the Applications area of iTunes, hit synch, and I get the error.
I know I am doing something wrong, missing a step, but it must be a convoluted, obscure step that Apple doesn't have in their documentation. So can anyone see the problem in what I'm doing? If you could, let me know. Thanks.
Ok. Yay. Figured this out after some more hair-pulling.
Apparently, the build you follow is important. I kept testing and building to the Simulator folder, and this is wrong.
To deploy to a device, you should clean all targets and then build specifically to the device. You don't have to run it or have something plugged in, but you must build to device. The APP that is produced is different for simulator as it is for device.
Did you set the "Code Signing Entitlements" build setting in your target to "Entitlements.plist"?

Resources