0x0
0x0

Reputation: 373

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.

Upvotes: 0

Views: 262

Answers (3)

0x0
0x0

Reputation: 373

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.

Upvotes: 0

wottle
wottle

Reputation: 13619

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).

edit scheme option

Click that and choose "Edit Scheme..."

Under the Run section, there is a setting for Build Configuration.

Build configuration screen

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).

Device selection options

Once you've done that, run your build again and the ipa created should be built with your release configuration and signed correctly.

Upvotes: 1

Saheb Roy
Saheb Roy

Reputation: 5957

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.

Upvotes: 0

Related Questions