The following is a jump to the Volkswagen Review app code as follows:
NSString *requesturlstring = @ "dianping://shopinfo?id=1000";
Nsurl *requesturl = [Nsurl urlwithstring:requesturlstring]; if ([[[UIApplication sharedapplication] canopenurl:requesturl]) { [[uiapplication sharedapplication] OpenURL: Requesturl]; } else { //No apps installed, default open HTML5 station nsstring *keywords = ["Dinner Meal" stringbyaddingpercentescapesusingencoding: Nsutf8stringencoding]; Requesturl = [Nsurl urlwithstring:[nsstring stringwithformat:@ "http://m.dianping.com/shoplist/219/search?from=m_ search&keyword=%@ ", keywords]]; [[UIApplication sharedapplication] openurl:requesturl]; }
Error may occur during a jump:
Error: "This app isn't allowed to query for scheme dianping"
The workaround is to add the following configuration item to the Info.plist file and whitelist it to check if the program is already installed.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>wechat</string>
<string>dianping</string>
</array>
iOS jumps from one app to another app