使用Parse内付费服务出现的Error Domain=Parse Code=146 "The operation couldn’t be completed. (Parse error 146.)
2013-08-31 00:07
549 查看
因为开发一个应用有个内付费去广告功能,介于苹果官方提供的方法没用过,感觉有些复杂,于是选用了第三方组件Parse来解决这个问题,简单易操作;
Parse简化苹果官方内付费问题,使用方法分厂简单只有两个Block方法,以下实现简单的购买过程
在AppDelegate的application:didFinishLaunchingWithOptions:方法中
在购买的地方调用
但是我在真机测试的时候一直出现Error Domain=Parse Code=146 "The operation couldn’t be completed. (Parse error 146.),即使新建工程也同样此错误。
Parse官方网站提供了对这个错误答疑,由于不够细心把解决方案多次忽略:①可能是这个产品ID(ProductID)有问题,或者不存在。②而我存在的问题是设备越狱了导致不能购买。
解决办法:①检查在itunes上ID问题;
②在Cydia中卸载掉Assync插件,重启设备即可解决;
③以上不行,换未越狱的设备试吧。
Parse简化苹果官方内付费问题,使用方法分厂简单只有两个Block方法,以下实现简单的购买过程
在AppDelegate的application:didFinishLaunchingWithOptions:方法中
// Use the product identifier from iTunes to register a handler. [PFPurchase addObserverForProduct:@"ProductID" block:^(SKPaymentTransaction *transaction) { // Write business logic that should run once this product is purchased. }];
在购买的地方调用
[PFPurchase buyProduct:@"ProductID" block:^(NSError *error) { if (!error) { // Run UI logic that informs user the product has been purchased, such as displaying an alert view. } }];
但是我在真机测试的时候一直出现Error Domain=Parse Code=146 "The operation couldn’t be completed. (Parse error 146.),即使新建工程也同样此错误。
Parse官方网站提供了对这个错误答疑,由于不够细心把解决方案多次忽略:①可能是这个产品ID(ProductID)有问题,或者不存在。②而我存在的问题是设备越狱了导致不能购买。
解决办法:①检查在itunes上ID问题;
②在Cydia中卸载掉Assync插件,重启设备即可解决;
③以上不行,换未越狱的设备试吧。
相关文章推荐
- 使用Parse内付费服务出现的Error Domain=Parse Code=146 "The operation couldn’t be completed. (Parse error 146.)
- 使用Parse内付费服务出现的Error Domain=Parse Code=146 "The operation couldn’t be completed. (Parse error 146.)
- 使用Parse内付费服务出现的Error Domain=Parse Code=146 "The operation couldn’t be completed. (Parse error 146.)
- 使用Parse内付费服务出现的Error Domain=Parse Code=146 "The operation couldn’t be completed.
- iOS[问题解决] Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed.
- 【解决方法】Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed.
- iOS:Error Domain=WebKitErrorDomain Code=101 "The operation couldn’t be completed. (WebKitErrorDomain
- Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (k
- iOS使用UIWebView遇到Error Domain=WebKitErrorDomain Code=101 “The operation couldn’t be completed. (WebKitErrorDomain error 101
- didFailWithError: Error Domain=kCLErrorDomain Code=0 “The operation couldn’t be completed. (kCLError
- iOS--错误集锦--the operation couldn't be completed. (FBSOpenApplicationErrorDomain error 3.)
- Xcode5+svn迁出项目出现“The operation couldn’t be completed. (NSURLErrorDomain error -1012.)”的解决方案
- Xcode5+svn迁出项目出现“The operation couldn’t be completed. (NSURLErrorDomain error -1012.)”的解决方案
- Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)
- didFailWithError: Error Domain=kCLErrorDomain Code=0 “The operation couldn’t be completed. (kCLError
- Xcode6 svn check out项目出现“The operation couldn’t be completed. (NSURLErrorDomain error -1012.)”的解决方案
- Xcode+svn迁出项目出现“The operation couldn’t be completed. (NSURLErrorDomain error -1012.)”的解决方案
- Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)"
- didFailWithError: Error Domain=kCLErrorDomain Code=0 “The operation couldn’t be completed. (kCLError
- didFailWithError: Error Domain=kCLErrorDomain Code=0 “The operation couldn’t be completed. (kCLErro