iOS jump to Appstore,appstore check version update (online will be rejected), jump to the settings interface

Source: Internet
Author: User

1, now the application of the upgrade problem, Apple has helped us solve, is in our applications do not need to be prompted to upgrade the problem, the mobile phone system will automatically upgrade to the latest version (first allow upgrades), but there are some applications to add prompts upgrade requirements, so that users can upgrade themselves,
2, jump to the application of the App Store interface
To upgrade, it must be to the App Store (the jailbreak phone is not said) update,

[[UIApplication sharedapplication] Openurl:[nsurl urlwithstring:@ "https://itunes.apple.com/us/app/Application ID Information"]]; Application ID information can be obtained directly from the App Store

The above method will be able to jump to the App Store application interface
3, from the App Store check version update, must not do, the online submission will be rejected,

NSString *url = [[NSString alloc] initwithformat:@ "http://itunes.apple.com/lookup?id=%@", id]; ID is the ID of the online product

nsurl *url = [Nsurl Urlwithstring:path];
Nsmutableurlrequest *request = [nsmutableurlrequest requestwithurl:url
                                                           CachePolicy: Nsurlrequestreloadignoringcachedata
                                                       timeoutinterval:10];
    [Request sethttpmethod:@ "POST"];
    Nsoperationqueue *queue = [Nsoperationqueue new];

    [Nsurlconnection sendasynchronousrequest:request queue:queue completionhandler:^ (NSURLResponse *response,NSData * Data,nserror *error) {
        receivestatusdic=[[nsmutabledictionary alloc]init];
        if (data) {
            nsdictionary *receivedic = [nsjsonserialization jsonobjectwithdata:data options: Nsjsonreadingmutableleaves Error:nil];
            NSLog (@ "Receivedic is%@", receivedic);
        }

The dictionary receivedic contains version information,

4, because of the automatic upgrade of Apple, all as long as in the application from the App Store to check the version update, or any updates on the upgrade will be rejected, but if you have to add the upgrade prompts, you can cooperate with the background by adding APIs to do, that is, version information stored in the server, The application only needs to request the data, get the data version and then compare with the current version, because it is from the server that data, so during the audit, let the background control version, do not prompt the upgrade issue, after the audit, change the server version to the latest edition can be,.
5, jump to the mobile phone settings interface

[[UIApplication sharedapplication] Openurl:[nsurl urlwithstring:uiapplicationopensettingsurlstring]];
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.