乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      關(guān)于IAP:蘋(píng)果的審核規(guī)則發(fā)生了一點(diǎn)變化--沒(méi)有“恢復(fù)”將會(huì)被拒

       3dC 2014-11-18

      We found that while your app offers In-App Purchase(s) that can be restored, it does not include the required "Restore" feature to allow users to restore the previously purchased In-App Purchase(s), as specified in Restoring Transactions section of the In-App Purchase Programming Guide:

      "...if your application supports product types that must be restorable, you must include an interface that allows users to restore these purchases. This interface allows a user to add the product to other devices or, if the original device was wiped, to restore the transaction on the original device."

      To restore previously purchased In-App Purchase products, it would be appropriate to provide a "Restore" button and initiate the restore process when the "Restore" button is tapped by the user.

      For more information about restoring transactions and verifying store receipt, please refer to the In-App Purchase Programming Guide.

       


      大體意思就是應(yīng)用需要一個(gè)購(gòu)買(mǎi)恢復(fù)的功能,第一次做的IAP并沒(méi)有做這個(gè)功能,但也通過(guò)了,可能是蘋(píng)果新增的審核規(guī)則。

      解決方法很簡(jiǎn)單,增加一個(gè)Restore按鈕,并調(diào)用[[SKPaymentQueue defaultQueue] restoreCompletedTransactions],接下來(lái)的流程是

      1,彈出對(duì)話(huà)框輸入賬號(hào)信息
      2,如果點(diǎn)擊“取消”,調(diào)用方法
      -(void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error
      如果點(diǎn)擊“確定”,開(kāi)始請(qǐng)求數(shù)據(jù)
      3,返回?cái)?shù)據(jù)后,回調(diào)
      -(void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
      4,判斷交易隊(duì)列中交易的狀態(tài),在狀態(tài)為“SKPaymentTransactionStateRestored”的switch分支下調(diào)用恢復(fù)處理方法
      5,恢復(fù)完成后回調(diào)-(void)completeTransaction:(SKPaymentTransaction *)transaction

      本文出自 “驢車(chē)手的旅程” 博客,請(qǐng)務(wù)必保留此出處http://hillboy.blog.51cto.com/1645730/946243



      一旦交易處理完成,并從隊(duì)列中移除,應(yīng)用通常不會(huì)再看到它。但是如果應(yīng)用支持的product類(lèi)型必須可還原,你就必須包含一個(gè)接口,允許用戶(hù)還原這些購(gòu)買(mǎi)。這個(gè)接口允許用戶(hù)把已購(gòu)買(mǎi)的product添加到其它設(shè)備,或者原始設(shè)備重置后,也需還原交易。 Store Kit提供內(nèi)建的機(jī)制,用于還原非消耗型、自動(dòng)再生訂閱、免費(fèi)訂閱等product的交易。應(yīng)用調(diào)用payment隊(duì)列的restoreCompletedTransactions方法,payment隊(duì)列就會(huì)發(fā)送一個(gè)請(qǐng)求到App Store來(lái)還原交易。而App Store則對(duì)所有之前已經(jīng)完成的交易生成一個(gè)新的還原交易。還原交易對(duì)象的originalTransaction屬性保存了原始的交易。應(yīng)用對(duì)還原交易進(jìn)行處理,從中獲取原始交易,然后使用這個(gè)原始交易對(duì)象來(lái)解鎖用戶(hù)已購(gòu)買(mǎi)的內(nèi)容。在Store Kit還原了之前完成的交易時(shí),會(huì)通知payment隊(duì)列的observer對(duì)象,并調(diào)用它的paymentQueueRestoreCompletedTransactionsFinished: 方法。 如果用戶(hù)試圖購(gòu)買(mǎi)一個(gè)可還原的product(而不是使用你實(shí)現(xiàn)的還原接口),應(yīng)用會(huì)接收到一個(gè)正常的交易,而不是可還原交易。但是用戶(hù)不需要再次為這個(gè)product支付。應(yīng)用應(yīng)該把這些交易當(dāng)作原始交易一樣來(lái)處理。 非自動(dòng)再生訂閱和可消耗型product不會(huì)被Store Kit自動(dòng)還原。但是非自動(dòng)再生訂閱又必須可還原,因此在購(gòu)買(mǎi)這些product時(shí),你必須在自己的服務(wù)器上記錄這些交易,并提供自己的機(jī)制來(lái)還原這些交易給用戶(hù)的所有設(shè)備。

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶(hù)發(fā)布,不代表本站觀(guān)點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買(mǎi)等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶(hù) 評(píng)論公約

        類(lèi)似文章 更多