2
電子メールのIDと電話番号が抽出されません。私が使用しようとしているサンプルコードは以下の通りです。誰でも私にここで問題を知らせることができますか?Apple Pay - Objective Cで電子メールと電話番号を抽出できます
ApplePayAddress *apAddress = [[ApplePayAddress alloc] init];
apAddress.firstName = (__bridge NSString *)(ABRecordCopyValue(address, kABPersonFirstNameProperty));
apAddress.lastName = (__bridge NSString *)(ABRecordCopyValue(address, kABPersonLastNameProperty));
ABMultiValueRef addressMultiValue = ABRecordCopyValue(address, kABPersonAddressProperty);
NSDictionary *addressDictionary = (__bridge_transfer NSDictionary *) ABMultiValueCopyValueAtIndex(addressMultiValue, 0);
NSLog(@"AddressDictionary:%@",addressDictionary);
apAddress.emailId = [addressDictionary objectForKey:(NSString *)kABPersonEmailProperty];
apAddress.phNumber = [addressDictionary objectForKey:(NSString *)CNContactPhoneNumbersKey];
apAddress.street = [addressDictionary objectForKey:(__bridge NSString *)kABPersonAddressStreetKey];
apAddress.city = [addressDictionary objectForKey:(__bridge NSString *)kABPersonAddressCityKey];
apAddress.state = [addressDictionary objectForKey:(__bridge NSString *)kABPersonAddressStateKey];
apAddress.zip = [addressDictionary objectForKey:(__bridge NSString *)kABPersonAddressZIPKey];
apAddress.country = [addressDictionary objectForKey:(__bridge NSString *)kABPersonAddressCountryKey];
apAddress.countryCode = [addressDictionary objectForKey:(__bridge NSString *)kABPersonAddressCountryCodeKey];