xcode Save for Enterprise 或临时部署不存在

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

Save for Enterprise or ad-hoc deployment not present

iphonexcodeipaarchiving

提问by Diferdin

I am trying to build an IPA file for my app in view of some ad-hoc enterprise distribution. I have been looking at how to do this with Xcode 4.3.2, the version I am using at present, and I reached the point where in the organiser I should select the 'Save for Enterprise or ad-hoc deployment' option. The problem is that this option does not actually appear in the first place. In fact, I only have the 'Save Built Products' and 'export as Xcode archive' options.

鉴于某些临时企业分发,我正在尝试为我的应用程序构建 IPA 文件。我一直在研究如何使用 Xcode 4.3.2(我目前使用的版本)执行此操作,并且在组织者中我应该选择“保存为企业或临时部署”选项。问题是这个选项实际上并没有首先出现。事实上,我只有“保存内置产品”和“导出为 Xcode 存档”选项。

I would imagine the issue lies in some configuration settings for my app, but have been unable to find any help over the web. Hence my question here :-) Would appreciate some help in understanding what is wrong with my code.

我想问题在于我的应用程序的某些配置设置,但无法通过网络找到任何帮助。因此,我的问题是 :-) 希望在理解我的代码有什么问题方面得到一些帮助。

Thanks in advance to anyone helping here.

在此先感谢任何帮助这里的人。

Cheers.

干杯。

回答by sglist

If your project uses a third-party lib as a sub-project, there are a couple of settings that you may need to change so that xcode will recognize your app as a single–bundle rather than multiple products. Only single-bundle apps can be saved for enterprise or ad-hoc deployment, or submitted to the app store.

如果您的项目使用第三方库作为子项目,则您可能需要更改一些设置,以便 xcode 将您的应用程序识别为单个包而不是多个产品。只能为企业或临时部署保存单捆绑应用程序,或提交到应用程序商店。

First, in the Build Settingstab of the third-party lib target, set the Skip Installsetting to Yes.

首先,在第三方 lib 目标的Build Settings选项卡中,将Skip Install设置设置为Yes

Second, in the Build Phasestab of the third-party lib target, look in the Copy Headersphase and ensure that there are no headers in the Publicor Privatesection (they should all be in the Project section).

其次,在第三方 lib 目标的Build Phases选项卡中,查看Copy Headers阶段并确保PublicPrivate部分中没有标题(它们应该都在 Project 部分)。

回答by Diferdin

I finally got around this. It turned out the issue was that I was using third-party libs by including their (source) Xcode project rather than as pre-compiled libs. For some reason Xcode sees them as distinct apps, and won't let me wrap all of them under one single IPA. I removed the project, dropped the actual static libs and headers, produced the archive and...tadaaah: here I could sy my most wanted export option.

我终于解决了这个问题。事实证明,问题是我通过包含他们的(源)Xcode 项目而不是预编译的库来使用第三方库。出于某种原因,Xcode 将它们视为不同的应用程序,并且不会让我将它们全部包装在一个 IPA 中。我删除了项目,删除了实际的静态库和头文件,生成了存档和...tadaaah:在这里我可以选择我最想要的导出选项。

Thanks everyone for the help, a special thanks to The Saad who helped me finding out this.

感谢大家的帮助,特别感谢帮助我发现这一点的 The Saad。

回答by sonoshin

well, I met the same problem when I was using GMGridView. I didn't use Diferdin's solution since I still want to keep the GMGridView project there. My solution is: Go to GMGridView's target, click "Build Phases" -> "Copy Headers", then move all header files under "Public" and "Private" to "Project". Redo the Product -> Archive, then you may find the option "Save for Enterprise or ad-hoc deployment not present". This worked for me, hope it could be helpful to anyone who met the same problem as mine. Also I believe the idea could also be applied to any other thrid-party projects. Good luck!

好吧,我在使用 GMGridView 时遇到了同样的问题。我没有使用 Diferdin 的解决方案,因为我仍然想将 GMGridView 项目保留在那里。我的解决方案是:转到 GMGridView 的目标,单击“构建阶段”->“复制标题”,然后将“公共”和“私有”下的所有头文件移动到“项目”。重做产品 -> 存档,然后您可能会发现“保存为企业或临时部署不存在”选项。这对我有用,希望对遇到与我相同问题的人有所帮助。此外,我相信这个想法也可以应用于任何其他第三方项目。祝你好运!

回答by olirip

Maybe you've done that already, but we have to be sure.

也许你已经这样做了,但我们必须确定。

Did you specified in both product and target the code signing identity for adhoc distribution to be your new prov. profile?

您是否在产品和目标中指定了临时分发的代码签名身份作为您的新证明。轮廓?

Then did you try to archive your app ? (Product -> archive) If it's grayed, just specify the target to be iOS Device, even if no device is plugged.

那么您是否尝试归档您的应用程序?(Product -> archive) 如果它是灰色的,即使没有插入设备,也只需指定目标为iOS设备。

If Archive is successful, you should have an archive in the organizer. Select it, and choose to distribute as usual.

如果存档成功,您应该在管理器中有一个存档。选择它,然后像往常一样选择分发。

回答by Jirapong

I experienced the something today. There is no option to export the ad-hoc. so fix this, by "Validate Settings".

我今天经历了一些事情。没有导出临时文件的选项。所以通过“验证设置”解决这个问题。

  1. Go to your project targets,
  2. Under the configuration list there will be a clock button called "Validate Settings". Click on it
  3. and click "Perform Changes"
  4. Build for Archiving again
  1. 转到您的项目目标,
  2. 在配置列表下会有一个名为“Validate Settings”的时钟按钮。点击它
  3. 然后单击“执行更改”
  4. 再次为归档而构建

To explain the issue, It looks like Xcode understand project's file as Mac Application instead of iOS App.

为了解释这个问题,看起来 Xcode 将项目的文件理解为 Mac 应用程序而不是 iOS 应用程序。

Hope this helps.

希望这可以帮助。

回答by belsokar

Just as a follow-up, I know several others have answered. I ran into this issue, and the answers in this post were very helpful. Some summarized responses:

作为后续行动,我知道其他几个人已经回答了。我遇到了这个问题,这篇文章中的答案非常有帮助。一些总结的回应:

  • For me, this wasn't a profile issue. I have completed a ton of adhoc and distribution app binary builds successfully, so I knew it wasn't a profile problem in my case.

  • I took one poster's advice, and did the project "validate settings", and it performed some recommended changes...but that didn't solve the issue.

  • the issue was in fact project libraries that were not making it into the primary bundle. In my case, I had some libraries, that had their own resource bundles. The key is, when you do an archive build, make sure and select the build, select "show in finder", and then "show package contents" to see what additional stuff is not making it into the main application bundle. That's how I located a couple additional resource bundles that were being bundled into some libraries that I didn't even need.

  • 对我来说,这不是个人资料问题。我已经成功完成了大量的临时和分发应用程序二进制构建,所以我知道在我的情况下这不是配置文件问题。

  • 我接受了一位海报的建议,并执行了“验证设置”项目,并执行了一些建议的更改……但这并没有解决问题。

  • 问题实际上是项目库没有进入主包。就我而言,我有一些图书馆,它们有自己的资源包。关键是,当您进行归档构建时,请确保并选择构建,选择“在 finder 中显示”,然后选择“显示包内容”,以查看哪些其他内容没有进入主应用程序包。这就是我如何找到一些额外的资源包,这些资源包被捆绑到一些我什至不需要的库中。

回答by martyman

Helpful thing I found was to turn Skip Install off on your main project. If upon archiving you still see a package created (organizer pops up) then a sub-project is still creating a product. Turn off all the sub-projects Skip Install to NO and get your project to the point where an archive does not popup in Organizer. You can then safely turn Skip Install to YES on your main project and little sparkles of achievement will appear in your brain.

我发现有帮助的事情是在您的主项目上关闭跳过安装。如果在归档时您仍然看到创建了一个包(组织者弹出),那么子项目仍在创建一个产品。关闭所有子项目 Skip Install to NO 并让您的项目达到在 Organizer 中不弹出存档的程度。然后,您可以安全地将主要项目的跳过安装设置为 YES,并且您的大脑中会出现一点点成就。