如何在不登录 Xcode 8 的情况下构建 IPA

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/40730051/
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-09-15 09:36:14  来源:igfitidea点击:

How to build an IPA without signing in Xcode 8

iosxcodexcode8ipa

提问by James Cockerham

I have searched around SO and other places. I have only found older versions of this answer that don't seem to work any more, and tons of other stuff that isn't even relevant in the latest version.

我在 SO 和其他地方搜索过。我只发现这个答案的旧版本似乎不再起作用,还有很多其他东西甚至在最新版本中都不相关。

Long story short, we have a developer providing an IPA to us, who doesn't want to join our developer group. I told him to send us an unsigned IPA, but we couldn't get it figured out based on our old process.

长话短说,我们有一个开发人员向我们提供 IPA,他不想加入我们的开发人员组。我告诉他给我们发送一个未签名的 IPA,但我们无法根据我们的旧流程弄清楚它。

Has anyone done this yet, and would you mind sharing your method with the world?

有没有人做过这个,你介意与世界分享你的方法吗?

Thanks!

谢谢!

回答by James Cockerham

I ended up finding a working solution for xcode 8. Here is the step by step

我最终为 xcode 8 找到了一个可行的解决方案。这是一步一步

  1. (Optional) Change build location
  1. (可选)更改构建位置

Xcode>preferences>locations>derived data>custom>your desktop

Xcode>首选项>位置>派生数据>自定义>您的桌面

  1. Open Terminal and navigate to the project's folder
  2. Run manual build: xcodebuild -workspace (or -project) [workspacename.xcworkspace] -scheme [Schemename] -sdk iphoneos -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
  3. Open the location from Step 1 (derived data) and navigate to >your app>build>products>Release-iphoneOS
  4. Copy the .app file into a new subfolder named Payload(this folder name is case sensitive and much match verbatim)
  5. Compress Payloadfolder and rename it to app_name-version_number.ipa
  1. 打开终端并导航到项目的文件夹
  2. 运行手动构建: xcodebuild -workspace (or -project) [workspacename.xcworkspace] -scheme [Schemename] -sdk iphoneos -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
  3. 打开第 1 步中的位置(派生数据)并导航到>您的应用程序>构建>产品>Release-iphoneOS
  4. 将 .app 文件复制到一个名为的新子文件夹中Payload(此文件夹名称区分大小写并且逐字匹配)
  5. 压缩Payload文件夹并将其重命名为 app_name-version_number.ipa

Boom. Done.

繁荣。完毕。

回答by gopinath

Create Xarchieve file by using Xcode, click product->archive

使用Xcode创建Xarchieve文件,点击product->archive

first right click on xarchieve file-> show in finder

首先右键单击 xarchieve 文件-> 在 finder 中显示

again right click on xarchieve file-> show package contents

再次右键单击 xarchieve 文件-> 显示包内容

Then open folder products->applications, here you get the your application file

然后打开文件夹products->applications,这里你得到你的应用程序文件

Now, Drag and drop this one to itunes store's app directory(find apps drop down

现在,将这个拖放到 iTunes 商店的应用程序目录(查找应用程序下拉菜单)

menu at right top corner of itunes store). This will automatically converts

iTunes 商店右上角的菜单)。这将自动转换

archieve file to ipa file. (Here, you can also do this -> drag and drop .app

归档文件到 ipa 文件。(在这里,您也可以这样做 -> 拖放 .app

file anywhere in itunestore, once it get processed, search it back from search box).

itunesstore 中任何位置的文件,处理后,从搜索框中搜索它)。

then again right click on it and ->show in finder, this will show your ipa file.

然后再次右键单击它并 -> 在查找器中显示,这将显示您的 ipa 文件。

Now you can give this one to any user

现在你可以把这个给任何用户

回答by barney

To run the unsigned build (IPA) on the device: (In case if you don't have apple dev subscription)

在设备上运行未签名的构建(IPA):(如果你没有苹果开发订阅)

1) you need unsigned IPA You can use these steps described above (xcodebuild...) OR you could use "Archive" option and then navigate to Organizer and right-click "Show in Finder" then open Terimnal and invoke:

1)您需要未签名的 IPA 您可以使用上述这些步骤(xcodebuild ...),或者您可以使用“存档”选项,然后导航到管理器并右键单击“在 Finder 中显示”,然后打开终端并调用:

xcodebuild -exportArchive -exportFormat ipa -archivePath <FILE_NAME>.xcarchive -exportPath ~/Desktop/<FILE_NAME>.ipa

2) you use open source tool iOS APP SIGNER (beware this is opensource but I would recommend to strip off the NimbusKit as it looks very suspicious and its not required to produce a signed IPA just remove the #import and one function call - fix all build errors and you'll get the clean tool)

2)你使用开源工具iOS APP SIGNER(注意这是开源的,但我建议去掉NimbusKit,因为它看起来很可疑,不需要生成签名的IPA,只需删除#import和一个函数调用——修复所有构建错误,您将获得干净的工具)

http://dantheman827.github.io/ios-app-signer/

http://dantheman827.github.io/ios-app-signer/

The idea is that XCode allows users to RUN their own apps on their own devices now without subscription (only with valid apple id) So its somehow fetches the profile based on app bundle ID that's how you can send your IPA to another user and he could re-sign it using some trickery to force XCode to fetch the provisioning profile from the Apple. Check the URL to full instructions how to setup DUMMY project with matching BUNDLE ID to do it

这个想法是 XCode 允许用户现在无需订阅即可在自己的设备上运行他们自己的应用程序(仅使用有效的 Apple ID)因此它以某种方式根据应用程序包 ID 获取配置文件,这就是您可以将 IPA 发送给另一个用户的方式,他可以使用一些技巧重新签名以强制 XCode 从 Apple 获取配置文件。检查 URL 以获取完整说明如何使用匹配的 BUNDLE ID 设置 DUMMY 项目来执行此操作

回答by Parth Adroja

Without any provisioning profile i.e. signing you won't be able to run on the device. You can create IPA using payload method just build the project and go project navigator and search for the file project_name.app and select show in finder by right clicking. Then create a folder named PayLoad and then put that app file in it and create zip of that Payload folder and once zip is created rename that zip to your project_name.ipa

如果没有任何配置文件,即签名,您将无法在设备上运行。您可以使用有效负载方法创建 IPA,只需构建项目并转到项目导航器并搜索文件 project_name.app 并通过右键单击选择在 finder 中显示。然后创建一个名为 PayLoad 的文件夹,然后将该应用程序文件放入其中并创建该 Payload 文件夹的 zip,一旦创建 zip,将该 zip 重命名为您的 project_name.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..如下图所示

enter image description here

在此处输入图片说明

and then copy and past 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: enter image description here

打开 iPhoneOS.sdk,如下图所示: 在此处输入图片说明

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 enter image description here

将 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: enter image description here

第 5 步:现在将代码签名身份设置为如下图所示: 在此处输入图片说明

and now you can create the Archive file enter image description here

现在您可以创建存档文件 在此处输入图片说明

**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