2017-09-25 1 views
1

Ich habe ein Applet, von dem ich eine andere App herunterladen kann, Durch die Plist, die zu ipa geht, Es dauert eine Menge Zeit vom Lesen bis zur URL und bis ich das sehe App beginnt zu fallen, Gibt es eine Möglichkeit, dass es nicht dauern wird zu klicken?Anwendung von URL öffnen - ios 10

+0

viel Zeit von ... – Dvor

+0

Beispielcode: NSURL * url = [NSURL URLWithString: @ "itms-Dienste: // action = download-Manifest & url = https: // .. ... plist "]; [[UIApplication sharedApplication] openURL: URL-Optionen: @ {} completionHandler: nil]; – Dvor

Antwort

0
if let url = NSURL(string:<#Your url string here#>) { 
    if #available(iOS 10.0, *) { 
     // for ios 10 
     UIApplication.shared.open(url as URL, options: [:], completionHandler: nil) 
    } 
    else { 
     // for ios 9 or older     
     UIApplication.shared.openURL(url as URL) 
    } 
} 
+0

das ist mein Code, aber es funktioniert nicht – Dvor

-1
   let appId = "xxx" 
      let storeUrl = String(format: "itms-apps://itunes.apple.com/app/id%@", arguments: [appId]) 
      UIApplication.shared.openURL(URL(string: storeUrl)!) 
+0

die App in meinem Shop – Dvor

Verwandte Themen