我在哪里更改 xcode 中的版本号

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/47945031/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 10:29:21  来源:igfitidea点击:

Where Do I Change version number in xcode

iosxcodecordovabuildversion

提问by Toni Michel Caubet

I have a IOS app released in the app store, using Cordova.

我在应用商店中发布了一个使用 Cordova 的 IOS 应用。

Now, I made several changes, but it seems that I cannot update the app in apple store, because (it's submitting with the same version number):

现在,我进行了一些更改,但似乎无法在 Apple Store 中更新该应用程序,因为(它以相同的版本号提交):

enter image description here

在此处输入图片说明

How do i update the version numbers in xcode so I don't get this error?

如何更新 xcode 中的版本号,以免出现此错误?

I searched the version number in the whole (Cordova) project and I did not found results, so question is:

我在整个(Cordova)项目中搜索了版本号,没有找到结果,所以问题是:

How Do I change this value? ( either from the cordova project (platforms/ios) or the xcode project )

如何更改此值?(来自cordova项目(平台/ ios)或xcode项目)

And I have this way setted in Xcode (obviously changing the "mybundle" for the right one:

我在 Xcode 中设置了这种方式(显然更改了正确的“mybundle”:

enter image description here

在此处输入图片说明

But the error still referencing the previous (published last year) version

但是错误仍然引用了以前的(去年发布的)版本

enter image description here

在此处输入图片说明

回答by Claudio Redi

The version and build number is present on info.plist. If you open this file, you'll see two entries related to versioning

版本和内部版本号存在于 上info.plist。如果你打开这个文件,你会看到两个与版本控制相关的条目

  • Bundle version string (short)
  • Bundle version
  • 捆绑版本字符串(短)
  • 捆绑版

Another option is to click on the root on xcode project navigator, you'll see two text boxes to edit the same information (Version, Build)

另一种选择是在 xcode 项目导航器上单击根目录,您将看到两个文本框来编辑相同的信息 ( Version, Build)

enter image description here

在此处输入图片说明

For sure Cordova IDE offers another way to do it.

当然,Cordova IDE 提供了另一种方法来做到这一点。

回答by jcesarmobile

Instead of changing it on the Xcode project, try changing it in the config.xmlfile.

不要在 Xcode 项目上更改它,而是尝试在config.xml文件中更改它。

<widget id="com.test" version="1.3" ios-CFBundleVersion="1.200001111" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
</widget>

versionsets the CFBundleShortVersionString(release version), and ios-CFBundleVersionsets the CFBundleVersion(build version)

version设置CFBundleShortVersionString(发布版本),并ios-CFBundleVersion设置CFBundleVersion(构建版本)

Then run cordova prepare

然后运行 cordova prepare