Xcode: Problems with getting my App to the AppStore - ios

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.

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.

How can I test a production iOS App Store build?

I'm new to iPhone development and i'm not sure how to test the actually binary that will be sent to Apple. Today I released a build that works great on my local device but the released App Store version did not work and hung on launch.
I'm trying to figure out how I can test my production builds so this doesn't happen again.
I tried creating an ad-hoc binary and saved the ipa to my desktop, then imported into iTunes. The app synced and downloaded but remained dark and said 'waiting..'.
I signed up for Test Flight and it said my IPA was created for production and the sdk could not be found.
Do I need to research ad-hoc builds and profiles? This seems to be getting confusing really quickly and i'm not sure where to start looking/learning.
When you create an archive to submit to the AppStore, it is saved under the organizer (Press Command + Shift + 2 to open Organizer).
You can save the same archive for Ad-hoc distribution as a .IPA file, and then install it using iTunes or TestFlight.
In the Organizer, just select the right archive, click 'Distribute', and select 'Ad-hoc distribution' and sign the IPA with your Ad-Hoc distribution profile (if you haven't created an ad-hoc distribution profile, create one at developer.apple.com, download it and double-click on it to import it to your Mac OS Keychain) to generate the .IPA file.
As long as you re-sign your AppStore archive with an ad-hoc distribution profile, it should install and execute on your test devices.
Follow these steps hopefully it will work
Delete the application from your iPhone.
Create a new Adhoc Distribution provisioning profile, make your the devices you want to run on are included in that profile.
Make sure the certificate associated with the newly created profile has a valid private/public key pair.
After creating an archive, see the build must be created with the newly created profile(From a drop down that comes after archive).
If the problem persists, to verify rename the .ipa to .zip go to payload folder right click .app and show package contents see the embedded profile shows the correct profile and have the devices added.

App Submission: Invalid Binary - Invalid Signature

I am trying to submit an update to the iOS app store. I am going from a Buzztouch app to a Sprite Kit app. I am able to archive the Xcode project and submit it. The app gets to the status of Upload Received but than about a minute later, it changes to Invalid Binary and I get an email saying:
Invalid Signature - Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target.
Once these issues have been corrected, go to the Version Details page and click "Ready to Upload Binary." Continue through the submission process until the app status is "Waiting for Upload." You can then deliver the corrected binary.
I have cleaned out the build directory, rebuilt my release target, and made new provisioning profiles multiple times. All of the Code Signing Identities are set to iOS Developer. Code signing and the provisioning profiles have always been a little bit confusing to me, I could have made some obvious mistakes.
I have tried submitting over 50 times! I find this very frustrating because I have emailed Apple and they got back to me but it was just a link to the dev center with code signing information. I have also spent lots of time searching the Internet to find a solution to this and there hasn’t been a good solution that actually works for this problem.
The only thing I can think of is either because I am changing from a Buzztouch app or it is Sprite Kit.
Here is a screenshot of my code signing:
In Apple developer support there are two additional common causes of the Invalid Signature binary rejection reason,
executable files containing special characters (i.e. non-numeric, and non-alpha). To resolve this issue, change the Xcode target’s Product Name build setting from “${TARGET_NAME} to a string containing only alpha/numeric characters. Let me know if this was the cause of the issue (and the problematic characters) because I file bug reports to fix each instance I find here.
Apple Double Files ("double files") that result from copying the Xcode project uncompressed to/from a non HFS+ formatted hard drive. To check if this caused your rejection: 
A. Run the app diagnostic here: How do I check if my application's signature has been corrupted?
B. Then check the command line output with: List of Signature Verification Failure Root Causes. Double files are diagnosed with a message like:  
resource missing: my.app/._.*
C. From the docs:
The file prefixed with "._" is considered an AppleDouble file and it
can result from copying the uncompressed Xcode project folder onto a
non-HFS+ formatted disk. The AppleDouble files must be removed using
the 'dot_clean' command. The Xcode project folder is the argument to
dot_clean as illustrated below. Note: You can drag your Xcode project
folder from Finder into the Terminal window to automatically fill its
path into the command.
dot_clean /path/to/My_Xcode_Project
(If Terminal can't find the dot_clean utility, download the optional Command Line Tools through Xcode > Preferences > Downloads)
D. After running dot_clean on your Xcode project, create a new app archive (via Xcode > Product > Archive), reattempt submission.
To prevent double files be sure to compress the Xcode project folder to .zip using Finder before transferring it to/from a non HFS+ formatted hard drive. 
This is what I did when I encountered a similar problem with the Mac App Store:
Re-generate the app's Distribution and Development certificates (from the Apple Developer's Certificates site).
Download both certificates and drag them to Xcode's icon (not sure whether it had any impact, but after so many submission failures, I was pretty superstitious).
Re-fresh the certificates and identities from Xcode.
Open Xcode's Preferences.
Go to Accounts tab.
Clicked my account
Clicked the refresh button.
Generate the archive.
Submit the app and clicked on "refresh signing identities" somewhere mid-way in wizard prompts.
As a reference, here is my built settings related to signing. That one worked the last time I submitted the app (which has been in the "waiting for review" state for the past two days now, so I guess it passed all of their automated tests).
Your issue relate with signing failed because of your app didn't sign with recent distribution certificate. Check the following steps:
1) Check your bundle identifier to list out provisioning profile as like below picture. Because It also lead to this problem.
2)You may not using the correct certificates when building your app. Just Delete your certificates in Provisioning Portal and create new ones and update them in Xcode.
3) From your picture, you didn't selected correct provisioning profile. Goto Organizer / Provisioning Profiles / Refresh and allow Xcode to fetch the latest ones. see screen shot to how to do that.
Select correct Provisioning profile.
Select correct code sign.
4) Cleaned up your project.
5) Just clean all your targets . You can even go to /Users/%USERNAME%/Library/Developer/Xcode/DerivedData and delete all of the directories in there.
see this ref
Under "Code Signing Identity" Make sure you have selected your Distribution Cert for the "Release" scheme
Under "Provisioning Profile" make sure you select a Distribution provisioning profile (not an Ad Hoc one)
Archive and distribute, make sure the same cert is selected when submitting (after entering your iTunesConnect info)
After doing all of the above
Menu Bar
try Product->Archive
Then from the organise try resigning and submitting.
Window->Organiser
Select archive and then press distribute (but i'm pretty sure you'll know how that works)
Obviously if you can't do this then chances are you have indeed got something wrong with your signing certificates, more specifically your bundle identifier is likely to be the culprit.
One other option is your app uses services that you haven't set up on developer.apple.com/ios for the app id such as game centre, push notification etc. Good luck
check your launch images . Are they conflicting like 2 images have got same name. Because i have got the similar issue which i solved like this within 10 minutes.
To figure out this problem I just created a new Xcode project and copied and pasted everything into the new project.
In my case the problem was to not ASCII chars in filename (someone did sent us to embed), solution was to do a global search in project:
ls -1 -R -i | grep -a "[^A-Za-z0-9_.':# /-]"
And delete those chars from filenames.

