如何使用 Xcode 创建 .ipa 文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5499125/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:52:01  来源:igfitidea点击:

How to create .ipa file using Xcode?

xcode

提问by Surjit Joshi

Please tell me the complete procedure to build my app & use it on real iPhone.

请告诉我构建我的应用程序并在真正的 iPhone 上使用它的完整过程。

回答by coder

In Xcode Version 10.0

在 Xcode 10.0 版中



  1. Go to Window -> Organizer
  2. Then select your app archive from archives
  3. Then click the "Distribute App"button on right panel
  1. 转到窗口 -> 管理器
  2. 然后从档案中选择您的应用档案
  3. 然后单击右侧面板上的“分发应用程序”按钮

enter image description here

在此处输入图片说明

  1. Then follow the below steps
  1. 然后按照以下步骤

Step 1

第1步

enter image description here

在此处输入图片说明

Step 2

第2步

enter image description here

在此处输入图片说明

Step 3

第 3 步

enter image description here

在此处输入图片说明

Step 4

第四步

enter image description here

在此处输入图片说明

Step 5

第 5 步

enter image description here

在此处输入图片说明

Step 6: Finally select the place you want to save the .ipa file

第 6 步:最后选择要保存 .ipa 文件的位置

enter image description here

在此处输入图片说明

In Xcode Version 9.2

在 Xcode 9.2 版中



  1. Go to Window-> Organizer
  2. Then select your app archive from archives
  3. Then click the "Upload to App Store" button on right panel
  4. Then follow the following steps
  1. 转到窗口-> 管理器
  2. 然后从档案中选择您的应用档案
  3. 然后单击右侧面板上的“上传到 App Store”按钮
  4. 然后按照以下步骤

Step 1enter image description here

第1步在此处输入图片说明

Step 2enter image description here

第2步在此处输入图片说明

Step 3enter image description here

第 3 步在此处输入图片说明

Step 4Finally select the place you want to save the .ipa file

第 4 步最后选择要保存 .ipa 文件的位置

enter image description here

在此处输入图片说明

回答by Ashok R

In addition to kus answer.

除了kus回答。

There are some changes in Xcode 8.0

Xcode 8.0 有一些变化

Step 1:Change scheme destination to Generic IOS device.

步骤 1:将方案目标更改为Generic IOS device.

Step 2:Click Product> Archive> once this is complete open up the Organiser and click the latest version.

第 2 步:单击Product> Archive> 完成后打开管理器并单击最新版本。

Step 3:Click on Export...option from right side of organiser window.

第 3 步:单击Export...管理器窗口右侧的选项。

Step 4:Select a method for export > Choose correct signing > Save to Destination.

步骤 4:选择导出方法 > 选择正确的签名 > 保存到目的地。



Xcode 10.0

Xcode 10.0

Step 3:From Right Side Panel Click on Distribute App.

第 3 步:从右侧面板中单击分发应用程序。

Step 4:Select Method of distribution and click next.

第 4 步:选择分发方法,然后单击下一步。

Step 5:It Opens up distribution option window. SelectAll compatible device variantsand click next.

步骤 5:它打开分发选项窗口。选择所有兼容的设备变体然后单击下一步

Step 6:Choose signing certificate.

第 6 步:选择签名证书。

Step 7:It will open up Preparing archive for distribution window. it takes few min.

第 7 步:它将打开准备分发文件窗口。需要几分钟。

Step 8:It will open up Archives window. Click on export and save it.

第 8 步:它将打开档案窗口。单击导出并保存。



回答by Kus

Click Product> Archivefrom the menu, once this is complete open up the Organiserand click the latest version > Distribute> Save for Enterprise or Ad-Hoc Deployment> Choose correct signing > Save to destination

单击Product>Archive从菜单中,完成后打开Organiser并单击最新版本 > Distribute> Save for Enterprise or Ad-Hoc Deployment> 选择正确的签名 > 保存到目的地

回答by Dave Anderson

You will need to Buildand Archiveyour project. You may need to check what code signing settings you have in the project and executable.

您将需要BuildArchive您的项目。您可能需要检查项目和可执行文件中的代码签名设置。

Use the Organiser to select your archive version and then you can Sharethat version of your project. You will need to select the correct code signing again. It will allow you to save the .ipafile where you want.

使用管理器选择您的存档版本,然后您可以选择Share该版本的项目。您将需要再次选择正确的代码签名。它将允许您将.ipa文件保存在您想要的位置。

Drag and drop the .ipafile into iTunes and then sync with your iPhone.

.ipa文件拖放到 iTunes 中,然后与您的 iPhone 同步。

EDIT:Here are some more detailed instructions including screenshots;

编辑:这里有一些更详细的说明,包括屏幕截图;

How to distribute ad hoc build with XCode 4

如何使用 XCode 4 分发临时构建

回答by Jayprakash Dubey

Archive process (using Xcode 8.3.2)

存档过程(使用 Xcode 8.3.2)

Note : If you are using creating IPA using drag-and-drop process using iTunes Mac app then this is no longer applicable for iTunes 12.7 since there is no built-in App store in iTunes 12.7.

注意:如果您使用 iTunes Mac 应用程序通过拖放过程创建 IPA,那么这不再适用于 iTunes 12.7,因为 iTunes 12.7中没有内置应用程序商店。

  1. Select ‘Generic iOS Device' on device list in Xcode
  1. ‘Generic iOS Device在 Xcode 的设备列表中选择'

Step 1

