简体   繁体   English

XCode 5依赖项警告-混淆iOS部署目标和体系结构

[英]XCode 5 dependencies warning - confuses iOS deployment targets and architectures

I've searched here, read 9 answers that don't apply, validated my settings, checked them manually, cleaned, rebuilt and archived. 我在这里搜索过,阅读了9个不适用的答案,验证了我的设置,手动检查了它们,进行了清理,重建和归档。 I've also tried adding armv6 to Deployment Targets, same thing. 同样,我也尝试将armv6添加到Deployment Targets。 The app runs fine on physical Iphone 4 and 5 devices, but I can't publish it... 该应用程序在Iphone 4和5物理设备上运行良好,但我无法发布...

Dependency Analysis Warning: iOS deployment targets lower than 4.3 are not supported (current IPHONEOS_DEPLOYMENT_TARGET = "4.0", ARCHS = "armv7").

(NOTE: After some thinking and testing, the basic problem is at the bottom of this question.) (注意:经过思考和测试,基本问题位于该问题的底部。)

Build Settings: 构建设置: 我的构建设置

  • Architectures: Standard (armv7, armv7s) 架构: 标准(armv7,armv7s)

  • Base SDK: Latest (iOS 7.0) 基本SDK: 最新(iOS 7.0)

  • Supported platforms: iOS 支持平台: iOS

  • iOS Deployment Target: iOS 5.1 iOS部署目标: iOS 5.1

  • Targeted Device Family: iPhone 目标设备系列: iPhone

Info.plist: 信息清单:

info.plist

  • Iphone environment: Yes iPhone环境:是

  • no deployment target entry (which is what caused the warning in the linked answers) 没有部署目标条目(这是链接的答案中引起警告的原因)

But I still get the warning. 但是我仍然得到警告。

As you can see, this different from the Build Settings. 如您所见,这与“构建设置”不同。 I click the warning, but it doesn't tell me what could tell XCode to override the Build Settings, so I can do nothing about that. 我单击了警告,但是它没有告诉我什么可以告诉XCode覆盖构建设置,因此我对此无能为力。

How do I begin to fix this, where to look, what to check? 我如何开始解决此问题,在哪里看,要检查什么?

EDIT: In other words, this and this doesn't apply, since I don't build for deployment target lower than 4.3. 编辑:换句话说, 并不适用,因为我不建立部署目标比4.3更低。 I just need XCode to use the actual deployment target and architectures set in Build Settings. 我只需要XCode即可使用“构建设置”中设置的实际部署目标和体系结构。

UPDATE: So this is the issue I seem to be having: I added Required Device Capabilities armv7 (only) in the info.plist, and Apple forbids me to introduce such a requirement for apps that didn't have them (users couldn't upgrade). 更新:这就是我似乎遇到的问题:我在info.plist中添加了必需的设备功能armv7(仅),而Apple禁止我对不具备这些功能的应用程序提出这样的要求(用户不能升级)。 But then it would be nice of Apple to let me build for such users... 但是,Apple可以让我为此类用户打造产品将是一个很好的选择...

Unless it's just the bit about XCode not reading the targets right that prevents me from doing so. 除非只是因为XCode不能正确读取目标,否则我无法这样做。

--> So the question becomes: is there a way to force set IPHONEOS_DEPLOYMENT_TARGET to something >= 4.3? -> 问题就变成了:有没有办法将IPHONEOS_DEPLOYMENT_TARGET设置为> = 4.3?

There are couple of things you can do to see if this fixes your problem. 您可以做几件事来查看是否可以解决您的问题。

  1. Do a clean build XCode --> Product --> Clean 做一个干净的XCode-> Product-> Clean

  2. Close XCode 关闭XCode

  3. Go to your Derived data dir and remove everything from there 转到您的派生数据目录并从中删除所有内容

~Library~/Developer/Xcode/DerivedData 〜库〜/ Developer / Xcode / DerivedData

4- This maybe a redundant check. 4-这可能是多余的检查。 Though you have set your target to 5.1 check this anyways. 尽管您已将目标设置为5.1,但还是要检查一下。

在此处输入图片说明

5- Launch Xcode and try your build again. 5-启动Xcode,然后再次尝试构建。

Even though I knew I hadn't typed the string IPHONEOS_DEPLOYMENT_TARGET in any of my sources, on a whim I searched for it in the project manager. 即使我知道我没有在任何源代码中键入字符串IPHONEOS_DEPLOYMENT_TARGET,我还是在项目经理中一时兴起地搜索了它。 Turns out that XCode does not use the settings displayed when clicking on the project in the project manager for compiling the app... 事实证明XCode不使用在项目管理器中单击项目以编译应用程序时显示的设置...

The only way I could get to the hidden setting that somehow overrode the visible setting was to click on the search result. 我可以进入某种程度上超越可见设置的隐藏设置的唯一方法是单击搜索结果。

So, if you get this warning: iOS deployment targets lower than 4.3 are not supported , do this: 因此,如果收到以下警告: iOS deployment targets lower than 4.3 are not supported ,请执行以下操作:

  1. Cmd+Shift+F, search for IPHONEOS_DEPLOYMENT_TARGET. Cmd + Shift + F,搜索IPHONEOS_DEPLOYMENT_TARGET。

  2. Click search results with a target < iOS 5.0 (to go to the hidden Build Setting). 单击目标为<iOS 5.0的搜索结果(转到隐藏的“构建设置”)。

  3. Set them to at least 5.0. 将它们至少设置为5.0。

Note: Do not add armv6 to Architectures, set it to Standard (armv7, armv7s) . 注意: 不要添加到的ARMv6架构,将其设置为标准(ARMv7的,armv7s)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM