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

       

 

 

 

你可能感兴趣的:(IOS)