【问题标题】:How does Xcode calculate the deployment target for storyboards?Xcode 如何计算故事板的部署目标?
【发布时间】:2020-11-07 05:15:21
【问题描述】:

对于故事板,我们可以在 Interface Builder 的 File Inspector 中设置“Builds for”值。有一个默认值 Deployment Target 在我的情况下是不正确的。 (但我希望它是正确的,而不必设置它,因为我们正在为每个构建创建整个 Xcode 项目。)

情节提要文件有以下内容:

    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>

如果我改变了

<deployment identifier="iOS"/>

<deployment version="4352" identifier="iOS"/>

我得到了适合我的情况的正确版本(iOS 11.0)。

但是如果我的构建目标是11.0,为什么默认是10.3。 (事实上​​,10.3 没有出现在任何项目文件中。)我可以避免显式设置值吗?

【问题讨论】:

    标签: xcode storyboard interface-builder uistoryboard


    【解决方案1】:

    更改目标的部署版本后,您可能需要重新打开项目工作区。

    只需用 Xcode 11.6 测试一下,就可以了。

    顺便说一句

    <deployment identifier="iOS"/>  // This is the correct one
    <deployment version="4352" identifier="iOS"/>  // Don't use this
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-03
      • 2012-02-20
      • 1970-01-01
      • 2011-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多