生成未签名的 IPA iOS 应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25396299/
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
Generating an unsigned IPA iOS application
提问by Diego Barros
Is it possible to create an unsigned iOS app, .ipa file? We have an enterprise customer that requires an unsigned IPA file of our iOS application, which they will then sign with their MAM product.
是否可以创建未签名的 iOS 应用程序 .ipa 文件?我们有一个企业客户需要我们的 iOS 应用程序的未签名 IPA 文件,然后他们将使用他们的 MAM 产品签名。
If it's possible, how can I do this?
如果可能,我该怎么做?
回答by Rashad
Once I copy it from a blog. The steps are as follow:
一旦我从博客复制它。步骤如下:
Build unsigned .ipa without Developer Account on Xcode 5
在 Xcode 5 上构建没有开发人员帐户的未签名 .ipa
To Disable Code Signing:
禁用代码签名:
1.1 GoTo /Applications then right click Xcode.app and click "Show Package Contents"
1.1 转到 /Applications 然后右键单击 Xcode.app 并单击“显示包内容”
1.2 GoTo Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/ and copy the file SDKSettings.plist to desktop
1.2 转到 Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/ 并将文件 SDKSettings.plist 复制到桌面
1.3 Open the file copied SDKSettings.plist. Under "DefaultProperties" ==> "dict"
find CODE_SIGNING_REQUIRED
and change its value from YES
to NO
. Save the file
1.3 打开复制的SDKSettings.plist文件。在"DefaultProperties" ==> "dict"
find 下CODE_SIGNING_REQUIRED
并将其值从 更改YES
为NO
。保存文件
1.4 Copy this modified SDKSettings.plist file back to Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/
replacing the orginal file [YOU MAY SAVE THE ORIGINAL FILE AS BACKUP]
Do the required AUTHENTICATION AS REQUIRED
1.4 将此修改后的 SDKSettings.plist 文件复制回Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/
替换原始文件 [YOU MAY THE ORIGINAL FILE AS BACKUP] 执行所需的 AUTHENTICATION AS REQUIRED
1.5 Restart Xcode and open your runnable xcode project
1.5 重启Xcode并打开你的可运行xcode项目
1.6 In Project Navigator select your project and open Build Settings section of your porject and Select All sub-heading.
1.6 在 Project Navigator 中选择您的项目并打开您的项目的 Build Settings 部分和 Select All 子标题。
1.7 Under Code Signing find Code Signing Identity and for both Debug and Release modes set Any iOS SDK to Don't Code Sign.
1.7 在代码签名下找到代码签名标识,对于调试和发布模式,将任何 iOS SDK 设置为不进行代码签名。
To make an IPA:
制作 IPA:
2.1 In Xcode, goto Product and click Archive
2.1 在 Xcode 中,转到 Product 并单击 Archive
2.2 7th step will build you project and creat an Archive. After the completion of the process, new window Organize - Archive will be opened. In the list of this window you can see your project. Right click project and click Show in Finder which will reveal *.xcarchive file
2.2 第 7 步将构建您的项目并创建一个存档。该过程完成后,将打开新窗口组织 - 存档。在此窗口的列表中,您可以看到您的项目。右键单击项目并单击在 Finder 中显示这将显示 *.xcarchive 文件
2.3 Right click the *.xcarchive file and click Show Package Contents and goto Products => Applications where you will see an app file with the name of your project "projectname".app
2.3 右键单击 *.xcarchive 文件,然后单击 Show Package Contents 并转到 Products => Applications,您将在其中看到一个名为“projectname”.app 的应用程序文件
2.4 Open iTunes change view to Apps and drag the app file "projectname".app into the iTunes.
2.4 打开 iTunes 更改视图到 Apps 并将应用程序文件“projectname”.app 拖入 iTunes。
2.5 Right Click your app, click Show in Finder. There you will have you .ipa file.
2.5 右键单击您的应用程序,单击在 Finder 中显示。在那里,您将拥有 .ipa 文件。
Important Notes :
重要笔记 :
3.1 In Step 2.1, if the Archive menu is disabled this is most likely because the a simulator option is currently selected as the run target in the Xcode toolbar. Changing this menu either to a connected device, or the generic iOS Device target option should enable the Archive option in Product menu.
3.1 在步骤 2.1 中,如果存档菜单被禁用,这很可能是因为当前在 Xcode 工具栏中选择了模拟器选项作为运行目标。将此菜单更改为连接的设备或通用 iOS 设备目标选项应启用产品菜单中的存档选项。
3.2 You will also need to install AppSync in your iPhone via Cydia.
3.2 您还需要通过 Cydia 在您的 iPhone 中安装 AppSync。
回答by Daniel Broad
The easiest way is to build on the command line.
最简单的方法是在命令行上构建。
/usr/bin/xcodebuild -scheme MYSCHEME -workspace MYWORKSPACE.xcworkspace
-configuration Release clean archive -archivePath "build/APPNAME.xcarchive"
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
回答by Brad Allred
yes, this is possible; I do this currently with Xcode 5/iOS 7 SDK.
是的,这是可能的;我目前使用 Xcode 5/iOS 7 SDK 执行此操作。
you must edit the /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.*.sdk/SDKSettings.plist
file as below.
您必须/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.*.sdk/SDKSettings.plist
按如下方式编辑文件。
change this:
改变这个:
<key>CODE_SIGNING_REQUIRED</key>
<string>YES</string>
to this:
对此:
<key>CODE_SIGNING_REQUIRED</key>
<string>NO</string>
The directions I have used are taken from this Wiki herewhich may provide you some additional helpful information.
我使用的说明取自此处的 Wiki,它可能会为您提供一些额外的有用信息。
There may be some additional changes you need to make to the build settings such as Code Signing Identity
and Provisioning Profile
(probably just set these to none)
您可能需要对构建设置进行一些额外的更改,例如Code Signing Identity
和Provisioning Profile
(可能只是将这些设置为无)
回答by PestyDestroyer
These were my steps after iTunes 12.7.0 since they removed the App Viewmenu item.
这些是我在 iTunes 12.7.0 之后的步骤,因为他们删除了App View菜单项。
2.4 - Create a new New Folder called Payload
2.4 - 创建一个名为 Payload 的新文件夹
2.5 - Add the "procjectname".app into the Payload folder
2.5 - 将“procjectname”.app 添加到 Payload 文件夹中
2.6 - Compress the file into a zip folder
2.6 - 将文件压缩到一个 zip 文件夹中
2.7 - Rename the file from Payload.zip to "projectname".zip
2.7 - 将文件从 Payload.zip 重命名为“projectname”.zip
2.8 - Change from "projectname".zip to "projectname".ipa
2.8 - 从“项目名称”.zip 更改为“项目名称”.ipa
回答by Alok
Steps to create unsigned IPA(Tested on Xcode 9.4.1)
创建未签名 IPA 的步骤(在 Xcode 9.4.1 上测试)
Step 1:Open finder > Go to Folder..as below screen
第 1 步:打开 finder > Go to Folder..如下图所示
and then copy and paste the below line:
然后复制并粘贴以下行:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.*.sdk/SDKSettings.plist
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.*.sdk/SDKSettings.plist
Open iPhoneOS.sdk as showing in below image:
Step 2:Copy the SDKSettings plist in another folder because you can't make changes here:
第 2 步:将 SDKSettings plist 复制到另一个文件夹中,因为您无法在此处进行更改:
Step 3:Make change in duplicate
第 3 步:进行一式两份更改
set CODE_SIGNING_REQUIRED to NO
将 CODE_SIGNING_REQUIRED 设置为 NO
Step 4:Now replace duplicate Plist with original one (Both name must be same). This will also ask admin permission to change.
第 4 步:现在用原始 Plist 替换重复的 Plist(两个名称必须相同)。这也将要求管理员权限进行更改。
Warning: Please make sure you have copied the original plist and save somewhere for future reference.
警告:请确保您已复制原始 plist 并保存在某处以备将来参考。
Step 5:Now set code signing identity to as below image:
and now you can create the Archive file
**Step 6:**Right click on this test Archive file and show in finder:
**第 6 步:**右键单击此测试存档文件并在查找器中显示:
Again right click and click on show package contents
再次右键单击并单击显示包内容
then Products>Applications>and copy the .App file
然后产品>应用程序>并复制.App文件
Step 7:
第 7 步:
- Copy the .app file into a new subfolder named Payload (this folder name is case sensitive)
- press Payload folder and rename it to app_name-version_number.ipa
- Example- Test-version_1.1.ipa
- 将 .app 文件复制到名为 Payload 的新子文件夹中(此文件夹名称区分大小写)
- 按 Payload 文件夹并将其重命名为 app_name-version_number.ipa
- 示例- Test-version_1.1.ipa
And finally you have unsigned IPA file :)
最后你有未签名的 IPA 文件:)
Note: After done with your app changes replace the original plist again or set set CODE_SIGNING_REQUIRED to YES
注意:完成您的应用更改后,再次替换原始 plist 或将 set CODE_SIGNING_REQUIRED 设置为 YES