iOS 11.0中已弃用ApplePay'requiredShippingAddressFields'

时间:2019-09-04 17:31:04

标签: ios swift applepay

在IOS> 11中设置/激活电子邮件,电话或邮政地址的最新方法是什么?

我尝试滚动浏览方法和属性,并提出以下内容:paymentRequest.shippingType

这是旧方法:

paymentRequest.requiredShippingAddressFields = [.phone, .email, .postalAddress]

我想了解是否有一种方法可以比旧方法更容易且不会引起警告。

1 个答案:

答案 0 :(得分:0)

它已被let array = [{label: 'sting1', subArray: ['A', 'B']}, {label: 'sting2',subArray: ['B']}, {label: 'sting3', subArray: ['A', 'B']}] result = []; checkdups = []; for (i = 0; i < array.length; i++) { data = { label: [array[i].label], subArray: array[i].subArray } for (var j = 0; j < array.length; j++) { if (String(array[j].subArray) == String(array[i].subArray) && i != j) { data.label.push(array[j].label); } } if (checkdups.indexOf(String(array[i].subArray))==-1) { checkdups.push(String(array[i].subArray)); result.push(data); } } console.log(result);取代。

https://developer.apple.com/documentation/passkit/pkpaymentrequest/2865927-requiredshippingcontactfields