iOS中使用URL Scheme进行App跳转的教程

2020-01-15 14:22:55王振洲

 

    if ([sourceApplication isEqualToString:@"com.3Sixty.CallCustomURL"]){
        // 接受传过来的参数
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"打开啦"
                                                            message:[url query]
                                                           delegate:nil
                                                  cancelButtonTitle:@"OK"
                                                  otherButtonTitles:nil];
        [alertView show];

        return YES;
    }else{
        return NO;
    }

}


这样我们就可以通过Bundle ID来决定是否允许打开我们的APP。

注:相关教程知识阅读请移步到IOS开发频道。