Saturday 5 June 2010

Creating an iPhone Distribution

Requirements:
  • A distribution provisioning profile will need to be installed prior to creating a build.
  • To follow these steps, you must have the All-in-One layout set in the General tab of the Xcode Preferences.
Step #1 Create Distribution Configuration
  • Select the Project Name in Xcode (see below)
  • Right click and choose Get Info dialog (or enter Command I)
  • Select Configuration tab
  • Click on Release in the list of configurations and select Duplicate from the options along the bottom
  • Name the new configuration Distribution
  • Close the window
Step #2 Set Target Information
  • Select the Target (see below)
  • Right click and choose Get Info dialog
  • Select Build tab
  • Choose Distribution from Configuration drop-down
  • In the Architectures section in the list of settings, choose a Base SDK (e.g. Device - iPhone OS 2.2.1)
  • From the Code Signing Section, under Code Signing Identity, choose the appropriate profile (e.g. Ad Hoc or Distribution Profile)
  • Select Properties tab
  • Set Executable name (e.g. theAstrologerFree)There is a default value here: ${EXECUTABLE_NAME} which will also work for most projects
  • Set Identifier to com.domain.application-name (e.g. com.3SixtySoftware.theAstrologerFree)There is a default value here: com.yourcompany.${PRODUCT_NAME:identifier} which you may work for your project. If you run into errors or conflicts with other applications try replacing${PRODUCT_NAME:identifier} with a unique string that represents your application nameSet Version # (e.g. 1.1)
  • Set Icon File to Icon.png
    • • Make sure you have an icon that is 57x57 pixels, with the name Icon.png in the project
  • Close the window
Visit iPhoneDeveloperTips.com for more Tips and Tricks
Step #3 Set Active Configuration
  • Select the Debug workspace button (see below) Select the Project workspace button (the button to the left of Debug)
  • From the drop-down (upper left) choose:
  • Choose the Device Setting you plan to target under Active SDK (e.g. Device - iPhone OS 2.2.1)
  • Choose Distribution as the Active Configuration
If creating an Ad Hoc Distribution:
  • Create new file (Command N), select Code Signing, choose Entitlements, click Next
  • Name the file Entitlements.plist
  • Uncheck the get-task-allow button
  • Save file
  • Make sure the file is at the root of project hierarchy (e.g. drag the file just below the Project name)
  • Select the Target
  • Right click and choose Get Info dialog
  • Select Build tab
  • Fill in the Code Signing Entitlements with Entitlements.plist
Step #4 Verify Target Settings
  • Select the Target
  • Right click and choose Get Info dialog
  • Select Properties tab
  • Note the Executable name (e.g. theAstrologerFree)Close the window
  • Select Build tab
  • Scroll down to Packaging
  • Verify (or input) the Product Name to match the Executable name from above
Step #5 Verify Info.plist
  • Click on Info.plist in the Resources folder
  • Check the following:
  • Bundle Display Name - this is the text that will appear on the iPhone Home screen under the icon
  • Executable name - this should match what youʼve entered in the Properties settings
  • Icon must be set to Icon.png
  • Bundle Identifier - for example com.3SixtySoftware.theAstrologerFree
  • Bundle version - for example 1.1
Step #6 Clean and Build
  • From the Build menu choose Clean All Targets
  • From the Build menu choose Build (Command B)

No comments:

Post a Comment