2012-06-21 47 views
1

我想知道如何收聽用戶試圖購買時顯示的「Apple ID Password」警告中顯示的「取消」按鈕你知道,蘋果公司的官方軟件看起來像這樣:「Apple ID Password。 [用戶名] [密碼] [關閉] [OK]」inappurchase apple id登錄快訊聽取「取消」按鈕?

我的流程是已經購買的用戶,另一次購買恢復交易登錄測試用戶在沙箱環境- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions方法不叫事務失敗時,測試用戶登錄警報解除!

回答

3

試試這個代碼取消按鈕偵聽:

你的問題是在[[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; 恢復完成交易時,用戶登錄提示單擊取消SKPaymentQueue恢復交易,錯誤方法時發生故障,請使用以下代碼,以幫助FUL:

- (void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error 
{ 
    NSLog(@"<><Canceled!><>"); 
} 

此方法發生用戶登錄警報取消按鈕!

歡迎光臨!