1
我已經實施Apple Pay及Target 8.4及以上版本。iOS中的Apple付款按鈕8.4
當設備具有ApplePay功能但未配置時,我們必須打開電子錢包應用程序並啓動添加購物車的過程。
當我實現iOS 8.4的代碼時,不顯示PKPaymentButton。 它在iOS 9.0上工作正常。請檢查下面的代碼是否相同。
if ([PKPaymentAuthorizationViewController canMakePayments]) {
// Card configured
self.btnApplePay = [self.btnApplePay initWithPaymentButtonType:PKPaymentButtonTypePlain paymentButtonStyle:PKPaymentButtonStyleBlack];
}
else {
// Card not configured
self.btnApplePay = [PKPaymentButton buttonWithType:PKPaymentButtonTypeSetUp style:PKPaymentButtonStyleBlack];
}
此外,找到截圖的附件。
請建議,在那裏我需要改善我的代碼。
您確定您正在測試iOS 8.4嗎? 'PKPaymentButton'僅適用於iOS 8.4及更高版本。不支持iOS 8.3及更低版本。 – Mackarous
是的我選擇了iPhone 5(8.4) – Myaaoonn