IAP-In App Purchase (应用内购买) 1

 

折腾半个月, 流程终于明白了。

 

大概流程参考 http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/ 的总结, 如下:

 

Create and Fetch a Product Description

Here is a (very) rough overview of each step required to create a new product and fetch its description:

  1. Create a unique App ID ( 生成唯一的App ID)
  2. Generate and install a new provisioning profile (  生成开发者用 provisioning profile )
  3. Update the bundle ID and code signing profile in Xcode ( 在Xcode 中 更新 bundle ID 和 provisioning profile 具体可以参考以上网址 )
  4. If you haven’t already, submit your application metadata in iTunes Connect (在 iTunes Connect 中注册 你的应用的元数据
  5. If you haven’t already, submit your application binary in iTunes Connect (该步骤不是必须的 )

     Update: You do NOT need to submit your application binary to get IAP working.

     See question #4 in Apple’s FAQ http://developer.apple.com/library/ios/#technotes/tn2259/_index.html (thanks to everyone in the comments who pointed this out)

  1. Add a new product for in-app purchase
  2. Write code for fetching the product description
  3. Wait a few hours

The code for fetching a product description is really simple. The setup steps, on the other hand, are rife with peril.

NOTE: You do NOT need to create an in-app test user in iTunes Connect to fetch a product description.

 

关于 以上步骤 的具体细节 ,中文参考 http://www.cocoachina.com/iphonedev/sdk/2011/1028/3435.html

                                          英文参考:http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/

 

 

在步骤3中, bundle ID 必须手动的更改,至于 provisioning profile的更新, 貌似Xcode(我的是4.5)升级了,该文件会自动匹配当前最新的文件。

在步骤4中,提交应用程序的元数据到iTunes Connect 需要有很多注意的地方。具体请参考 《itunesConnect 开发者使用指南》。

                 http://developer.apple.com/library/ios/#documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/1_Introduction/Introduction.html

 

 

 

 

 

 

更多关于 InApp Purchases 的文章请参考:

                   http://blog.csdn.net/xiaominghimi/article/details/6937097

                   http://blog.csdn.net/xianghuibeijing/article/details/5674751

       

 

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值