This tutorial will walk you through the easiest way to generate an IPA using Xcode 5. We will be using a sample project which will walk through creating the project to IPA generation.

NOTE: This tutorial only covers how to configure your project in order to package the application as an IPA. It does not cover how to create or migrate a project with or without 3rd party libraries.

NOTE: You will need an Apple Developer or Enterprise account to prepare an .IPA to be distributed.

Creating the Basic Application

  1. Choose a template for your new project. For this sample application, we will be creating a Single View Application.
  2. Enter your product name, company identifier, and other configuration options. The product name and company identifier will be combined to generate the Bundle Identifier. This will be used later to determine which provisioning profiles can be used when building and sharing the application.
  3. In the file list on the left drop down menu, select your target. On the General tab, notice the Bundle Identifier has been generated based on the values entered in step 2.
  4. Go to the Build Settings tab and scroll down to the Code Signing section and expand the Provisioning Profile settings. For the two default build configurations (Debug and Release), select your Development Provisioning Profile for Debug and your Ad Hoc Provisioning Profile for Release. 
  5. In the dropdown in the top left, select Edit Scheme. You will notice that the default build configurations have already been configured based on the build action being performed. If you are performing a Run action (Product -> Run) to test your application on the iOSSimulator or on your device, your app will be built using the Debug configuration, which in turn signs your app with the Development Provisioning Profile. If you are performing an Archive action (Product -> Archive), your app will be built with the Release configuration, which in turn signs your app with your Distribution Provisioning Profile (either Ad Hoc or App Store). 

Generate the IPA

The easiest way to generate an IPA, which can be uploaded to TestFlight, is to archive your applications and share it from the Xcode Organizer.

  1. Change the build target from iPad/iPhone Simulator to iOS Device.
  2. Under the Product menu, select Archive. This will build your application and code sign it using the Distribution (Ad Hoc or App Store) profilesetup in step 5 of the “Creating the Basic Application” section. Once the build has completed the Organizer window will appear. If it does not, open it using CMD-Shift–2 or Window -> Organizer. If you see a message popup saying “codesign wants to sign using key ”privateKey“ in yourkeychain.”, select Allow or Always Allow.
  3. Go to the Archives tab in Organizer and select your application, if it was not automatically selected, and choose the archive you wish to share.
  4. Click the Distribute button. In the next window select “Save for Enterprise or Ad-Hoc Deployment”, and click Next.
  5. In the Code Signing Identity drop down, select the same Distribution Provisioning Profile specified in the Release configuration from step 5 of the “Creating the Basic Application” section, and click Next. NOTE: When generating an IPA for distribution on TestFlight, you should always use an Ad Hoc Distribution Provisioning Profile for both the Archive and Distribute options.
  6. Select where you would like to save your IPA and upload to TestFlight.

Commonly Asked Questions

Q: Why must I use the same provisioning profile when archiving and generating my IPA?
A: When your application is compiled, information from the provisioning profile used to codesign your application is embedded in the application executable. When you generate your IPA, your application is codesigned again and the provisioning profile used to codesign is added to the IPA as the embedded.mobileprovision file. If there is a mismatch in certain pieces of information between the profile info in the executable and the profile info in the embedded.mobileprovision, this can cause the install to fail.

