如何在 Xcode 8 中设置 CURRENT_PROJECT_VERSION [英] How to set CURRENT_PROJECT_VERSION in Xcode 8

查看:42
本文介绍了如何在 Xcode 8 中设置 CURRENT_PROJECT_VERSION的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从升级到 Xcode 8 后,当我使用 fastlane 进行构建时,我收到以下错误消息:

<块引用>

该项目似乎没有设置 CURRENT_PROJECT_VERSION 密钥

如果我去Xcode >Build Settings 进入 Versioning,有一个 Current Project Version 键,如下图:

帮助文本说要输入整数或浮点数,但是当我单击该字段时,没有机会在 Debug 或 Release 字段中输入数字.这与

  • 设置您的版本和版本号.

    Target > Info > Bundle versions string, short (CFBundleShortVersionString) > 你的初始化版本"

    目标 > 信息 > 捆绑版本 (CFBundleVersion) > 您的初始值"

  • 这对我帮助很大.

    Since upgrading to Xcode 8, when I do a build with fastlane, I get the following error message:

    There does not seem to be a CURRENT_PROJECT_VERSION key set for this project

    If I go to Xcode > Build Settings and go down to Versioning, there is a Current Project Version key, as shown below:

    The help text says to enter an integer or floating point number, but when I click on the field, there is no opportunity to enter a number in either the Debug or Release field. This is different from the screen shot shown in this apple tech Q&A so there appears to have been a change in Xcode since the Q&A was released.

    解决方案

    Currently when you get that fastlane error, terminal logs redirects you to

    Automating Version and Build Numbers Using agvtool

    to understand what you need to do.

    Summary

    1. Enable agvtool.

      Build Settings > Current Project Version > $(CURRENT_PROJECT_VERSION)

      Build Settings > Versioning System > Apple Generic

    2. Set up your version and build numbers.

      Target > Info > Bundle versions string, short (CFBundleShortVersionString) > "your init version"

      Target > Info > Bundle version (CFBundleVersion) > "your init value"

    That helps me a lot.

    这篇关于如何在 Xcode 8 中设置 CURRENT_PROJECT_VERSION的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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