Commit a6929c9b by Jonathan Baker

Fix BUYAddress helper nullability.

parent d4d2ed9a
......@@ -65,7 +65,7 @@
@interface BUYAddress (ApplePay)
+ (nullable NSString *)buy_emailFromRecord:(nonnull ABRecordRef)record;
+ (nullable NSString *)buy_emailFromRecord:(nullable ABRecordRef)record;
/**
* Creates a BUYAddress from an ABRecordRef
......@@ -74,7 +74,7 @@
*
* @return The BUYAddress created from an ABRecordRef
*/
+ (nonnull BUYAddress *)buy_addressFromRecord:(nonnull ABRecordRef)record NS_DEPRECATED_IOS(8_0, 9_0, "Use the CNContact backed `buy_addressFromContact:` instead");
+ (nonnull BUYAddress *)buy_addressFromRecord:(nullable ABRecordRef)record NS_DEPRECATED_IOS(8_0, 9_0, "Use the CNContact backed `buy_addressFromContact:` instead");
/**
* Creates a BUYAddress from a PKContact
......@@ -83,6 +83,6 @@
*
* @return The BUYAddress created from a PKContact
*/
+ (nonnull BUYAddress *)buy_addressFromContact:(nonnull PKContact*)contact NS_AVAILABLE_IOS(9_0);
+ (nonnull BUYAddress *)buy_addressFromContact:(nullable PKContact*)contact NS_AVAILABLE_IOS(9_0);
@end
......@@ -122,7 +122,7 @@
@implementation BUYAddress (ApplePay)
+ (nullable NSString *)buy_emailFromRecord:(nonnull ABRecordRef)record
+ (nullable NSString *)buy_emailFromRecord:(nullable ABRecordRef)record
{
ABMultiValueRef emailMultiValue = ABRecordCopyValue(record, kABPersonEmailProperty);
CFArrayRef allEmails = ABMultiValueCopyArrayOfAllValues(emailMultiValue);
......@@ -137,7 +137,7 @@
return email;
}
+ (nonnull BUYAddress *)buy_addressFromRecord:(nonnull ABRecordRef)record
+ (nonnull BUYAddress *)buy_addressFromRecord:(nullable ABRecordRef)record
{
BUYAddress *address = [[BUYAddress alloc] init];
......@@ -194,7 +194,7 @@
return address;
}
+ (nonnull BUYAddress *)buy_addressFromContact:(nonnull PKContact*)contact
+ (nonnull BUYAddress *)buy_addressFromContact:(nullable PKContact*)contact
{
BUYAddress *address = [[BUYAddress alloc] init];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment