How does an iOS project implement a version update?

Source: Internet
Author: User

Everyone at the end of the project development, we must encounter a problem is: How to keep a project version of the update function to the user login software hou, if there is a new version, can have relevant prompts to update.

First of all, when I developed an Android version of a project, I found two ways to do it:

1,android Official server push update, through the push to implement updates, this seemingly in the celestial support is not very good, it is estimated that many people are not used.

2, through the third party push service. Background defines the promulgation number, name, update content, through the third party push service interface. When the application login successfully, sent to the client, the application resolved the version of the relevant field content, compared with the ready-made version, if there are new content, pop-up prompts, click HTTP Download the new version of the specified URL. (Specific Baidu search push service can).



Now, when the project is developed by iOS, think about how it will be updated, nothing more than these two:

1, login successful, background to the latest version number, name, the latest content, and then the current application of the version to compare, if there is a new version, Pop-up prompts, also linked to the new published App store URL download update replacement.

2, a very simple way to achieve:

Get the version of this machine, and then parse the version number of the Apple website, and make a direct comparison and let him upgrade.

Get the JSON data from the Http://itunes.apple.com/lookup?id=<Your app Id>, which contains the version information, and compare it.

(about this app ID: The app ID will be generated when you go to Apple to fill out the release program)

The resulting JSON data: Apple will return the application of all the information, directly in the login request, save these version information, if there is an update, the direct use of the hint on the line, (click to link to the App Store) but remember to update every time the local version number (variable) updated.

3, the use of Apple's push service to achieve the promulgation of the update function. This need to use the push service, currently I do not need to push the message, so no contact, and then Add.



To sum up: The first method is more traditional, relies on the background to send the version of the relevant information, and then provide the App Store download path. The second approach is to use the powerful features of the app Store, direct access to the current software, through the software to update the information, rely on the app ID, it is obvious that the latter is more convenient, and not easy to make mistakes, easy to update the version anytime.


The concrete use effect, waits for me after a while to attempt personally to send the picture.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.