Xcode 5 Error ITMS-9000 Invalid Provisioning Profile

I've downloaded and checked all of my distribution certificates, as well as provisioning profiles. I keep getting this error message:
ERROR ITMS-9000: "Invalid Provisioning Profile. The provisioning profile included in the bundle com.-----.---- [---.app] is invalid. [Missing code-signing certificate.] .....
Read that I need to download the distribution com.----.---- provisioning profile but I only have a APPNAME provisioning profile. Downloaded it anyway and still have the same issues.
I've gone through and downloaded all possible combinations, but still can't get anything to work with application loader. Everything before has worked fine until I had to upgrade to a new MBP.
Do I revoke anything even though it's valid for another 6 months?
AppStore submission has 2 steps:
Build archive (via Xcode Archive command)
Build ipa for submission (via Organizer / Application Loader)
Each of them require certificate, provisioning and entitlements (in provisioning) for separate (but related) use.
You should use the same provisioning for the two steps. If you can’t find the exact old provisioning, you may consider re-archive the app. I don’t know why Apple splits these steps as they are highly related.
I also have this issue.
It seems to me that the key is to make sure that the "product" you are dealing with has been associated with a DISTRIBUTION provisioning profile that has been signed by the code signing identity which has the right to upload items to the app store (typically a company, or an individual developer).
However, the problem I typically face is that the *.app "product" at the foot of the project navigator list (in the 'products' group) is NOT the output of the archive operation. I can tell this from the time stamp. I do not know where the archive operation places its product. (Perhaps someone here can explain how this works).
As a consequence, what I do is I set ALL the provisioning profiles in the 'Code Signing' section of the 'Build Settings' to the DISTRIBUTION provisioning profile. I then "BUILD for RUN". This results in a *.app file in the 'Products' section of the 'Project Navigator' pane that, while it is the result of a "Build to Run" operation, is properly signed for distribution. I can tell that the *.app product is "fresh" by the time stamp.
It is then this *.app product which I compress and deploy using Application Loader.
This seemed to work - today.
(I confess that I am an amateur and I find the provisioning process somewhat cargo-cult-like, and what I write above may be a kind of infantile superstition about what works.)
I had the same error. To fix this you must do the following:
When you "click" on Build, please go to:
Product -> Build for -> Profiling
Your file (.app) are created.
To achieve this archive it should do the next step:
XCode -> Preferences ->
Choose the "locations" option, and you will get a screen with different options and routes. Select the route: Derived Data.
You take the app file, and the other file App.dSYM generated in the default folder "release-iphoneos" ... to update these two files in iTunes, you should compress these two files and upload with "Application loader".
Works fine, good luck
You should also download the certificate from Apple and also put p12 of this certificate (=private exported certificate key) file to your keychain.
This is my proble to upload my app ..
I try to more then 10 time to upload my app but not accept itune store
then i take this process and after accept my app
after then i same change as following here
In plist file are show here
then i take change to here for bundle name is wrong and "test code" space are remove
after then change is
Then I upload my app in itune and accept itune store
really this is works. thanks
Just clean all the things.
Check the developer/distribution certificate and mobile provision profile properly created, if not then revoke them from developer account and create all new one.
Remove all profiles from /Users/yourSystemName/Library/MobileDevice/Provisioning Profiles
Now, Export all certificates and keys from your keychain and Save them as backup for using them again.
Now install your developer/Distribution certificate first and install provisioning profile. And upload your application. This is tested way and should resolve your issue. Thanks.
Just clean your project files - that worked for me after receiving this error.

IOS Uploading App to appStore errors

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.

Resources