ios - what is the difference between archiving your application and creating a binary? - ios

I have started the steps to submit my app to the apple store, andI have made a keychain security file, and did an archive of the code base.
But as I understand it, I have to make a binary file of the code base which is just a zip file, and upload it to iTunes Connect, is that correct?
What was the point of archiving the codebase? Did that not create the binary? And how do I sign the binary correctly so that it can be submitted to the apple store?
Thanks!!

You're using a number of terms here, but not using all of them correctly.
"Code base" usually refers to the entire collection of files that are part of the application. The most important of those are the source code files, but most people would also include such things as XML files, strings files, images, your project file, and other resources. An "archive of the code base" sounds like your put all these in a zip file for safe keeping. I understand you to mean that you used Xcode's 'Archive' command, but this does several things:
compiles the program into an application bundle (the app bundle is a directory that includes the executable "binary" file, but also contains the other resources that the app needs)
signs the bundle with your private key and distribution provision
zips the application
saves the archive along with the debug symbols file in Xcode's organizer so that you can later symbolicate any crash logs you receive
optionally submits the application to iTunesConnect for review, save the app, or mail the app to someone
"creating a binary" really just means creating some sort of binary (i.e. non-text) file, but it's often understood that the binary file in question is executable. So yes, using Xcode's 'Archive' command will "create a binary", but it goes several steps further in ensuring that the 'binary' is stored in the right format for submitting to iTunesConnect or distributing to users.

Creating an archive also saves the .dsym files which you need to symbolicate crash reports.
See this article for more about archiving: http://developer.apple.com/library/ios/#qa/qa1764/_index.html

You can use Xcode to submit your binary to iTunes connect. Also, binaries are already signed with the provisioning/distribution profile.
In order to sign the binary correctly, you need to create a distribution profile with the app id you have assigned to your application. You compile your app and make an archive. You can go to Xcode's organizer to submit your application to the app store.

Related

How to deploy Xamarin iOS App with .dSYM file

I've been looking at Microsoft's docs for deploying Xamarin iOS apps to the app store:
https://learn.microsoft.com/en-us/xamarin/ios/deploy-test/app-distribution/app-store-distribution/index?tabs=windows
https://learn.microsoft.com/en-us/xamarin/ios/deploy-test/app-distribution/ipa-support?tabs=windows
We are currently building in Ad-Hoc and generating an .ipa file which we then upload to the app store via Application Loader. I managed to get the .dSYM folder to generate if I set the Project Properties -> Build -> Advanced -> Debugging Information to "Full" in Visual Studio.
Is there a better way to upload the .ipa, or a way to upload the .dSYM to iTunes Connect? As I read that Apple will automatically symbolicate any crash logs for you if the symbols were uploaded with the app?
Also, does setting the Debugging Information to "Full" change the actual .ipa in any way, or does it just generate the extra .dSYM file? Since setting it to "Full" I manually deployed the .ipa to our test device and one the libraries we use is now throwing an Object Reference exception.
Any help is greatly appreciated, thanks.
Is there a better way to upload the .ipa?
In my knowledge, there are two ways to upload .ipa file to iTunes Connect. One is XCode and the other is Application Loader.
or a way to upload the .dSYM to iTunes Connect? As I read that Apple
will automatically symbolicate any crash logs for you if the symbols
were uploaded with the app?
"you will be given the option of including the dSYM file when uploading your archive to iTunes Connect. In the submission dialog, check “Include app symbols for your application… DSYM files store the debug symbols for your app, it should exist at the machine that compiled the app binary. Read the answer in this thread would help you understand what is a DSYM file better.
Here is the document about Understanding and Analyzing Application Crash Reports.
or does it just generate the extra .dSYM file?
I don't think so, there is only a DSYM file after you compiled the app binary.
Since setting it to "Full" I manually deployed the .ipa to our test
device and one the libraries we use is now throwing an Object
Reference exception.
What is the Object Reference exception? Any stackTrace?

Is that safe to share .xcarchive?

I`m somehow amateur in Xcode and this matter is so important for me.
My Friend use his developer id to publish my app and he ask me to give him .xcarchive instead *.ipa file
As I read in stackoverflow topics .xcarchive have the same content of ipa and there is no concern about lose and steal source code.
But when I check my xcarchive and use show content option I see most of project files like images and sources in application folder , also some of my code are in *.nib files
Is that normal ? and if I extract ipa if I get the same result ?
Is there any security or tips in Xcode that better to active before archive project ?
It is normal. In order to publish your app, your friend really needs the xcarchive, because they need to export an IPA file with the appropriate provisioning profile and signed with their code signing identity. Although it's possible to replace the provisioning profile in an IPA file and re-sign it again, it's a daunting task you don't want any of your friends to do. If you trust your friend with publishing your app, you should trust them and share the xcarchive.
When you compare the contents of xcarchive and IPA files, you can see xcarchive contains a dSYMs folder with dSYM files used to desymbolicate your crash logs -- the developer needs that to know in what file and at what line number the application crashed.

Generate iPhone application Archive

I want to submit my iPhone application to the app store. But I'm not able to do that due to following error.
ERROR ITMS-9000: "This bundle is invalid. The executable name, as reported by CFBundleExecutable in the info.plist file, may not contain any of these characters: \ [ ] { } parenthesis . + *" at Software Assets (MZItmspSoftwareAssestPackage)
There isn't any problem in generating ipa file for Ad-Hoc testing. I even tried with creating new project from Xcode but still the error continues. I am using Xcode-5.0
Just Edit this executable file(name) setting in info.plist which wouldn't contain special character as like error above. Check this screenshot. check this apple's doc(CFBundleExecutable)
Refer this stack
Note: This type of error doesn't occur with ad-hoc provisioning profile.
You are use the Ad-hoc distribution provision profile for upload the app in app store ....
According to Apple for upload the app you are use the app store distribution provision profile.
So error generate .....
Create the new provision for upload app store but No need the change bundle id....
and check Architecture
and solve your problem
Thanks
Thanks a lot to all who have tried to pull me out from this issue. I really don't know what was the problem but this morning i create new project, add new controllers and other needed files. Just copy all the codes in relative files. Build with certificate that i generated and was using last night. Submit in App Store and it did submitted. I didn't change in Info.plist file. No needed to generate new Distribution profile. Just create new project.
Many many thanks to #Mani, #Mani vannam, #Deepesh
Problem may be with your project name or target name so please rename it by single click on the target. have your project name with out any special characters like []{}

Bundling app for app store distribution in Xcode 4.3

I can't believe how difficult it is to figure out the final process for building an app and getting it into the app store.
I've already prepped iTunes Connect with my app and it shows up in Application Loader.
I finally figured out how to "archive" the app, although none of the guides I found, including Apple's, seemed to really describe this process in complete detail.
Now I've got a .xcarchive package. For some reason, Application Loader will not let me select that kind of file. I read somewhere about needing to archive as a .zip file, so I tried that. Now Application Loader allows me to select the file, but after I click Send, it gives me this error:
"The application wrapper must end in .app."
What exactly is the process of archiving from Xcode 4.3 and getting the application uploaded into the app store?
In the XCode Organizer, does the 'Archives' tab allow ou to 'Distribute'? You should then have the option to 'Submit to the iOS App Store'.
This is described in more detail in Distributing Your iOS App.
The submission process doesn't get a lot of description because, when it works, it's quite simple. You never need to manually locate the '.xcarchive' package or '.ipa' file for your app store submission, only for testing or backups outside the app store. (You do need the archive package, but it's just quietly created and then uploaded by XCode.)

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.

Resources