我使用agvtool来增加我的版本号。在我最近重构的Xcode 13.0 (13A233)项目中,但是我得到了一个奇怪的错误:
找不到"Foo.xcodeproj/../NO“
例如。
% agvtool next-version -all
Setting version of project Foo to:
108.
Also setting CFBundleVersion key (assuming it exists)
Updating CFBundleVersion in Info.plist(s)...
Updated CFBundleVersion in "Foo.xcodeproj/../Foo/Support files/Environments/QA/Info.plist" to 108
Updated CFBundleVersion in "Foo.xcodeproj/../FooKit/Info.plist" to 108
Updated CFBundleVersion in "Foo.xcodeproj/../FooTests/Info.plist" to 108
Cannot find "Foo.xcodeproj/../NO"我只有这三个目标,Foo、FooKit和FooTests,但它正在寻找另一个名为NO的目标。
我环顾四周,没有看到任何无关的Info.plist文件。我猜想,NO在.pbxproj或Info.plist中设置了什么东西,agvtool不正确地将其作为潜在的目标,但我还没有猜到它在哪里。-all选项如何准确地确定哪些Info.plist文件需要更新?
发布于 2022-03-11 17:50:11
我的工作是将各种Info.plist文件中的“Bundle版本”设置为$(CURRENT_PROJECT_VERSION)。

那么,我根本不需要使用-all可选的。我只是:
% agvtool next-version
Setting version of project Foo to:
126..plist文件将从目标获取版本,而不是在各自的文件中单独指定。这避免了-all选项的奇怪行为/错误。
https://stackoverflow.com/questions/69636732
复制相似问题