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

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

How to create ipa in xcode 6 without Apple Developer account?

iosxcode6ipaad-hoc-distributionapple-id

提问by Khawar

Need to generate .ipafile for Ad-Hoc distribution. Client has provided only certificates, private keys and provisioning profiles which were enough to create .ipatill Xcode 5. But in Xcode 6.1 when I export as Save For Ad Hoc Deploymentit gives message

需要.ipa为 Ad-Hoc 分发生成文件。客户端只提供了足以在.ipaXcode 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'

enter image description hereenter image description here

在此处输入图片说明在此处输入图片说明

Is there any way of creating .ipawithout developer account credentials?

.ipa没有没有开发者帐户凭据的创建方法?

回答by Khawar

Finally found a way for creating .ipabuild with xcodebuildcommand.

终于找到了一种.ipa使用xcodebuild命令创建构建的方法。

  1. Right click on Archiveon Organizer.
  2. Click Show in Finder.
  3. You can see .xcarchivefile in Finder. enter image description here

  4. Open Terminaland cdto .xcarchivepath.

  5. Using following command to generate .ipafile.
  1. 右键单击Archive管理器。
  2. 单击Show in Finder
  3. 您可以.xcarchive在 Finder 中查看文件。 在此处输入图片说明

  4. 打开Terminalcd.xcarchive路径。

  5. 使用以下命令生成.ipa文件。

This will save .ipaon 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 链接)

  1. Just build (Command+B)your app from XCode by setting proper code signing identities
  2. From XCode'sfile search at left bottom, search for .app(This will be under product directory)
  3. Right Click on this .appfile and select Show in Finder
  4. Now, create directory and name it as Payload, copy .appinto Payload directory.
  5. Archive/Compress(.zip) this Payload directory, rename file extension from .zip to .ipa
  1. 只需(Command+B)通过设置正确的代码签名身份从 XCode构建您的应用程序
  2. XCode's左下角的文件搜索中,搜索.app(这将在产品目录下)
  3. 右键单击此.app文件并选择在 Finder 中显示
  4. 现在,创建目录并将其命名为Payload,复制.app到 Payload 目录中。
  5. 存档/压缩(.zip)这个有效载荷目录,将文件扩展名从 .zip 重命名为 .ipa


2. Extract .ipa from organizer

2.从组织者中提取.ipa

(Works on all Xcode, All Mac OS)

(适用于所有 Xcode,所有 Mac OS)

  1. Create Archive
  2. Go to Organizer
  3. Get location of Archive by Right Clickand selecting Show in Finder
  1. 创建档案
  2. 去组织者
  3. 通过右键单击并选择在 Finder 中显示来获取存档的位置

enter image description here

在此处输入图片说明

  1. Now right click on this .xcarchive file and select Show Package Contents
  2. Go to path Products > Applications > YourAppFile

  3. 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)

  4. Now right click on your app under Appstab of iTunes and select Show in Finder, this is your .ipa file !!!

  1. 现在右键单击这个 .xcarchive 文件并选择Show Package Contents
  2. 转到路径 Products > Applications > YourAppFile

  3. 在 Mac 上打开 iTunes 并从“应用程序”选项卡中的路径上方拖放此 YourAppFile。(注意:如果有,请删除具有相同标识符的上一个应用程序)

  4. 现在在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)

  1. Create Archive using any Xcode version.
  2. Close Xcode.
  3. Go to Organizer window of Xcode 5.x and from Archive tab select your archive.
  4. On top right section select Export, click radio button with title Save for Ad Hoc Deployment
  5. Click Nextand Select desired code signing identities to save .ipa
  1. 使用任何 Xcode 版本创建存档。
  2. 关闭 Xcode。
  3. 转到 Xcode 5.x 的 Organizer 窗口,然后从 Archive 选项卡中选择您的存档。
  4. 在右上角选择Export,单击带有标题的单选按钮Save for Ad Hoc Deployment
  5. 单击Next并选择所需的代码签名身份以保存 .ipa

回答by Krunal Darji

You can also create an IPA file using Xcode 6 & latest follow below steps:

您还可以使用 Xcode 6 和最新版本创建 IPA 文件,请按照以下步骤操作:

  1. Create Build File of your Project Command+B
  2. Go to Products folder & it will show app file right click "Show In Finder".
  3. Create an empty folder & call it 'Payload' then copy your app file in that folder.
  4. Archive Payload Folder & rename the zip file to YourApp.ipa
  1. 创建项目的构建文件 Command+B
  2. 转到产品文件夹,它会显示应用程序文件,右键单击“在 Finder 中显示”。
  3. 创建一个空文件夹并将其命名为“Payload”,然后将您的应用程序文件复制到该文件夹​​中。
  4. 存档有效负载文件夹并将 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>