因为开发一个应用有个内付费去广告功能,介于苹果官方提供的方法没用过,感觉有些复杂,于是选用了第三方组件Parse来解决这个问题,简单易操作;

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.)的更多相关文章

  1. [ios] 定位报错Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"

    Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error ...

  2. iOS使用UIWebView遇到Error Domain=WebKitErrorDomain Code=101 “The operation couldn’t be completed. (WebKitErrorDomain error 101

    现在在接触iOS开发,今天在调试一个界面加载web页面的问题,发现死活无法加载,浏览器里能正常打开,加上相应代码之后得到了错误信息为: 2013-04-18 15:05:06.446 Client_D ...

  3. Error Domain=NSOSStatusErrorDomain Code=1718449215 "The operation couldn’t be completed. (OSStatus error 1718449215.)"

    是在录音时,recoreder的录音格式不对.

  4. Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed.

    地图定位 错误:使用CoreLocation获取地理位置信息,报错 Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be ...

  5. iOS json 解析遇到error: Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed.

    Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 38 ...

  6. Error Domain=NSURLErrorDomain Code=-999 “The operation couldn’t be completed.

    转:http://www.wangzhengdong.com/blog/error-domainnsurlerrordomain-code-999-the-operation-couldnt-be-c ...

  7. didFailWithError: Error Domain=kCLErrorDomain Code=0 “The operation couldn’t be completed. (kCLError

    This error also occurs if you have Scheme/Edit Scheme/Options/Allow Location Simulation checked but ...

  8. NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)"

    原文: http://stackoverflow.com/questions/19874935/afnetworking-2-0-post-issue-cocoa-error-3840json-tex ...

  9. IOS8解决获取位置坐标信息出错(Error Domain=kCLErrorDomain Code=0)(转)

    标题:IOS8解决获取位置坐标信息出错(Error Domain=kCLErrorDomain Code=0) 前几天解决了在ios8上无法使用地址位置服务的问题,最近在模拟器上调试发现获取位置坐标信 ...

随机推荐

  1. C# net部署图片分布式存储服务器的小案例

    如果web服务用户多了,访问多了,用户上传的图片,文件等内容放在一块,想必服务器是承受不住的,这个时候,我们就需要考虑分布式存储的方法了. 如图所示:一个web服务器拖2个图片服务器 如何做到用户上传 ...

  2. silverlight5开发的翻牌游戏

    扑克牌用了一个自定义控件,代码如下 public class CardButton : Button { public int state;//是否翻转0是未翻转,1是已翻转 private stat ...

  3. 第一次写Makefile文件

    test.c文件内容 #include <stdio.h> int main(int argc, char const *argv[]) { printf("hahahah\n& ...

  4. APP二维码微信扫描后无法下载的问题

    微信打开网址添加在浏览器中打开提示  2014-10-13  蔡宝坚  移动前端 使用微信打开网址时,无法在微信内打开常用下载软件,手机APP等.网上流传的各种微信打开下载链接,微信已更新基本失效,最 ...

  5. django入门教程(下)

    在两篇文章帮你入门Django(上)一文中,我们已经做了一个简单的小网站,实现了保存用户数据到数据库,以及从后台数据库读取数据显示到网页上这两个功能. 看上去没有什么问题了,不过我们可以让它变得更加完 ...

  6. 3.2.3 使用Parameters动态生成where语句_JasperReports iRepor

    $P!{ParametersName}格式的SQL语句 来源:http://book.2cto.com/201306/24311.html#12732-hi-1-66926-020ef5b321fac ...

  7. 2.5.6 使用progressDialog创建进度对话框

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout ...

  8. 循环初练 for

    class Program    {        static void Main(string[] args)        {            while (true)           ...

  9. bzoj2893

    有起点终点的限制的路径覆盖首先tarjan缩点成DAG似乎不能按照二分匹配的做法做那么建立源汇拆点i,i',这两点之间连一条下界为1上界无穷的边,其它边都是下界为0,上界正无穷然后就是有源有汇的最小流 ...

  10. 【canvas】伸缩 / 剪裁 / 文本 / 阴影 / 填充图案 / 填充渐变

    <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8& ...