xcode 如何制作ipa文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4711586/
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
How to make an ipa file?
提问by Veer
How can I create a ipa file for my iOS application?
如何为我的 iOS 应用程序创建 ipa 文件?
I have written the complete code for my iPhone app and now I'd like to make .ipa file.
我已经为我的 iPhone 应用程序编写了完整的代码,现在我想制作 .ipa 文件。
回答by henklein
- Within XCode choose Build > Build & Archive.
- In your XCode Organizer (Window > Organizer), you'll see your archived apps
- Select one, hit 'Share...' and 'Save to Disk'
- 在 XCode 中选择 Build > Build & Archive。
- 在您的 XCode 管理器(窗口 > 管理器)中,您将看到已归档的应用程序
- 选择一个,点击“共享...”和“保存到磁盘”
回答by visakh7
The one suggested by @heinklein is the easiest way but another option is to do the following.
@heinklein 建议的方法是最简单的方法,但另一种选择是执行以下操作。
- Add necessary profiles and adjust build settings.
- Set device as target to run the application.
- Build the product.
- Go to Products->yourAppName.app. Right click and show in finder.
- Drag & drop to itunes profile and binary file.
- Select app in iTunes and right click to show in Finder. And there you can get the .ipa file.
- 添加必要的配置文件并调整构建设置。
- 将设备设置为运行应用程序的目标。
- 构建产品。
- 转到产品-> yourAppName.app。右键单击并在查找器中显示。
- 拖放至 iTunes 配置文件和二进制文件。
- 在 iTunes 中选择应用程序并右键单击以在 Finder 中显示。在那里你可以得到 .ipa 文件。
回答by Dharmesh Siddhpura
Sometimes it may happen that Xcode Archiver fails to generate ipa file. Then here is the another option.
有时可能会发生 Xcode Archiver 无法生成 ipa 文件的情况。那么这里是另一种选择。
- Build the application.
- After successful build go to "Products" folder in your project navigator.
- Right click on it and go to "Show in Finder".
- Copy the .app file.
- Create a new folder at some other location lets say on Desktop with name "Payload".
- Paste that .app file in Payload folder.
- Zip the Payload folder.
- Rename that zipped folder with .ipa
- 构建应用程序。
- 成功构建后,转到项目导航器中的“产品”文件夹。
- 右键单击它并转到“在 Finder 中显示”。
- 复制 .app 文件。
- 在其他位置创建一个新文件夹,让我们在桌面上命名为“Payload”。
- 将该 .app 文件粘贴到 Payload 文件夹中。
- 压缩 Payload 文件夹。
- 使用 .ipa 重命名该压缩文件夹
Thats it.
就是这样。
Reverse procedure is used to retrieve the app file from an ipa file.
反向过程用于从 ipa 文件中检索应用程序文件。
Hope this answer helps.
希望这个答案有帮助。
回答by Balan Prabhu
Stepwise Procedure to create an IPA file,
创建 IPA 文件的逐步程序,
1.First of all,choose your device as IOS Devicein Schemenear Breakpoint tab in Xcode.
所有1.首先,选择您的设备如IOS设备中的方案接近在Xcode断点选项卡。
2.In Xcode menu,Product->Clean and build your application.
2.在 Xcode 菜单中,Product->Clean and build your application。
3.If the provisioning certificate is not valid,it will lead to build failed with an error.If so you have to change it to a valid certificate through your project->build settings.Else if build succeeded just leave this step.
3.如果配置证书无效,将导致构建失败并报错。如果是这样,您必须通过您的项目->构建设置将其更改为有效证书。否则,如果构建成功,则离开此步骤。
4.Then select Product->archive,it will create an archive file in Organiser->archives and open it up for you after archive finished.
4.然后选择Product->archive,它会在Organiser->archives中创建一个存档文件,并在存档完成后为您打开。
5.choose sharetab in Organiser followed by contents->.ipa and Identity->choose your valid distribution certificate and click next.
5. 在 Organizer 中选择share选项卡,然后是 contents->.ipa 和 Identity-> 选择您的有效分发证书,然后单击下一步。
6.within a minute it will ask name for your IPA file to save.Give a name and save it in Desktop.
6. 一分钟之内,它会询问您要保存的 IPA 文件的名称。给一个名称并将其保存在桌面中。
7.Open iTunes and drag and drop your IPA file in Library->Apps.
7.打开 iTunes 并将您的 IPA 文件拖放到 Library->Apps 中。
8.Now connect and select your Device in itunes->choose apps tab under it and sync your app ipa to the Device.It will install your IPA file to the device.
8.现在连接并在itunes中选择您的设备->选择其下的应用程序选项卡并将您的应用程序ipa同步到设备。它将安装您的IPA文件到设备。
9.Thats all.Now you can run your App IPA file in your device.
9.多数民众赞成。现在您可以在您的设备中运行您的应用程序 IPA 文件。
回答by Jayprakash Dubey
Using Archive process with Xcode 9.0
在 Xcode 9.0 中使用存档进程
- Clean your project from
Product
->Clean
(cmd + shift + k
) - Select
Product
->Archive
- 从
Product
->Clean
(cmd + shift + k
)清理您的项目 - 选择
Product
->Archive
- Once archive is successfully completed it will open in
Organizer window
- Press
Export
button present on right side
- 存档成功完成后,它将在
Organizer window
- 按下
Export
右侧的按钮
- Now select the distribution method as per your need and click on
Next
button
- 现在根据您的需要选择分配方法,然后单击
Next
按钮
- This will show the App Store distribution options. Now click on
Next
button
- 这将显示 App Store 分发选项。现在点击
Next
按钮
- Re-sign your project (preferred is
Automatically manage signing
) and click onNext
button
- 重新签署您的项目(首选是
Automatically manage signing
)并单击Next
按钮
- There will be Review window containing IPA content details. Click on
Export
.
- 将出现包含 IPA 内容详细信息的查看窗口。单击
Export
。
- Now choose the location where folder is to be saved and Click on
Export
.
- 现在选择要保存文件夹的位置,然后单击
Export
。
- This will create an folder containing
IPA
, packaging.log, DistributionSummary.plist and ExportOptions.plist file
- 这将创建一个包含
IPA
package.log、DistributionSummary.plist 和 ExportOptions.plist 文件的文件夹
回答by madLokesh
As of Xcode 4.3, there is no option of Share in organizer. You need to select distribute and then select the option for save as enterprise or adhoc application.
从 Xcode 4.3 开始,没有在组织者中共享的选项。您需要选择分发,然后选择另存为企业或临时应用程序的选项。
回答by Hardik Mamtora
- First complete your coding check it with your provisioning profile.
- Then click to run on device or ipad.
- then go to menu -> prodcut -> clean.
- After cleaning menu -> product -> Archive .
- After completing it click on share and click on next button.
- It will take a minute as per your app file size.
- then give a name of ipa and save it where you want.
- 首先使用您的配置文件完成您的编码检查。
- 然后单击以在设备或 ipad 上运行。
- 然后转到菜单-> 产品-> 清洁。
- 清理后菜单 -> 产品 -> 存档。
- 完成后点击分享,然后点击下一步按钮。
- 根据您的应用程序文件大小,这将需要一分钟。
- 然后给 ipa 命名并将其保存在您想要的位置。
回答by Ethan Le
I'm using xCode 7.2 and have just exported an .api.ipa file to upload to Diawi to share the app with my friends. So here is how I did it:
我正在使用 xCode 7.2 并且刚刚导出了一个.api.ipa 文件以上传到 Diawi 以与我的朋友分享该应用程序。所以这就是我是如何做到的:
- Product -> Archive
- After a while, the Organizer would show up -> Export
- Choose something with Ad-hoc, xCode would generate a folder with the .api file in your desktop
- 产品 -> 存档
- 一段时间后,组织者会出现 -> 导出
- 选择带有 Ad-hoc 的东西,xCode 会在你的桌面上生成一个带有 .api 文件的文件夹
Hope this would help!
希望这会有所帮助!
回答by sivi
Hope it helps someone: if you are kicked out of organiser this is how to re-open it. From there you can compile ipa file as recommended. AD Hoc is for sharing ipa by email and you need to archive for "Generic iOS device".
希望它对某人有所帮助:如果您被踢出组织者,这是重新打开它的方法。从那里您可以按照建议编译 ipa 文件。AD Hoc 用于通过电子邮件共享 ipa,您需要为“通用 iOS 设备”存档。