APAddressBook icon indicating copy to clipboard operation
APAddressBook copied to clipboard

Swift loadPhotoByRecordID:completion compile issue "ambiguous reference"

Open SteveNewhouse opened this issue 8 years ago • 1 comments

Hi there,

I'm trying to use the loadPhotoByRecordID:completion method, and I'm having compile issues... This is on XCode 7 in Swift.

The following code generates an "Ambiguous reference to member 'loadPhotoByRecordId'" error.

APAddressBook.loadPhotoByRecordID(contact.recordID, completion: {(image: UIImage?) -> () in
  // do something
})

I don't see what is ambiguous about it... it seems to only match one method signature as far as I can tell.

Steve

SteveNewhouse avatar Nov 23 '15 22:11 SteveNewhouse

Looks like you try to use class method instead of instance method. APAddressBook contains only one class method - access

belkevich avatar Dec 01 '15 18:12 belkevich