On the Apple guide, there is a step before building the AppStore version:
Open the Xcode project and Duplicate
the “Release” configuration in the
Configurations pane of the project's
Info panel. Rename this new
configuration “Distribution”.
Why this step is needed? Can I skip this step and use the "Release" configuration to build the final version for AppStore?
If you keep your release and appstore configurations separate you're able then to test your application built with exactly the same settings as it will go to appstore and switch to that configuration with 1 click. It may be not necessary but (imo) is really handy.
Another reason may be that while developing you may want to play a bit with some project settings and be sure that your experiments won't go to distribution build by any chance.
You could name it "DebbieGibson" as long as you remember you set that configuration up for App Store distribution.
Related
I am trying to validate my application, i am going through the doc and it says
Before archiving your application, ensure that the binary is self
contained. That is, if it relies on static libraries, ensure that
those libraries are part of the application binary by setting the Skip
Install build setting to Yes in the Release build configuration of the
target that builds and archives the application.
After following the above step, and when i archive the app i am not seeing the archived file on the table below (in the Organizer). Why is this and how can i submit my app to Validation ? (not submit to app store, Only validation)
Note: When i set Build configuration to Ad Hoc it Archives correctly (and displays in Organizer), but when i set Build configuration to Release, the archive file doesn't get displayed in the organizer.
Setting Skip Install to YES can be problematic sometimes, I'd only use it if you're having a specific problem that it solves. The Xcode users guide isn't as up-to-date as it should be, particularly for recent releases where the archive process has changed significantly.
Try turning Skip Install back to the default NO, and be sure to use the Product > Archive command rather than Build for > Archive.
I am very desperate at the moment. I developed an iPhone application and when I am "building for archiving" I get the message "Build succeded" but actually no app-file is created.
My guess is that it has sthg to do with the provisioning but I checked all profiles, I even deleted all profiles and my certificate and reinstalled them but nothing changes.
When I am using building for testing it does create the app though.
Edit the scheme you are using and check that a target is ticked for Archive in the Build section.
You need to select the just a Achieve under Project menu. If you cannot see that Achieve menu is not active, then you have configure your distribution profile.
I've got a script written which does some steps to package my build for an Ad Hoc distribution. My first guess was to use a run script phase in my Ad Hoc target. But it looks like codesigning is fixed at the last position in the chain of building iPhone apps.
Somebody has a clue how can I run my script at the very last possible moment in the build process?
Update: Look at this answer below on how to run scripts in Xcode 4.
A short update on that topic: Since we all use Xcode 4 these days. Apple has refined the process of running scripts on several events in the build process with the introduction of schemes.
Go to Product → Edit Scheme… and expand the Build side bar item, there you have the chance to run scripts before (Pre-actions) and after (Post-actions) a build, a debugging, archiving, etc event. It's pretty handy to set a version number from git describe output or upload .xcarchives to services like TestFlight and HockeyApp.
If you want to share your pre/post scripts with other team members who got access to your code repository, you can go to Product → Manage Schemes… and mark your scheme as shared. After you checked in …{project_name}.xcodeproj/xcshareddata/xcschemes/{project_name}.xcscheme to your preferred scm everybody can use it in the project.
Can you create an aggregate target that contains both your "Ad hoc" target and a run script build phase (that runs after the "Ad hoc" target)?
I want to make sure I am using the most correct build settings for my distribution build, which is based off of my Release build settings. Right now I am not seeing a whole lot of difference between the settings for Debug build and Distribution build. Is it safe to just go with the default settings?
Debug:
The debug build settings include debugging symbols in your application binary and usually turn of compile time optimizations which may affect the code execution path. Debugging symbols allow you to get meaningful information while stepping through the code in a debugger. The setting is also useful if you have setup an application logging macro for instance. It would let you enable/disable it for development and distribution.
Release:
Release will most likely give you a smaller binary, and faster execution time with optimizations enabled.
Definitely go with the distribution build settings.
The difference is in the profiles you are using for code-sign, where for Debug build you're using your Developer profile and for the Distribution build (Ad-hoc or AppStore) you need to create ad-hoc or AppStore profiles respectively. Of course Debug builds has sym file included with a symbolic table for debugging your code.
My projects reference static DLLs I've created. These projects are setup to make sure a corresponding build phase occurs. Meaning, if I build in simulator/debug, the static library will have an up to date simulator/debug build. I can verify my app works fine except for device/release. Is there a way to verify device/release? It's sort of like throwing it over the wall to Apple without any verification.
My recommendation is to use the Release configuration to build with your development profile, and create a new Distribute configuration. The new configuration should be identical to the Release configuration in all ways except that it uses your distribution certs for signing rather than your development certs.
To do this, just go into your project settings, go to the Configurations tab, and duplicate the Release configuration, then rename the duplicate to Distribute. Then go to the Build tab, select the Distribute configuration from the drop down, and change the Code Signing Identity to use your distribution certificate.
Now you are ensured that the output of the two configurations is the same except for the code signing step. If you change build settings in the future, just delete and recreate the Distribute profile to ensure all the settings are the same.