目标应用程序:
打开info.plist,添加一项URL types
展开URL types,再展开Item1,将Item1下的URL identifier修改为URL Scheme
展开URL Scheme,将Item1的内容修改为myapp
其他程序可通过myapp://访问此自定义URL
要跳转至myapp的应用程序:
NSString* strIdentifier = @"Metoos://com.kris.metoos";
BOOL isExsit = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:strIdentifier]];
if(isExsit) {
NSLog(@"App %@ installed", strIdentifier);
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:strIdentifier]];
}