xcode iPhone 应用程序更新与新版本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8462647/
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
iPhone app Update Vs new version
提问by testndtv
Let's say I have an existing IOS app live on Appstore which is version 1.0
假设我在 Appstore 上有一个 1.0 版的现有 IOS 应用程序
Now I make some changes to the app and want to submit back.
现在我对应用程序进行了一些更改并想提交回来。
Are there 2 separate ways to submit ? Like can I still keep the version as 1.0 and just submit the app OR I need to create a new version 1.1 and then submit it ?
有两种不同的提交方式吗?就像我仍然可以将版本保持为 1.0 并只提交应用程序还是我需要创建一个新的 1.1 版本然后提交它?
What are the differences in the process?
流程上有什么不同?
Also from the customer end, how does this work for new/existing users ?
同样从客户端,这对新/现有用户如何工作?
回答by Gabriel
I have just discovered something about version upgrades and the App Store. Just now, I'm suffering issues and users crashes because of a behavior of iOS system that I can't figure before. And, very important, iTunes, AppStore and iOS have modified some upgrading and installing rules in last versions. Now, it works this way: - When user install a new version, all the files in the bundle are downloaded and copied in the previous existing bundle, but OLD FILES OR COMPONENTS ARE NOT DELETED (or not all are deleted). So, the final bundle IS NOT equal to the bundle of a fresh installation of the new version. - For example, if a xib/nib file is localized to different languages for the new version, the updated bundle will include both versions: the one in the root folder and the other one in each localized folder. The system, obviously, will use the first one and only a fresh installation will show localizations for that file. One of my apps shows that issue with MainWindow.xib and as there are some modifications in references and classes, the updated apps crash each time you try to run as it is using a obsolet object. I have built a new version changing the name of the xib/nib files that have been localized. As MainWindow is one of them, I have to modify the reference in info.plist of course.
我刚刚发现了一些有关版本升级和 App Store 的信息。刚才,由于 iOS 系统的行为我以前无法理解,我遇到了问题并且用户崩溃了。而且,非常重要的是,iTunes、AppStore 和 iOS 在上个版本中修改了一些升级和安装规则。现在,它以这种方式工作: - 当用户安装新版本时,捆绑包中的所有文件都被下载并复制到以前的现有捆绑包中,但旧文件或组件不会被删除(或并非全部被删除)。因此,最终捆绑包不等于新版本的全新安装捆绑包。- 例如,如果新版本的 xib/nib 文件被本地化为不同的语言,更新的包将包括两个版本:一个在根文件夹中,另一个在每个本地化文件夹中。该系统,显然,将使用第一个,只有全新安装才会显示该文件的本地化。我的一个应用程序显示了 MainWindow.xib 的问题,并且由于引用和类中有一些修改,更新的应用程序每次尝试运行时都会崩溃,因为它使用的是过时的对象。我已经构建了一个新版本,更改了已本地化的 xib/nib 文件的名称。由于 MainWindow 是其中之一,我当然必须修改 info.plist 中的引用。
OK, knowing that, you can build a new version with complete different components in the bundle that, if files of previous version does exist, the app then offers the user the option of using them. That is, two versions of the app in a single icon and bundle. Not very difficult to do.
好的,知道了这一点,您可以在捆绑包中构建具有完整不同组件的新版本,如果确实存在先前版本的文件,则该应用程序会为用户提供使用它们的选项。也就是说,在单个图标和捆绑包中包含两个版本的应用程序。不是很难做到。
BUT, the very weird thing is that I think that new iOS version and iTunes don't allow downgrades. I have tried to do it but didn't get it done. That is, if you install a version, for example 1.2, it is impossible AFAIK to install latter v1.1 on the device nor in iTunes->"Applications". So, the double version bundle will live until a reinstallation of the app.
但是,非常奇怪的是,我认为新的 iOS 版本和 iTunes 不允许降级。我试图这样做,但没有完成。也就是说,如果您安装一个版本,例如 1.2,AFAIK 不可能在设备上或在 iTunes->“应用程序”中安装最新的 v1.1。因此,双版本包将一直存在,直到重新安装应用程序。
回答by jrturton
You need to create a new version number, which makes sense since this is a new version of your app. This will then appear as an update for your customers. I don't think you can upload a new binary with the same version without removing the old one from the store.
您需要创建一个新版本号,这是有道理的,因为这是您的应用程序的新版本。这将显示为您的客户的更新。我认为您无法在不从商店中删除旧二进制文件的情况下上传具有相同版本的新二进制文件。
You add a new version in iTunes connect, then update the version number in Xcode to match and create a new archive. It's pretty straightforward.
您在 iTunes Connect 中添加新版本,然后在 Xcode 中更新版本号以匹配并创建新存档。这很简单。
回答by Abhi Beckert
You must always increase the version number of any update to your app.
您必须始终增加应用程序的任何更新的版本号。
Users will see a badge on the App Store icon on the device, and in iTunes on their PC. Going into the updates section, it will list your app along with the list of changes you've provided, and a button to install the update. They can also update all apps at once.
用户将在设备上的 App Store 图标和 PC 上的 iTunes 中看到一个徽章。进入更新部分,它将列出您的应用程序以及您提供的更改列表,以及一个用于安装更新的按钮。他们还可以一次更新所有应用程序。
回答by codercat
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
NSLog(@"version is%@",version);
回答by Alex Montgomery
You do not have to open version numbers to submit any longer. Open up Xcode, go to Window - Organizer - Archives and Distribute an app you have created successfully.
您无需再打开版本号即可提交。打开 Xcode,转到 Window - Organizer - Archives 并分发您已成功创建的应用程序。