Xcode 4 存档版本未指定

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

Xcode 4 Archive Version Unspecified

iphonexcodexcode4

提问by Matt DeWitt

I'm trying to build a release version of my iPhone app in Xcode 4 and when it finishes and launches Organizer, there is no version number, it only says "unspecified". This is preventing me from using Xcode 4's Validate and Submit features.

我正在尝试在 Xcode 4 中构建我的 iPhone 应用程序的发布版本,当它完成并启动 Organizer 时,没有版本号,它只说“未指定”。这阻止我使用 Xcode 4 的验证和提交功能。

Any ideas on how to fix this? My version number is set in my project settings, so not sure what's causing the problem.

有想法该怎么解决这个吗?我的版本号是在我的项目设置中设置的,所以不确定是什么导致了问题。

回答by Rahul Choudhary

Go to your info.plist file and create a new property "bundle versions string, short" and provide the same version number and it will show up in organizer.

转到您的 info.plist 文件并创建一个新属性“bundle versions string, short”并提供相同的版本号,它将显示在管理器中。

回答by Richard Stelling

Please see this questionfor additional detail.

请参阅此问题以获取更多详细信息。

The accepted answer doesn't fully solve the problem for all projects. There are several issues that all relate to each other and I will cover them all.

接受的答案并不能完全解决所有项目的问题。有几个问题都相互关联,我将涵盖所有这些问题。

Xcode 4 Project Fails to compile a static library

Xcode 4 项目无法编译静态库

Related question: Xcode 4 can't locate public header files from static library dependancy
Related question: “lexical or preprocessor issue file not found ” in Xcode 4

相关问题:Xcode的4不能从静态库扶养找到公共的头文件
相关的问题:在Xcode 4“词汇或预处理问题找不到文件”

Errors might include;missing header files, "lexical or preprocessor issue"

错误可能包括;缺少头文件,“词法或预处理器问题”

Solutions:

解决方案:

  1. Check the "user header paths" are correct
  2. Set "Always search user paths" to YES
  3. Create a group call "Indexing headers" in your project and drag the headers to this group, DO NOTadd to any targets when prompted.
  1. 检查“用户头路径”是否正确
  2. 将“始终搜索用户路径”设置为“是”
  3. 在您的项目中创建一个组调用“索引标题”并将标题拖到该组中,出现提示时不要添加到任何目标。

Xcode 4 project with static library dependancy fails to create a valid archive

具有静态库依赖项的 Xcode 4 项目无法创建有效的存档

Related question: https://stackoverflow.com/questions/5271496/xcode4-ios-4-3-no-packager-exists-for-the-type-of-archive

相关问题:https: //stackoverflow.com/questions/5271496/xcode4-ios-4-3-no-packager-exists-for-the-type-of-archive

Errors might include;

错误可能包括;

Xcode 4 project with static library dependancy fails to create a valid archive

具有静态库依赖项的 Xcode 4 项目无法创建有效的存档

Missing identifier and version. "No Packager exists for the type of archive"

缺少标识符和版本。“该存档类型不存在打包程序”

Solutions:

解决方案:

  1. For all dependancies set "Skip Install"build setting to "Yes"
  2. Moving any "Public" headers in Build Phases to "Project"
  1. 对于所有依赖项,将“跳过安装”构建设置设置为“是”
  2. 将构建阶段中的任何“公共”标题移动到“项目”

回答by PixelEdn

Thanks but I needed 3 steps to entierly solve the problem with my project framework:

谢谢,但我需要 3 个步骤来完全解决我的项目框架的问题:

  1. set the Target Build Settings/"Skip Installation" property to "YES" for every dependency project

  2. clearthe Target Build Settings "Installation Directory" property for every projects

  3. for every projects, move every headersfrom section "Build Phases/Build Settings/Copy Headers" Public/Privateto Project

  1. 将每个依赖项目的目标构建设置/“跳过安装”属性设置为“

  2. 清除每个项目的目标构建设置“安装目录”属性

  3. 对于每个项目,将每个标题从“构建阶段/构建设置/复制标题”公共/私有部分移动项目