How to create an IPA (Xcode 5)的更多相关文章

  1. To create my first app in iOS with Xcode(在Xcode创建我的第一个iOS app )

    To create my first app in iOS create the project. In the welcome window, click “Create a new Xcode p ...

  2. Build fat static library (device + simulator) using Xcode and SDK 4+

    155down votefavorite 185 It appears that we can - theoretically - build a single static library that ...

  3. [转]使用 Xcode 5 和 Interface Builder创建 Hello World App

    转载地址:http://www.ithome.me/archives/581.html 使用 Xcode 5 和 Interface Builder创建 Hello World App 发表回复 当x ...

  4. Xcode创建Object-C程序

    一. Xcode 环境安装 与 工程创建 1. 下载环境 相关资源下载 : -- IOS 相关资料下载页面 :  https://developer.apple.com/devcenter/ios/i ...

  5. Xcode 之自己编译静态库

    今天介绍下,如何利用Xcode,新建一个静态库,以及如何编译成i386.armv7.armv7s 等平台架构. 开发环境:MAC OS X 10.9.4 + Xcode 5.0.2 背景知识:库分两种 ...

  6. Xcode + Swift 制作动态原型

    转载: Xcode + Swift 制作动态原型 为什么是 Xcode 和 Swift 我们尝试过的动态原型设计工具,Origami, Form, Hype, FramerJS,Pixate 等,但都 ...

  7. Differences Between Xcode Project Templates for iOS Apps

    Differences Between Xcode Project Templates for iOS Apps When you create a new iOS app project in Xc ...

  8. Xcode界面简介

    创建 Object-C 程序 进入主界面方式 : 打开 Xcode 之后, 可以使用 Xcode 菜单, 但是必须创建一个 Object-C 工程 或者 导入 一个 Object-C 工程才可以进入主 ...

  9. 如何用OS X的Xcode写C语言程序

    声明:以下内容非本人原创,转载于别处.拿出来只是分享给FY们,不喜勿喷!原创地址http://blog.yorkxin.org/posts/2009/03/15/fundamental-c-with- ...

随机推荐

  1. C++ 虚函数的内存分配

    1.无继承的普通类:   在有虚函数的情况下类会为其增加一个隐藏的成员,虚函数表指针,指向一个虚函数表,虚函数表里面就是类的各个虚函数的地址了.那么,虚函数表指针是以什么模型加入到类里面的,虚函数表里 ...

  2. SQLEXPRESS 2012 安装NorthWind和Pub数据库

    安装SQL后,学习时总是没有这两个示例数据库. 先从微软那里下载此文件. 网址:http://www.microsoft.com/en-us/download/details.aspx?id=2365 ...

  3. 学习go语言第一天

    今天先下载了go语言,FQ去下载的,一开始想用eclipse,然后下载了go插件,结果出现错误,我英语水平有限,就换了liteIDE,感觉还不错,go语言环境变量因为我是msi安装的,好像可以不用自己 ...

  4. 【BestCoder #44】

    因为这场比赛,我愉快地逃掉了晚自修. T1一开始各种SillyB,忘了40%的最低限制... T2各种想吐槽... 明明OJ警告说%lld是不行的我就换成%I64D(上面写这样的)... 结果各种WA ...

  5. BZOJ1196 [HNOI2006]公路修建问题 【二分 + Kruskal】

    题目 OI island是一个非常漂亮的岛屿,自开发以来,到这儿来旅游的人很多.然而,由于该岛屿刚刚开发不久,所以那里的交通情况还是很糟糕.所以,OIER Association组织成立了,旨在建立O ...

  6. rem布局和hotcss原理分析

    rem布局的开源方案hotcss, 其原理个人理解如下: 手机px = (手机页面宽度/设计稿宽度) * 设计稿px 手机rem = 手机px / fontSize = (手机页面宽度/设计稿宽度) ...

  7. navicat for mysql 2003错误

    最近又一次碰到navicat for mysql 2003错误,之前碰到好几次了,问题再次出现还是有些不知所措,所以记下来,再次遇到时就可以迎韧有余了. 解决方案1: 重启防火墙:关闭再重新开启. 解 ...

  8. confluence6.3安装、破解

    confluence是一个专业的企业知识管理与协同软件,可以用于构建企业wiki.通过它可以实现团队成员之间的协作和知识共享.现在大多数公司都会部署一套confluence,用作内部wiki.现在co ...

  9. 总结DSP28335的程序设计的方法

    对DSP进行开发时,需要对其底层的硬件及外设进行相应的配置,当配置完成后才可以将其相应模块激活,才可以在其内部进行程序编写及调试处理.下面对程序配置及操作进行简单的整理,仅供参考. 第一步:初始化系统 ...

  10. read 系统调用剖析【转】

    转自:https://www.ibm.com/developerworks/cn/linux/l-cn-read/ 大部分程序员可能会有这样的疑问:当在程序中调用库函数 read 时,这个请求是经过哪 ...