IOS app jump (IOS9 white list), iosios9

Source: Internet
Author: User

IOS app jump (IOS9 white list), iosios9

Jump to the implementation of the specified app

In IOS, app redirection is implemented through URL. Therefore, we need to set the corresponding URL before implementing app redirection.

Figure 1 (search for the configuration software URL)

Figure 2 (specific configuration options)

Note:

If the IOS version is IOS 9, we need to set a whitelist for the app.

The premise for redirection is that this app is available. Therefore, we need to run the redirected app first, that is, install it in the simulator.

3 (add in info)

 

Thu

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 {// obtain the URl NSURL * url of the jump app = [NSURL URLWithString: @ "U: //"]; // determine whether the app if ([[UIApplication sharedApplication] canOpenURL: url]) is installed on the mobile phone {// open the application [[UIApplication sharedApplication] openURL: url] ;}}-(void) viewDidLoad {[super viewDidLoad] ;}@ end

To prove that the jump between apps is implemented: two other app storyboards are attached.

X: Figure 5

U: Figure 6

Jump to the specified page

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

The Code of 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 {// obtain the URl NSURL * url of the jump app = [NSURL URLWithString: @ "U: //"]; // determine whether the app if ([[UIApplication sharedApplication] canOpenURL: url]) is installed on the mobile phone {// open the application [[UIApplication sharedApplication] openURL: url] ;}}- (IBAction) GoFriend :( id) sender {// obtain the URl NSURL * url to jump to the circle of friends = [NSURL URLWithString: @ "U: // friend"]; // determine whether the app if ([[UIApplication sharedApplication] canOpenURL: url]) is installed on the mobile phone {// open the circle of friends [[UIApplication sharedApplication] openURL: url];} -(void) viewDidLoad {[super viewDidLoad];} @ end

 

We can not only set X but also U.

The Code operation on U is in Appdeledate.

The Code is as follows:

-(BOOL) application :( UIApplication *) app openURL :( NSURL *) url options :( NSDictionary <NSString *, id> *) options {// convert the url into a string NSString * urlString = url. absoluteString; // determines through which redirection is passed. if ([urlString containsString: @ "friend"]) {NSLog (@ "execute page Jump here. ");} Return YES ;}

 

VII.

 

 

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.