gpt4 book ai didi

ios - Xcode:增加内部版本号

转载 作者:行者123 更新时间:2023-11-28 21:11:24 25 4
gpt4 key购买 nike

我们使用脚本来创建时间戳并替换应用内部版本号。

#!/bin/bash
echo "Update Build Number to Timestamp"
echo "--------------------------------"
# fail on error
set -e
agvtool new-version -all $(date +%Y%m%d%H%M%S)

这会将内部版本号更改为如下所示:201703241425

我们为我们的项目引入了一个内部框架。

上面的命令还替换了框架 Build 编号和 Current Library Version。但是,构建失败并出现以下错误:

▸ Linking In-HouseFrameworkLayer

❌ ld: malformed 64-bit a.b.c.d.e version number: 201703241425
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)

enter image description here

当我将框架的 Build 编号、Current Library Version 的格式更改为 1.0.0 并使用脚本进行构建时以上,构建成功。

问题:如何应用更改构建编号,但框架当前库版本 号码?

最佳答案

显然该应用程序使用 CFBundleVersion + $(CURRENT_PROJECT_VERSION) ;库/框架应该使用 (Current Library Version) + $(DYLIB_CURRENT_VERSION)

默认设置为 $(CURRENT_PROJECT_VERSION) ,所以这就是您需要更改为 $(DYLIB_CURRENT_VERSION) 的内容字符串。

Important: For macOS apps, build numbers must monotonically increase even across different versions. In other words, for macOS apps you cannot use the same build numbers again in different release trains. iOS apps have no such restriction and you can re-use the same build numbers again in different release trains.

版本号或内部版本号的值必须仅由“.”和数字组成,并且必须以数字开头和结尾。每个由句点分隔的整数值都是版本的一个组成部分。版本号或内部版本号中的最大字符数总共不能超过 18 个字符。

iOS 版本号和内部版本号可以包含三个或更多部分,但整个版本号或内部版本号的最大长度不得超过十八个字符。

ma​​cOS 应用比 iOS 的限制稍微多一些应用。对于 macOS应用程序有三个组件的限制,以句点分隔,并且组件不能超过三个。

Version Numbers and Build Numbers

Automating Version and Build Numbers Using agvtool

关于ios - Xcode:增加内部版本号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43009669/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com