是否有可能在Xcode 5中构建iphoneos6.1项目,保留了Xcode 4.6.3故事板中的视图行为? [英] Is it possible to build iphoneos6.1 projects in Xcode 5, preserving the behaviour of views laid out in an Xcode 4.6.3 storyboard?

查看:103
本文介绍了是否有可能在Xcode 5中构建iphoneos6.1项目,保留了Xcode 4.6.3故事板中的视图行为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的构建服务器最近更新为使用Xcode 5的xcodebuild。我们已经安装了iphoneos6.1,因此我们仍然可以将iPhone SDK 6.1用于一些尚未支持iOS7的遗留项目。但是,当我们使用xcodebuild使用-sdk iphoneos6.1构建这些项目时,我们仍然会看到UIViewController内容在导航栏和标签栏下面的问题。

Our build server was recently updated to use Xcode 5's xcodebuild. We've installed the iphoneos6.1 so that we can still use iPhone SDK 6.1 for some legacy projects that do not yet support iOS7. However, when we use xcodebuild to build these projects using -sdk iphoneos6.1, we still see problems with UIViewController's contents being laid out underneath navigation bars and tab bars.

是有一些方法可以使用Xcode 5的xcodebuild构建使用Xcode 4.6.3 / base sdk iOS 6.1开发的这些项目,但保留了使用Xcode 4.6.3开发的故事板中的视图。我看了一下ibtool的手册页,但是我没有看到任何与选择目标SDK相关的选项,或者与我上面提到的扩展边缘问题相关的任何其他选项。

Is there some way to build these projects that were developed with Xcode 4.6.3/base sdk iOS 6.1 using Xcode 5's xcodebuild, but preserving the views as they were laid out in the storyboard developed using Xcode 4.6.3? I took a look at the man page for ibtool, but I'm not seeing any option related to choosing a target SDK, or anything else that seems relevant to the "extends edges" problem I noted above.

请注意,我们还没有使用Xcode 5更新故事板 - 该项目继续在Xcode 4.6.3中开发,当我们的构建服务器克隆项目的git repo时,它只触及Xcode 5工具链使用xcodebuild构建。

Note that we haven't updated the storyboard using Xcode 5 - the project is continuing to be developed in Xcode 4.6.3, and only touches the Xcode 5 toolchain when our build server clones the project's git repo and builds using xcodebuild.

推荐答案

虽然它不是你想要的,但你可以保留Xcode 4和Xcode 5在相同的构建环境和控件中使用环境变量运行 xcodebuild (参见 xcrun的手册页。我们刚刚在我们的一个构建服务器上进行了设置。在构建定义中,只需设置以下环境变量:

While it isn't exactly what you are looking for, you can keep both Xcode 4 and Xcode 5 in the same build environment and control which xcodebuild is run by using an environment variable (see man page for xcrun. We have just set this up on one of our build servers. In your build definition, just set the following environment variable:

DEVELOPER_DIR =< Xcode的路径4.app> / Contents / Developer

对于我们来说,它最终为:

For us, it ended up as:

DEVELOPER_DIR=/Applications/Xcode-4.app/Contents/Developer

这会覆盖 xcode-select 设置,允许您使用正确的Xcode环境。同样,这取决于构建系统设置环境变量的能力,以及安装了两个版本的Xcode。您可以在 Apple Developers下载下载旧版代码

This overrides the xcode-select setting and allows you to use the correct Xcode environment. Again, this depends on the ability of your build system to set environment variables, plus having both versions of Xcode installed. You can download older versions of code at Downloads for Apple Developers

这篇关于是否有可能在Xcode 5中构建iphoneos6.1项目,保留了Xcode 4.6.3故事板中的视图行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