第1步

  1. Clean the project (cmd + shift + kas shortcut)
  1. 清理项目(cmd + shift + k作为快捷方式)

Step 2

第2步

  1. Go to Product-> Archiveyour project
  1. Product->Archive你的项目

Step 3

第 3 步

  1. Once archive is succeeded this will open a window with archived project

  2. You can validate your archive by pressing Validate(optional step but recommended)

  3. Now press on Exportbutton

  1. 一旦存档成功,这将打开一个包含存档项目的窗口

  2. 您可以通过按来验证您的存档Validate(可选步骤,但推荐)

  3. 现在按下Export按钮

Step 4 5 6

步骤 4 5 6

  1. This will open list of method for export. Select the export method as per your requirement and click on Nextbutton.
  1. 这将打开导出方法列表。根据您的要求选择导出方法,然后单击Next按钮。

Step 7

第 7 步

  1. This will show list of team for provisioning. Select accordingly and press on ‘Choose' button.
  1. 这将显示list of team for provisioning. 相应地选择并按下“ Choose”按钮。

Step 8

第 8 步

  1. Now you've to select Device support -> Export one app for all compatible devices(recommended). If you want IPA for specific device then select the device variant from list and press on ‘Next' button.
  1. 现在您必须选择设备支持 -> Export one app for all compatible devices(推荐)。如果您想要特定设备的 IPA,则从列表中选择设备变体并按下“ Next”按钮。

Step 9

步骤 9

  1. Now you'll be able to see the ‘Summary' and then press on ‘Next' button
  1. 现在您将能够看到“ Summary”,然后按“ Next”按钮

Step 10

第 10 步

  1. Thereafter IPA file generation beings and later you'll be able to export the IPA as [App Name - Date Time]and then press on ‘Done'.
  1. 此后生成 IPA 文件,稍后您将能够export the IPA as [App Name - Date Time]然后按“ Done”。

Step 11

第 11 步

回答by Shrawan

In Xcode-11.2.1

在 Xcode-11.2.1 中

You might be see different pattern for uploading IPA
Steps:-

您可能会看到上传 IPA
步骤的不同模式:-

i) Add your apple developer id in xcode preference-> account

i) 在 xcode首选项->帐户中添加您的苹果开发者 ID

ii)Clean Build Folder :-

ii) 清理构建文件夹:-

enter image description here

在此处输入图片说明

iii) Archive

iii) 存档

enter image description here

在此处输入图片说明

iv) Tap on Distribute App

iv) 点击分发应用程序

enter image description here

在此处输入图片说明

v) Choose Ad-hoc to distribute on designated device

v) 选择 Ad-hoc 在指定设备上分发

enter image description here

在此处输入图片说明

6)Tricky part -> User can download app from company's website URL. Many of us might get stuck and start creating website url to upload ipa, which is not required. Simply write google website url with https. :)

6) 棘手的部分 -> 用户可以从公司的网站 URL 下载应用程序。我们中的许多人可能会卡住并开始创建网站 url 来上传ipa,这不是必需的。只需使用https编写 google 网站 url 。 :)

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明

7)Click on export and you get ipa.

7)点击导出,你会得到ipa。

enter image description here

在此处输入图片说明

8)Visit https://www.diawi.com/& drag and drop ipa you have downloaded. & share the link to your client/user who want to test :)

8) 访问https://www.diawi.com/并拖放您下载的 ipa。并将链接分享给想要测试的客户/用户:)

回答by Devansh Vyas

Easiest way, follow the steps :

最简单的方法,请按照以下步骤操作:

step 1: After Archive project, right click on project and select show in finder

步骤 1:存档项目后,右键单击项目并选择在查找器中显示

step 2: Right click on that project and select show as Show package contents, in that go to Products>Applications

第 2 步:右键单击该项目并选择显示为显示包内容,然后转到 Products>Applications

step 3: Right click on projectname.app

第 3 步:右键单击 projectname.app

step 4: Copy projectname.app into a empty folder and zip the folder(foldername.zip)

第 4 步:将 projectname.app 复制到一个空文件夹中并压缩该文件夹(foldername.zip)

step 5: Change the zipfolder extension to .ipa(foldername.zip -> foldername.ipa)

第 5 步:将 zipfolder 扩展名更改为 .ipa(foldername.zip -> foldername.ipa)

step 6: Now you have the final .ipa file

第 6 步:现在您有了最终的 .ipa 文件

回答by Rajesh

At the time of Building select device as iOS device. Then build the application. Select Product->Archive then select Share and save the .ipa file. Rename the ipa file to .zip and double click on zip file and you will get .app file in the folder. then compress the .app file of the application and iTunesArtwork image. it will be in the format .zip rename .zip to .ipa file.

在构建时选择设备作为 iOS 设备。然后构建应用程序。选择“产品”->“存档”,然后选择“共享”并保存 .ipa 文件。将 ipa 文件重命名为 .zip 并双击 zip 文件,您将在文件夹中获得 .app 文件。然后压缩应用程序的 .app 文件和 iTunesArtwork 图像。它将采用 .zip 格式,将 .zip 重命名为 .ipa 文件。

回答by Shareef

Here is the steps I followed to export the .ipa

这是我导出 .ipa 所遵循的步骤

  • Validate the archive
  • Click on on distribute the app
  • Click the distribution method
  • Choose the export in the next screen (The screen shown only if the archive is validated)
  • 验证存档
  • 单击分发应用程序
  • 点击分发方式
  • 在下一个屏幕中选择导出(仅当存档被验证时才会显示该屏幕)