iOS 内支付 读出相关信息
2013-05-31 17:16
141 查看
关于iOS内支付。个人认为比较重要的一个就是Bundle id ,Product id .Bundle id不管在哪来讲都是一个非常重要的东西。
如果itunes connect 里相关设置都已设好。那么接下来可以新建一个项目 。
关于framework不要忘记。Storekit.framework
targets->Summary ->Bundle id 看看是否和itunes connect 里的一致
代理;SKProductsRequestDelegate
如果itunes connect 里相关设置都已设好。那么接下来可以新建一个项目 。
关于framework不要忘记。Storekit.framework
targets->Summary ->Bundle id 看看是否和itunes connect 里的一致
代理;SKProductsRequestDelegate
NSString *us = [NSString stringWithFormat:@"com.snda.test"]; // NSSet *set = [NSSet setWithObject:us]; _productRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:set]; _productRequest.delegate = self; [_productRequest start]; //开始请求 //回调。 -(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response { NSArray *myProduct = response.products; if([response.invalidProductIdentifiers count]>0) { //这里主要给一个提示,可能是因为iTunes connect 里没设置好. NSLog(@"invalidProductIdentifiers:%@",response.invalidProductIdentifiers); NSLog(@"the invalidProductIdentifiers error"); NSLog(@"You did not complete all the financial requirements"); NSLog(@"You did not use an explicit App ID."); NSLog(@"You did not use the Provisioning Profile associated with your explicit App ID."); } NSLog(@"Product Count:%d",[myProduct count]); for(SKProduct *product in myProduct) //这里就表示能成功读了产品相关信息。 { NSLog(@"Product localizedTitle:%@" , product.localizedTitle); NSLog(@"Product localizedDescription: %@" , product.localizedDescription); NSLog(@"Product price: %@" , product.price); NSLog(@"Product productIdentifier: %@" , product.productIdentifier); } NSLog(@"productsRequest"); }
相关文章推荐
- iOS 内支付 读出相关信息
- IOS-苹果上架流程 相关信息
- ios开发-获取手机相关信息
- 关于苹果IOS相关的信息整理
- ios 缓存相关信息收集
- iOS 类似简单的第三方微博客户端,可进行登录微博浏览相关信息
- iOS获取当前系统的相关信息
- iOS获得设备相关信息,获取app相关信息
- iOS获取当前系统的相关信息 - - 博客频道 - CSDN.NET (3)
- iOS获取当前系统的相关信息和在不同的IOS上检测
- iOS 9中需要使用 QQ/QQ空间/支付宝/微信SDK 的相关能力(分享、收藏、支付、登录等)时,需要在“Info.plist”里增加如下代码
- ios开发-获取手机相关信息
- ios开发-获取手机相关信息
- iOS开发 证书相关信息汇总
- iOS相关支付,支付宝,微信,银联
- 命令行苹果 IOS MAC IPAD 所有app 的相关信息
- iOS开发小技巧 获取当前设备/应用程序相关信息
- iOS开发框架介绍(二)---iOS 框架及开发相关信息