Thursday, March 24, 2011

How to create distribution build with XCode 4 ?

1. Open XCode with your code of the application which you want to upload.

2. Select your project and under configuration press + and duplicate Release Configuration.

3.  Rename the release duplicate to Distribution


 4. Set the command-line builds to Distribution from the drop down menu as shown below.

5. In the Build Setting: You need to choose the provisioning.

See HERE for how to create provisioning file  for distribution

6.  You can set the product name of your app as shown below.(The name with which your app will appear on App Store).

7. We need to open the info.plist file and change the bundle name to the bundle ID string to com.reetu.youbudget  which we created on App Store for this application.
See here how to create bundle ID ?

8.  Now you select the target of the application in the XCode. you will be able to see updated Bundle ID in the identifier field as com.reetu.youbudget  in the Summary Tab as shown below.

9.  In the Build Settings Tab, you can change the product name to correct product name.

10. Now click on the dropdown present to the left of Breakpoints to see the pop up as shown below. There you select Edit Scheme.

11.  This will open a new window as shown below, you need to select the archive on the left most menu. Change destination to iOS device.

12.  You need to change build configuration on that same window to Distribution as shown below.

13. Then you have to choose Product > Archive.

14. You will be asked to allow the code signing to happen, you press Allow.

15. After you have the archived successfully, your organizer will open as following screenshot. If it does not open, then you can open it from top menu of XCode Window > Organizer.

16. Next you validate by validate button on the screen above, then you will asked to put in your itunes connect account info.You may actually get an error while authentication if no application is available on App Store with status ready to upload binary. Hence you need to create the app on App Store first. You can check the link of the post given in  next point which describes it.

17.  Then you will have following window appear, where you have your application to be selected from the drop down menu (this will appear only if you have already created your application on App  Store as mentioned by me in THIS POST "How to create app on App Store" )

After application is selected, you need to choose the correct provisioning file from the drop down menu.
Note: It may appear that it is already selected but still you need to drop down and check if its the right one.

18. Then you Press Next. then it asks you the sign the code with the valid key as shown in the screenshot below. Just press Allow.

19. You will see following screen that validation has been successful. Finish it by pressing Finish Button.

20. Now you press the button Submit to submit it on App Store (it is present 1 button below the validate button). Make sure you have right app selected in Application and right Identity( provisioning file ) before your press Submit button.

21. You will see following screen for abour 4-5 mins while its uploading your app on App Store.

22. After it is successfully submitted, you will see following screen. Then just press Finish.

23. Yeppie !! You have submitted the app on App Store !! If you  login into your iTunes Connect account you will see that status has been changed from  waiting for upload to your upload has been received and soon it changes to Waiting for review automatically.

You can see in the screenshot below , the status appears Waiting for review.

