ios 如何将 .xcarchive 转换为 .ipa 以便客户端使用 Application Loader 将应用程序提交到应用程序商店
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14934808/
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 convert .xcarchive to .ipa for client to submit app to app store using Application Loader
提问by aobs
We have created the .xcarchive file code signing with our client's certificate & distribution provisioning profile, but we need to send the .ipa file to our client so that they can upload the app to the App store using Application Loader.
我们已经使用客户的证书和分发配置文件创建了 .xcarchive 文件代码签名,但我们需要将 .ipa 文件发送给我们的客户,以便他们可以使用 Application Loader 将应用程序上传到 App Store。
The only way to create the .ipa file in Xcode 4.5 is clicking Distribute -> Save for Enterprise or Ad-Hoc Deployment which has a description underneath saying "Sign and package application for distribution outside of the iOS App Store".
在 Xcode 4.5 中创建 .ipa 文件的唯一方法是单击“分发”->“为企业或临时部署保存”,其下方有说明“签名并打包应用程序以便在 iOS App Store 之外分发”。
If we save the .ipa file this way, will it cause any problem submitting to the app store? Or is there a proper way of converting the .xcarchive to .ipa?
如果我们这样保存.ipa文件,提交到应用商店会不会有问题?或者是否有将 .xcarchive 转换为 .ipa 的正确方法?
Thanks in advance!
提前致谢!
采纳答案by Guru
I also observed the same problem in one of my projects.
我也在我的一个项目中观察到了同样的问题。
I resolved it by changing settings in target. For main project and dependency.
我通过更改目标中的设置解决了它。对于主项目和依赖项。
skip Install NO
After this change, goto Xcode->Product->Archive->Save for Enterprise or Ad-Hoc Deployment
更改后,转到 Xcode->Product->Archive->Save for Enterprise or Ad-Hoc Deployment
We followed the same process and uploaded through Application Loader and Apple approved the app.
我们遵循相同的流程并通过 Application Loader 上传,Apple 批准了该应用程序。
回答by Mehul Thakkar
- Create Xarchieve file by using Xcode, click product->archive
- first right click on xarchive file-> show in finder
- again right click on xarchive file-> show package contents
- Then open folder products->applications, here you get the your application file
Now, Drag and drop this one to itunes store's app directory(find apps drop down menu at right top corner of itunes store). This will automatically converts archive file to ipa file. (Here, you can also do this -> drag and drop .app file anywhere in itunestore, once it get processed, search it back from search box).
then again right click on it and ->show in finder, this will show your ipa file. Now you can give this one to any user
- 使用Xcode创建Xarchieve文件,点击product->archive
- 首先右键单击 xarchive 文件-> 在查找器中显示
- 再次右键单击 xarchive 文件-> 显示包内容
- 然后打开文件夹products->applications,这里你得到你的应用程序文件
现在,将其拖放到 iTunes 商店的应用程序目录(在 iTunes 商店的右上角找到应用程序下拉菜单)。这将自动将存档文件转换为 ipa 文件。(在这里,您也可以这样做 -> 将 .app 文件拖放到 itunestore 中的任何位置,一旦处理完毕,请从搜索框中搜索回来)。
然后再次右键单击它并->在finder中显示,这将显示您的ipa文件。现在你可以把这个给任何用户
回答by Jason Moore
Updated for Xcode 7 and 8
为 Xcode 7 和 8 更新
Here is a script to create the archive and generate the .ipa - tweak as needed:
这是一个用于创建存档并生成 .ipa 的脚本 - 根据需要进行调整:
PROJECT=xxx
ARCHIVE_PATH=/tmp/${PROJECT}.xcarchive
EXPORT_PATH=/tmp/${PROJECT} # DIRECTORY
mkdir -p $ARCHIVE_PATH
xcodebuild -project ./${PROJECT}.xcodeproj -scheme ${SCHEME} archive -archivePath $ARCHIVE_PATH -verbose
PLIST='{"compileBitcode":false,"method":"enterprise"}' # edit as needed
EXPORT_PLIST=/tmp/${PROJECT}.plist
echo $PLIST | plutil -convert xml1 -o $EXPORT_PLIST -
xcodebuild -exportArchive -archivePath $ARCHIVE_PATH -exportPath $EXPORT_PATH -exportOptionsPlist $EXPORT_PLIST
回答by Vahid Amiri
First Product > Archive then Right click on the generated xcodearchive
file and select Show package content
and go to the Products -> Applications
folder. Create a new folder named Payload
and drag the .app
file into that folder. Compress the Payload
folder and rename it to whatever you want and change the extention to .ipa
.
首先产品>存档然后右键单击生成的xcodearchive
文件并选择Show package content
并转到Products -> Applications
文件夹。创建一个名为的新文件夹Payload
并将.app
文件拖到该文件夹中。压缩Payload
文件夹并将其重命名为您想要的任何名称并将扩展名更改为.ipa
.
If your app size is too large, you can disable bit code in the build settings to make it 50-70% smaller.
如果您的应用程序尺寸太大,您可以在构建设置中禁用位代码,使其小 50-70%。
回答by Jayprakash Dubey
You can create an IPA from XCArchive.
您可以从 XCArchive 创建 IPA。
- Right click on ProjectName [Date Time].xcarchive
- Select Show Package Content.
- 右键单击ProjectName [Date Time].xcarchive
- 选择显示包内容。
It comprises of three things :
它包括三件事:
a. dSYMs: dSYM files store the debug symbols for your app.
一种。dSYMs:dSYM 文件存储应用程序的调试符号。
b. Info.plist: property list containing details such as ApplicationProperties, ArchiveVersion, CreationDate, Name, Scheme.
湾 Info.plist:包含详细信息的属性列表,例如 ApplicationProperties、ArchiveVersion、CreationDate、Name、Scheme。
c. Products: This contains App file for your project.
C。产品:这包含您的项目的应用程序文件。
Select Products -> Applications. This contains app file.
Now, drag-and-drop app file into iTunes (MyApps Tab).
Select your project.
Right click and select 'Show in finder'. This will locate newly created IPA file.
选择产品 -> 应用程序。这包含应用程序文件。
现在,将应用程序文件拖放到 iTunes(MyApps 选项卡)中。
选择您的项目。
右键单击并选择“在查找器中显示”。这将找到新创建的 IPA 文件。
回答by brian.clear
XCode > Project > Archive
XCode > Organizer > Distribute > Enterprise/add Hoc > Save As
Saves as YOURAPP.ipa.
Make sure Save for Enterprise Deploy remains UNCHECKED.
Download latest Application Loader.
tap 'Deliver Your App'
make sure new version in itunes connect in WAITING FOR UPLOAD state
Click on Activity... button
TIP: open Console.app to see XCode Validation errors
提示:打开 Console.app 以查看 XCode 验证错误
Click on ALL MESSAGE on list of logs on right.
Then in search enter 'XCode' or 'Application Loader'
to monitor any errors with your upload.
Note:
笔记:
I did all this and still got email about missing 120x120 icons.
我做了所有这些,但仍然收到关于缺少 120x120 图标的电子邮件。
Forgot to update them in Build Target > General Tab List of new icon requirements for iOS7 http://www.icenium.com/resources/forums/icenium-general-discussion/missing-recommended-icon-file
忘记在 iOS7 的新图标要求的构建目标 > 常规选项卡列表中更新它们 http://www.icenium.com/resources/forums/icenium-general-discussion/missing-recommended-icon-file
回答by Ohad Schneider
If you need this from the command-line, you can find all the details here: http://encyclopediaofdaniel.com/blog/xcarchive-to-ipa. In short:
如果您需要通过命令行执行此操作,可以在此处找到所有详细信息:http: //encyclopediaofdaniel.com/blog/xcarchive-to-ipa。简而言之:
xcodebuild
-exportArchive -archivePath <path to archive> -exportPath <path to output>
-exportOptionsPlist <path to export options plist>
Where a minimal options plist looks like this:
最小选项 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>
</dict>
</plist>
Of course the methodwill change according to the provisioning profile type you used (app-store
is for distribution profiles). Run xcodebuild --help
to see the list of available options.
当然,该方法会根据您使用的配置文件类型(app-store
用于分发配置文件)而改变。运行xcodebuild --help
以查看可用选项列表。