ios 如何在没有 Apple Developer 帐户的情况下在 xcode 6 中创建 ipa?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26928721/
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 create ipa in xcode 6 without Apple Developer account?
提问by Khawar
Need to generate .ipa
file for Ad-Hoc distribution. Client has provided only certificates, private keys and provisioning profiles which were enough to create .ipa
till Xcode 5. But in Xcode 6.1 when I export as Save For Ad Hoc Deployment
it gives message
需要.ipa
为 Ad-Hoc 分发生成文件。客户端只提供了足以在.ipa
Xcode 5 之前创建的证书、私钥和配置文件。但是在 Xcode 6.1 中,当我导出时,Save For Ad Hoc Deployment
它给出了消息
To save for Ad Hoc Deployment, you need to add an Apple ID account that is enrolled in the iOS Developer Program for the development team 'xxxxxxxxxx'
Is there any way of creating .ipa
without developer account credentials?
有.ipa
没有没有开发者帐户凭据的创建方法?
回答by Khawar
Finally found a way for creating .ipa
build with xcodebuildcommand.
终于找到了一种.ipa
使用xcodebuild命令创建构建的方法。
- Right click on
Archive
on Organizer. - Click
Show in Finder
. You can see
.xcarchive
file in Finder.Open
Terminal
andcd
to.xcarchive
path.- Using following command to generate
.ipa
file.
- 右键单击
Archive
管理器。 - 单击
Show in Finder
。 您可以
.xcarchive
在 Finder 中查看文件。打开
Terminal
和cd
到.xcarchive
路径。- 使用以下命令生成
.ipa
文件。
This will save .ipa
on Desktop.
这将保存.ipa
在桌面上。
xcodebuild -exportArchive -exportFormat ipa -archivePath <FILE_NAME>.xcarchive -exportPath ~/Desktop/<FILE_NAME>.ipa
Still looking for better solution, don't know why Apple removed this feature from Xcode 6 :(
仍在寻找更好的解决方案,不知道为什么 Apple 从 Xcode 6 中删除了此功能:(
回答by Aditya Deshmane
There are 3 WAYSto create .ipa WITHOUTCommand & Apple Developer Account.
有3 种方法可以在没有命令和 Apple Developer Account 的情况下创建 .ipa 。
1. Fast & Best
1. 快速和最佳
(Works on all Xcode, All Mac OS, Bundled package can be used for OTA links like Diawi)
(适用于所有 Xcode,所有 Mac OS,Bundled 包可用于Diawi等 OTA 链接)
- Just build
(Command+B)
your app from XCode by setting proper code signing identities - From
XCode's
file search at left bottom, search for.app
(This will be under product directory) - Right Click on this
.app
file and select Show in Finder - Now, create directory and name it as Payload, copy
.app
into Payload directory. - Archive/Compress(.zip) this Payload directory, rename file extension from .zip to .ipa
- 只需
(Command+B)
通过设置正确的代码签名身份从 XCode构建您的应用程序 - 从
XCode's
左下角的文件搜索中,搜索.app
(这将在产品目录下) - 右键单击此
.app
文件并选择在 Finder 中显示 - 现在,创建目录并将其命名为Payload,复制
.app
到 Payload 目录中。 - 存档/压缩(.zip)这个有效载荷目录,将文件扩展名从 .zip 重命名为 .ipa
2. Extract .ipa from organizer
2.从组织者中提取.ipa
(Works on all Xcode, All Mac OS)
(适用于所有 Xcode,所有 Mac OS)
- Create Archive
- Go to Organizer
- Get location of Archive by Right Clickand selecting Show in Finder
- 创建档案
- 去组织者
- 通过右键单击并选择在 Finder 中显示来获取存档的位置
- Now right click on this .xcarchive file and select Show Package Contents
Go to path
Products > Applications > YourAppFile
Open iTunes's on Mac and drag-drop this YourAppFilefrom above path in Appstab. (NOTE: Delete the previous app with the same identifier if any)
Now right click on your app under Appstab of iTunes and select Show in Finder, this is your .ipa file !!!
- 现在右键单击这个 .xcarchive 文件并选择Show Package Contents
转到路径
Products > Applications > YourAppFile
在 Mac 上打开 iTunes 并从“应用程序”选项卡中的路径上方拖放此 YourAppFile。(注意:如果有,请删除具有相同标识符的上一个应用程序)
现在在iTunes 的应用程序选项卡下右键单击您的应用程序并选择在 Finder 中显示,这是您的 .ipa 文件!!!
3. For devs having Xcode 5.x
3. 对于拥有 Xcode 5.x 的开发者
(NOTE:Xcode 5.x doesn't work on El Capitan, By this way you can archive using any Xcode but you will need Xcode 5.x to create .ipa)
(注意:Xcode 5.x 不适用于 El Capitan,通过这种方式,您可以使用任何 Xcode 进行存档,但您需要 Xcode 5.x 来创建 .ipa)
- Create Archive using any Xcode version.
- Close Xcode.
- Go to Organizer window of Xcode 5.x and from Archive tab select your archive.
- On top right section select
Export
, click radio button with titleSave for Ad Hoc Deployment
- Click
Next
and Select desired code signing identities to save .ipa
- 使用任何 Xcode 版本创建存档。
- 关闭 Xcode。
- 转到 Xcode 5.x 的 Organizer 窗口,然后从 Archive 选项卡中选择您的存档。
- 在右上角选择
Export
,单击带有标题的单选按钮Save for Ad Hoc Deployment
- 单击
Next
并选择所需的代码签名身份以保存 .ipa
回答by Krunal Darji
You can also create an IPA file using Xcode 6 & latest follow below steps:
您还可以使用 Xcode 6 和最新版本创建 IPA 文件,请按照以下步骤操作:
- Create Build File of your Project
Command+B
- Go to Products folder & it will show app file right click "Show In Finder".
- Create an empty folder & call it 'Payload' then copy your app file in that folder.
- Archive Payload Folder & rename the zip file to
YourApp.ipa
- 创建项目的构建文件
Command+B
- 转到产品文件夹,它会显示应用程序文件,右键单击“在 Finder 中显示”。
- 创建一个空文件夹并将其命名为“Payload”,然后将您的应用程序文件复制到该文件夹中。
- 存档有效负载文件夹并将 zip 文件重命名为
YourApp.ipa
回答by Asif Bilal
There is even better way without doing all the command line stuff.
没有做所有命令行的东西,还有更好的方法。
Select "Save For Ad Hoc Deployment" & Click Next. Then open the "select a development team" drop down. It will have the option "Use Local singing assets" at the bottom. Select this option & Click Choose.
选择“保存用于临时部署”并单击“下一步”。然后打开“选择开发团队”下拉菜单。它将在底部提供“使用本地歌唱资产”选项。选择此选项并单击选择。
Here you go. The build will be created by Xcode without Apple ID Account.
干得好。构建将由没有 Apple ID 帐户的 Xcode 创建。
回答by Franco Carbonaro
Another solution is to use Xcode 5.1.
另一种解决方案是使用 Xcode 5.1。
回答by Leszek Zarna
From some time (for example Swift & Xcode7) when you are to make a build formula is more complicated - xcodebuild requires exportOptionsPlist parameter:
从某个时候开始(例如 Swift 和 Xcode7),当您要制作构建公式时会更加复杂 - xcodebuild 需要 exportOptionsPlist 参数:
xcodebuild -exportArchive -exportOptionsPlist app.plist -archivePath app.xcarchive -exportPath app.ipa
and app.plist contains:
和 app.plist 包含:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>uploadSymbols</key>
<true/>
</dict>
</plist>