For iOSer, it is common to have apps on the shelf, especially outsourcing companies tend to be able to set up an APP in just 1-2 months. But in hindsight, I’m not going to do anything about these apps. However, iteration control of an APP version is very important for many people who are making real products. In short, as I now understand it:. Below, I will share some of the content of APP version control that I sorted out.

1. Online BUG collection

As a programmer, no one can guarantee that his program will never fail. No matter how good your code or architecture is, there are likely to be some system update incompatibilities, special device environments, and third party problems, so it’s important to collect bugs online. Don’t count on Apple’s own Crash collection system. Although it has a cool interface, complete symbol table parsing and features, users can’t receive Crash information without agreeing to or enabling diagnostics and usage.

Therefore, it is recommended to use some third-party online BUG collection libraries, such as Umeng, Bugly and so on. As a Bugly user, I can receive crash information quickly and fully support Swift.

2. Version number

We all know version numbers like X.X.X. As for its naming rules, here is a simple article to browse the version number naming conventions and principles, which basically means:

  • The first number represents some big change, like a new UI or something.
  • The second number represents the addition or change of some function.
  • The third number represents bug fixes, which tend to be frequent.

Doing so will both clarify the current version of the positioning and facilitate communication between multiple sides of the product.

If the online version is 1.0.0 and the new version is 1.0.1, the comparison method cannot just compare whether they are equal or not, and make the prompt update operation. We can determine whether the new version number is greater than the current version number by converting both the current version number and the latest version number to integers. Here is a simple example: Return true if the latest version is present, false otherwise

Func checkVersion() -> Bool {// New version number obtained by the serverlet newVersion = "1.0.1"
    
    if letInfoDic = Bundle. Main. InfoDictionary {/ / get the current version number, and converted to plasticlet currentVersion: String = infoDic["CFBundleShortVersionString"] as! String
        var currentVersionInt = 0
        let currentArray = currentVersion.components(separatedBy: ".")
        ifcurrentArray.count == 3 { currentVersionInt = Int(currentArray[0])! * 100 + Int(currentArray[1])! * 10 + Int(currentArray[2])! } // Convert the latest version to an integer var newVersionInt = 0let newArray = newVersion.components(separatedBy: ".")
        ifnewArray.count == 3 { newVersionInt = Int(newArray[0])! * 100 + Int(newArray[1])! * 10 + Int(newArray[2])! } // Compare the two versionsif newVersionInt > currentVersionInt {
            return true}}return false
}
Copy the code

3. Version update

In the previous section, we figured out that there was a new version, but we can’t do an update prompt at this point because not all new releases are immediately updated, although there are exceptions. So it can be divided into three ways.

  • Silent updates are when the iPhone automatically updates apps on the App Store with the user’s permission. This means that as soon as you release a new version, some users will automatically update to the latest version, even if the code does not prompt them to do so.

  • 2, the prompt update Prompt update, that is, we are one of the most common, this should be the new version has been part of the user in the silent update stable operation for a period of time (collected through online BUG, and customer service feedback, etc.), make sure no problem after active prompt all users (of course, can also according to the control part of the group code to user) is updated. When the user sees the screen, they can click update or not update (usually with a close button). The option is still in the user’s hands, and the APP only checks once upon launch, which is very user friendly.

  • 3, mandatory update mandatory update focus is mandatory, my understanding is. For example, an API in the APP is about to be abandoned, but the old version of the APP is still being used by users. In this case, forced update can be used to solve the problem that some “old” users do not update. Based on the interface of the previous method, cancel all buttons and gestures that can be turned off.

Summary: In the above three ways, the home page generally requests an interface to detect version update, which contains the latest version number, whether to prompt for update, and whether to force update three fields. After the release of a new version, we usually let it quietly update for a period of time, to observe whether the new version is stable, if there is a problem, we will immediately fix the release of the new version. If there are no problems, you can prompt the user to update.

Iv. Phase update

When releasing an App using App Store Connect, you can choose to have phased updates, which are stacked on top of each other over a 7-day period. Note that posts are to users who have automatic updates turned on, which is what we called silent updates. But all users can still go to the app market and manually update to the latest version. In the middle of the process we can suspend the release in phases (up to 30 days). Through this method, it can be said that the controllability of iteration of APP version is greatly improved. If bugs are found, they can be reacted in time with the least impact on users.

Five, the summary

Through several means introduced above, it can be said that the release of the new version of APP covers layers of security. Even if there are major bugs, the impact will be minimized. There are many more quirks in release iterations, but here are just some of the basic ones. Hot updates, for example, still need to learn from the constant game with Apple dad. TestFlight releases Beta versions, invites users to Beta tests, and more. In general, our goal is to ensure that the updated version is stable, and if you have any comments on this article, please point out the shortcomings.