IOS app Jump (IOS9 whitelist)

Source: Internet
Author: User

Jump to the implementation of the specified app

The jumps applied in iOS are implemented via URLs, so we'll set up the corresponding URLs before implementing the app jump.

Figure one (find the URL of the configuration software)

Figure II (Specific configuration options)

Attention:

If the iOS version is IOS9 we need to set up a whitelist for the app.

The prerequisite for the jump is to have the app, so we need to run the Jump app first, which is installed in the simulator.

Three (added in info)

Four

Code:

  viewcontroller.m//  x////  Created by Ma C on 16/4/9.//  Copyright 2016 BJSXT. All rights reserved.//#import "ViewController.h" @interface Viewcontroller () @property (weak, nonatomic) Iboutlet UIButton *button; @end @implementation viewcontroller-(ibaction) GoU: (ID) Sender {        //get Jump App url    nsurl * url = [ Nsurl urlwithstring:@ "u://"];    Determine if the corresponding app is installed in your phone ([[    [[] [[UIApplication sharedapplication] canopenurl:url]) {        //Open Application        [[uiapplication Sharedapplication]openurl:url];}    } -(void) viewdidload {    [Super viewdidload];} @end

To prove that the app is a jump between apps: Another two app storyboard

X: Figure Five

U: Figure Six

Jump to the implementation of the specified page

Premise: We want to jump from X to U's circle of friends.

So the code for x is as follows:

  viewcontroller.m//  x////  Created by Ma C on 16/4/9.//  Copyright 2016 BJSXT. All rights reserved.//#import "ViewController.h" @interface Viewcontroller () @property (weak, nonatomic) Iboutlet UIButton *button; @end @implementation viewcontroller-(ibaction) GoU: (ID) Sender {        //get Jump App url    nsurl * url = [ Nsurl urlwithstring:@ "u://"];    Determine if the corresponding app is installed in your phone ([[    [[] [[UIApplication sharedapplication] canopenurl:url]) {        //Open Application        [[uiapplication Sharedapplication]openurl:url];}    } -(Ibaction) Gofriend: (ID) Sender {    //get jump friend Circle URL    nsurl * url = [nsurl urlwithstring:@ "U://friend"];    Determine if the corresponding app is installed in your phone ([[    [[[UIApplication sharedapplication] canopenurl:url]) {        //Open a circle of friends        [[ UIApplication Sharedapplication]openurl:url];}    } -(void) viewdidload {    [Super viewdidload];} @end

We can't just set the x to set the U.

The code for U is manipulated in appdeledate.

The code is as follows:

-(BOOL) Application: (UIApplication *) app OpenURL: (nsurl *) URL options: (nsdictionary<nsstring *,id> *) options{        //Convert URL to string    NSString * urlstring = url.absolutestring;    The judgment is to jump over by what    if ([urlstring containsstring:@ "friend"]) {        NSLog (@) to perform a page jump here. ");    }    return YES;}

Seven as follows

IOS app Jump (IOS9 whitelist)

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.