xcode iOS 6 vs 7 外观构建设置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19071254/
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
iOS 6 vs 7 appearance build settings
提问by ansonl
Does the deployment target of an app need to be set to iOS 7 in order to get the iOS 7 appearance on and iOS 7 device?
应用的部署目标是否需要设置为 iOS 7 才能在 iOS 7 设备上获得 iOS 7 外观?
It was that way during the beta and it still seems like it is right now due to my testing.
在测试版期间就是这样,由于我的测试,现在似乎仍然如此。
I am currently building using iOS 7 SDK and deployment target of - let just say < iOS 7. The app runs using the iOS 6 appearance on my iOS 7 device.
我目前正在使用 iOS 7 SDK 和部署目标进行构建 - 假设 <iOS 7。该应用程序在我的 iOS 7 设备上使用 iOS 6 外观运行。
If I build with iOS 7 as the deployment target, the device gets the iOS 7 UI.
如果我使用 iOS 7 作为部署目标进行构建,则设备将获得 iOS 7 UI。
It would be great if someone could confirm. Thanks.
如果有人能确认就太好了。谢谢。
Other build settings: Architectures: $(ARCHS_STANDARD_32_BIT) armv6
其他构建设置:架构:$(ARCHS_STANDARD_32_BIT) armv6
Valid Archs: armv6 armv7 armv7s
有效 Arch:armv6 armv7 armv7s
I have read other questions which ask about the iOS 6 and 7 appearance in relation to build settings. Including this one: is there a way to have an app run and display as ios 6 on a iphone with iOS 7?I also could not find any information for this on ADC. ADC just mentions "compatibility with iOS 6, etc"
我已经阅读了其他问题,这些问题询问与构建设置相关的 iOS 6 和 7 外观。包括这个:有没有办法让应用程序在装有 iOS 7 的 iPhone 上运行并显示为 ios 6?我也无法在 ADC 上找到任何相关信息。ADC 只是提到“与 iOS 6 等的兼容性”
Update:This may be related to me building for iOS 7 on Xcode 4.6. Xcode 5 gives me compiler errors on build, the related question is Xcode 5 "Missing compiler spec LLVM 4.2" error
更新:这可能与我在 Xcode 4.6 上为 iOS 7 构建有关。Xcode 5 在构建时给我编译器错误,相关问题是Xcode 5“Missing compiler spec LLVM 4.2”错误
Update (10/14/13):I have resolved the build errors of building in Xcode 5 and have confirmed that building with SDK set to iOS 7in Xcode 5 gives an iOS 7 UI even with a deployment target of < iOS 7.
更新(2013 年 10 月 14 日):我已经解决了在 Xcode 5 中构建的构建错误,并确认在 Xcode 5 中使用 SDK 设置为iOS 7 的构建会提供 iOS 7 UI,即使部署目标为< iOS 7。
A table for those who find this page:
为找到此页面的人准备的表格:
Xcode 4.6
Xcode 4.6
iOS 7 SDK
iOS 7 deployment
- iOS 7 device
- iOS 7 UI
- iOS 6 device (or lower)
- N/A
- N/A
- iOS 7 device
iOS 6 deployment
- iOS 7 device
- iOS 6 UI
- iOS 6 device (or lower)
- iOS 6 UI
- iOS 7 device
iOS 6 SDK
iOS 6 deployment
- iOS 7 device
- iOS 6 UI
- iOS 6 device (or lower)
- iOS 6 UI
- iOS 7 device
iOS 7 SDK
iOS 7 部署
- iOS 7 设备
- iOS 7 用户界面
- iOS 6 设备(或更低版本)
- 不适用
- 不适用
- iOS 7 设备
iOS 6 部署
- iOS 7 设备
- iOS 6 用户界面
- iOS 6 设备(或更低版本)
- iOS 6 用户界面
- iOS 7 设备
iOS 6 SDK
iOS 6 部署
- iOS 7 设备
- iOS 6 用户界面
- iOS 6 设备(或更低版本)
- iOS 6 用户界面
- iOS 7 设备
Xcode 5
Xcode 5
iOS 7 SDK
iOS 7 deployment
- iOS 7 device
- iOS 7 UI
- iOS 6 device (or lower)
- N/A
- iOS 7 device
iOS 6 deployment(or lower)
- iOS 7 device
- iOS 7 UI
- iOS 6 device (or lower)
- iOS 6 UI
- iOS 7 device
iOS 7 SDK
iOS 7 部署
- iOS 7 设备
- iOS 7 用户界面
- iOS 6 设备(或更低版本)
- 不适用
- iOS 7 设备
iOS 6 部署(或更低)
- iOS 7 设备
- iOS 7 用户界面
- iOS 6 设备(或更低版本)
- iOS 6 用户界面
- iOS 7 设备
回答by Cliff Ribaudo
No! You can set the deployment target to be 6.1 For example and on devices running 6.1 it will look like 6.1 while on iOS7 devices it will look like 7.0.
不!您可以将部署目标设置为 6.1 例如,在运行 6.1 的设备上它看起来像 6.1,而在 iOS7 设备上它看起来像 7.0。
And of course if you set deployment target to 7.0 it can ONLY run on 7.0 and up devices.
当然,如果您将部署目标设置为 7.0,它只能在 7.0 及更高版本的设备上运行。
Also, make sure you set Base SDK to "Latest iOS". And check that your Target settings are NOT overriding your Project Settings. Really you should pick one of those two and only set it on place and let it flow through to the other. I use Target settings mostly.
另外,请确保将 Base SDK 设置为“最新的 iOS”。并检查您的目标设置没有覆盖您的项目设置。真的,你应该选择这两个中的一个,然后把它放在适当的位置,让它流到另一个。我主要使用目标设置。
You want to set your BASE SDK to the highest you're using.
You want to set your DEPLOYMENT target to the LOWEST your prepared to support.
The OS will do the rest.
您想将 BASE SDK 设置为您使用的最高版本。
您希望将 DEPLOYMENT 目标设置为您准备支持的最低水平。
操作系统将完成剩下的工作。
回答by Andris Zalitis
I had exactly the same problem - Base SDK 7.0, Deployment Target SDK 6.1 on simulator worked as expected (iOS7 looks) but on the device (which had iOS7 installed) resulted in iOS6 looks.
我遇到了完全相同的问题 - 模拟器上的 Base SDK 7.0、Deployment Target SDK 6.1 按预期工作(iOS7 外观)但在设备上(安装了 iOS7)导致 iOS6 外观。
Turns out it was because I had 6.1 SDK copied in my XCode 5 (I copied it previously to build another project against iOS6.1 with XCode5).
原来这是因为我在我的 XCode 5 中复制了 6.1 SDK(我之前复制了它以使用 XCode5 构建另一个针对 iOS6.1 的项目)。
I didn't figure it myself, here is the link to the original answer: https://stackoverflow.com/a/19132061/1077481
我自己没弄明白,这是原始答案的链接:https: //stackoverflow.com/a/19132061/1077481
The bottom line - don't copy SDK 6.1 in XCode5 :)
底线 - 不要在 XCode5 中复制 SDK 6.1 :)
回答by user1923975
Yes I think that's the intended behaviour. If the deployment target is <7, it will run like an iOS 6 app on your iOS 7 device.
是的,我认为这是预期的行为。如果部署目标 <7,它将像 iOS 6 应用程序一样在您的 iOS 7 设备上运行。
This is because it doesn't have the usable status bar and also implements the old style keyboard.
这是因为它没有可用的状态栏并且还实现了旧式键盘。
Now that apple has the feature of downloading the last compatible version, if you update your app to make it iOS7 only, someone with iOS6 will automatically download the last working version.
现在苹果有下载最新兼容版本的功能,如果你更新你的应用程序使其只支持iOS7,那么iOS6的人会自动下载最新的工作版本。