回答by Shane Breatnach

I had all these issues and more with an ad-hoc distribution build.

我遇到了所有这些问题,并且在临时分发版本中遇到了更多问题。

  • If you have static library dependencies and create a new build configuration for your Ad-hoc distributions, be sure that the library dependencies also have a matching build configuration. Otherwise, they default to using the Debug build configuration (or whatever configuration is first, I guess) and will be linked to your build.
  • For emphasis, in case it's not clear in other answers: set Skip Installto NO for your mainproject and have a valid Installation Directoryset. Otherwise, they should be set to YES and empty respectively.
  • 如果您有静态库依赖项并为 Ad-hoc 发行版创建新的构建配置,请确保库依赖项也具有匹配的构建配置。否则,他们默认使用 Debug 构建配置(或任何配置,我猜)并将链接到您的构建。
  • 为了强调,如果其他答案不清楚:将项目的跳过安装设置为 NO并设置有效的安装目录。否则,它们应分别设置为 YES 和空。

Also, I set a valid icon to remove the validation warning but I'm not sure whether this was required for a working package.

另外,我设置了一个有效的图标来删除验证警告,但我不确定这是否是工作包所必需的。

回答by cduhn

This can also happen if your project references a misconfigured subproject for a shared library. Go through the Xcode projects for any shared libraries your project uses and make sure the target's "Skip Install" build setting is set to "Yes". Then rebuild the archive.

如果您的项目引用了共享库的错误配置子项目,也会发生这种情况。检查项目使用的任何共享库的 Xcode 项目,并确保目标的“跳过安装”构建设置设置为“是”。然后重建存档。

回答by Vishal Chaudhry

After updating Xcode from 4.0 to 4.1, I found that version information was missing and was blank on the specific 'Target'. And apparently now the version number was being displayed in the build field.

将 Xcode 从 4.0 更新到 4.1 后,我发现缺少版本信息并且在特定的“目标”上为空白。显然现在版本号显示在构建字段中。

Just add your application version number to the version field for the 'Target' and it will implicitly update the info.plist file.

只需将您的应用程序版本号添加到“目标”的版本字段,它就会隐式更新 info.plist 文件。

Archive the project and now you should be able to see the version number in the Archive.

存档项目,现在您应该能够在存档中看到版本号。

And you should be good to go.

你应该很高兴去。

HTH.

哈。

回答by MrMaxP

My problem with no version or identifier on archive was simple in the end. I have one project with two targets. I have 2 schemes, each building a single target, or so I thought. My iPad scheme had the iPad and iPhone target listed in the build targets of the scheme setup. It was as simple as that, it was building both targets and not creating a valid archive.

我的存档中没有版本或标识符的问题最终很简单。我有一个项目有两个目标。我有 2 个计划,每个计划都建立一个目标,或者我是这么想的。我的 iPad 方案在方案设置的构建目标中列出了 iPad 和 iPhone 目标。就这么简单,它正在构建两个目标,而不是创建有效的存档。

回答by Josip B.

I was having similar problem. First I was making universal app, but in the end client wanted separate prices for iPhone and for iPad app. So I created new target in xcodeproject.

我遇到了类似的问题。起初我正在制作通用应用程序,但最终客户想要 iPhone 和 iPad 应用程序的单独价格。所以我在 xcodeproject 中创建了新目标。

When I wanted to archive iPad target I had version unspecified problem. Here is solution.

当我想归档 iPad 目标时,我遇到了未指定版本的问题。这是解决方案。

In project set Skip Installto NO.

在项目中将Skip Install设置为NO

When you want to archive iPhoneproject set Skip Installto NOin iPhone target, and Skip Installto YESin iPad target.

如果要存档iPhone项目设定跳过安装NOiPhone的目标,并跳过安装iPad上的目标

When you want to archive iPadproject set Skip Installto YESin iPhone target, and Skip Installto NOin iPadtarget and it should work.

如果要存档的iPad项目组跳过安装iPhone的目标,并跳过安装NOiPad的目标,它应该工作。