Now. After you submitted with your app, you suddenly want to do one change in the app and hence you want to reject the binary . How to reject the binary ? READ HERE


  1. thanks

    But I was not able to raise app

    Applucation failed codesing verification.. the signature was invalid or it was not signed with an apple submission certificate
    this error
    what can i do

  2. kudos to you for a great tute! thank you.

  3. Thanks for this. Helped us to save lot of time :-)

  4. To Talabek:
    For Project build setting codesign everything as delveloper.
    In Target build setting codesign distribution scheme with distribution signature.

    Thanks Reetu for nice post!

  5. Thanks for the great post! Excellent job with having a pic to go with every description to avoid any confusion. Kind of sad that you have a better tutorial than the provisioning portal :-P

  6. Hi Reetu,

    Thanks for the great post. I have been struggling with uploading my binary for over 3 days now. I tried every possible solution posted all across internet to fix this. Everytime i try to validate my archive file, my xcode crashes giving me following error.

    UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[ITunesSoftwareApplicationDescription applicationType]: unrecognized selector sent to instance 0x201edbb80
    UserInfo: (null)
    Hints: None
    0 0x00007fff80559796 __exceptionPreprocess (in CoreFoundation)
    1 0x00007fff806830f3 objc_exception_throw (in libobjc.A.dylib)
    2 0x00007fff805b3110 +[NSObject(NSObject) doesNotRecognizeSelector:] (in CoreFoundation)
    3 0x00007fff8052b91f ___forwarding___ (in CoreFoundation)
    4 0x00007fff80527a68 _CF_forwarding_prep_0 (in CoreFoundation)
    5 0x0000000102d050ac __50-[AAVFetchApplicationListAssistant viewDidInstall]_block_invoke_0427 (in IDEArchivedApplicationsViewer)
    6 0x00007fff80565acc __NSArrayChunkIterate (in CoreFoundation)
    7 0x00007fff805747fd ____NSArrayGetIndexesPassingTest_block_invoke_1 (in CoreFoundation)
    8 0x00007fff807f1283 _dispatch_apply_serial (in libSystem.B.dylib)
    9 0x00007fff807a83f4 dispatch_sync_f (in libSystem.B.dylib)
    10 0x00007fff807f122b dispatch_apply_f (in libSystem.B.dylib)
    11 0x00007fff808a7579 _dispatch_apply_slow (in libSystem.B.dylib)
    12 0x00007fff8053c3ab __NSArrayGetIndexesPassingTest (in CoreFoundation)
    13 0x0000000102d04f27 __50-[AAVFetchApplicationListAssistant viewDidInstall]_block_invoke_0 (in IDEArchivedApplicationsViewer)
    14 0x00007fff807af284 _dispatch_call_block_and_release (in libSystem.B.dylib)
    15 0x00007fff8078d7f1 _dispatch_worker_thread2 (in libSystem.B.dylib)
    16 0x00007fff8078d128 _pthread_wqthread (in libSystem.B.dylib)
    17 0x00007fff8078cfc5 start_wqthread (in libSystem.B.dylib)

    Now i tried other way by launching app loader but then i always get Applucation failed codesing verification.. the signature was invalid or it was not signed with an apple submission certificate error. I am sure i have correct certificates and provisioning profiles.

    Please help.

  7. I am sure , you must have tried installing your certificates fresh and again ?Looks like a certificate problem.

  8. Thank you so much! Yours is the unique tutorial on the Internet about this and made it using XCode 4. My app is now uploaded. ¡Muchas gracias desde España!

  9. Thanks guys for appreciating it :)

  10. You are the greatest person in the world for making this tutorial. I tried everything and this was the only way that worked. Thank you

  11. How do we create the .app file that can be uploaded through AppLoadder ??

  12. Same question as Bharat...since the changes last month, how do you create the .app file to use with AppLoader?

  13. Thank you very much!
    Very nice tutorial!

  14. This is a very clear, concise and highly useful post. Thank you very much for your hard work and willingness to share.

  15. Thanks so much for documenting this process! I would never have figured it out, especially with Apple's docs still on Xcode3.

  16. Hello from Stuttgart..Great Tut, but i have an Question. I finished my App and when start the Archive i get this message: “-projectname-” does not contain a single–bundle application or contains multiple products. Please select another archive, or adjust your scheme to create a single–bundle application.

    Can Somebody please tell what means that? Thank You

  17. This comment has been removed by the author.


  19. Thank u for this tutorial, it's really help me to upload my first app.

  20. Thanks a lot Reetu!!! Very useful tutorial. Thank you! Thank you!!!

  21. This is the best tutorial i found in the internet. Thank you !

  22. THANK YOU!!! I couldn't have done this without these instructions! :)

  23. Thank you!!! you saved my life :)

  24. You are certainly the best. Your step by step instructions were so useful.Thank you for the good work!

  25. I just used this use so Many times..its vry usefull.

  26. Finally someone posted something like this on the internet. You have literally saved me from a migraine, thank you so much for the clear and concise tutorial.

  27. Reetu,
    After submitting to the app store, do I need to change all my Xcode settings back to the way they were before? I mean, if I continue to build/test new features for the app, will these "distribution settings" still work for that?

  28. Reetu you rocks !!!! - >> Neha :P

  29. Very good article! We will be linking to this great content on our site. Keep up the good writing.

    apple repairs

  30. Long-touch over the selected text not working on my Galaxy S2 either. Verifiable rubbish I'm sad to say. Maybe one day Android will include the rudimentary basics.
    Technology news

  31. Mobile and Social Network Technology.In this sample code, I have created an external window which opens up when the user hits the text field. I really like this.

    App builder for kids

  32. its really helpful..thanks a lot

  33. I know this may be a silly question but do I need to have the Iphone device attached in order to submit this?

  34. This comment has been removed by the author.

  35. Thanks all For Sharing the list of Press release Sites......
    Here is one more site with 300 press release sites listed, most of them are very fast approval sites and also free of registration...

  36. Clued-up publier! Votre propre connaissance reconnue est excellent. Un grand merci à l'égard de maintenir moi personnellement informer. Pour en savoir plus, je serai en contact.

    téléphone tribunal

  37. This article is very interesting and helpful. Thank you for sharing!

    Mobile App Developer

  38. I read this article. I think You put a lot of effort to create this article. I appreciate your work.
    thesis Writing Service

  39. Nice Blog.....thanks for this.... Just visit App in Minute can create Application and website without burden. App In Minute has the affordable Pricing and Making Plan by App In Minute of Rs. 5 / Day (Rs.1825/ Year.) It can be develop your free android application , website product and service to the world. for more information about how to create an app

  40. thanks for creating this guide that can be easily followed. Spectrum mobile activate

  41. Very good technique, it is very useful. Thank you for writing this kind of post.
    PhDassistance in india:

    The HIGS software solution is a research and development company that offers a wide range of guidelines for doctoral students. We help PhD researchers achieve their goals by closing the gap between problems in the research vision and the practical implementation of technologies.

    Why are we the best doctorates in India?

    HIGS has years of experience in the industry and is one of the leading lecturers in India. All of our employees are experienced editors and research experts with many years of expertise.

    What do we do?

    University registration

    We will help you register for a PhD at top universities such as IIT, JNTU, Anna University, VTU, Sathyabama University, Amity University, Hindustan University, NIT and more. Our research team will guide you to the selection of the specified domain and Completion of the topic. They also help you to identify the base paper in your domain.

    Problem identification

    Technical Readers Help you read concepts and help you identify the solutions to identified research problems.

    Research paper writing

    Technical editors will help you prepare the documentation for magazine, conference and accompanying documents and other reports.

    Journal Paper Publications

    Our experts will help you to publish your research in international journals such as IEEE, Springer, Elsevier, SCI journals and conferences.

    Plagiarism check

    100% original and plagiarism FREE work on writing checks Turnitin

    Thesis & Synopsis Writing

    We help you to do your PhD thesis. We deliver the best result.

    Guide ship help

    We help you to get a guide-ship in top universities in INDIA.


    The HIGS team knows the value of punctual transmission, and for this purpose we always deliver your order before the deadline.

    So you can sit back and relax!

    Visit our website here