黄舟2017-04-17 11:23:02
例如一個app的網頁url是:https://itunes.apple.com/cn/app/xue-qiu-gu-piao-tou-zi-she-qu/id492180369?mt=8&uo=4
那麼native的url就是將協議https
改成itms-apps
,在你的app裡打開替換後的url就可以跳到app store了,你可以在這裡找到app的url:http://itunes. apple.com/linkmaker
模態開啟app store
可以使用SKStoreProductViewController:
NSDictionary *appParameters = [NSDictionary dictionaryWithObject:@"533886215" forKey:SKStoreProductParameterITunesItemIdentifier]; SKStoreProductViewController *productViewController = [[SKStoreProductViewController alloc] init]; [productViewController setDelegate:self]; [productViewController loadProductWithParameters:appParameters completionBlock:^(BOOL result, NSError *error) { }]; [self presentViewController:productViewController animated:YES completion:^{ }];