Alterplay / APAddressBook

Easy access to iOS address book
MIT License
1.38k stars 193 forks source link

Question: APAddressBook support at iOS9? #91

Open vorti2 opened 9 years ago

vorti2 commented 9 years ago

Hi,

ABAddressbook is a nice add on to the Addressbook framework. Exist plans to support the new Addressbook stack in iOS9?

belkevich commented 9 years ago

Hi,

The short answer is YES)) I'm working on thread safety now (version 0.1.12). Then I'm going to review APContactField and replace it with something else (version 0.2.0). And then I'll do research on new AddressBook.framework. It looks pretty different from ABAdressBook.framework. So, I should find some common interface that will fit both frameworks (version 0.3.0).

vorti2 commented 9 years ago

Nice to hear ...

belkevich commented 9 years ago

If you use twitter, follow @okolodev. I post release news there.

chrischenyc commented 9 years ago

after upgrade to Xcode 7 GM, following code breaks with error "Binary operator '|' cannot be applied to two 'APContactField' operands":

let addressBook = APAddressBook()
addressBook.fieldsMask = APContactField.Default | APContactField.Thumbnail | APContactField.Emails | APContactField.Phones | APContactField.APContactFieldRecordID

any idea how to fix it from my end?

edit: my bad

should use

let addressBook = APAddressBook()
addressBook.fieldsMask = [.Default, .Thumbnail, .Emails, .Phones, .RecordID]

this Swift madness, god

batical commented 8 years ago

this swift madness not working for me after updating to 0.2.0 version

self.addressBook.fieldsMask =   [.Default, .Emails, .PhonesWithLabels, .RecordID]

Any ideas ? thanks

Edit : my bad .Emails and .RecordID does not exist anymore. Error message was not helping

stevengharris commented 8 years ago

Hacky, but when I couldn't OR the fields masks in Swift 2.0, this is what I did with rawValue to make it work in 0.1.11:

    // Some Swift2 changes here, because I could not "OR" the APContactField masks
    let fieldsMask = APContactField.Default.rawValue | APContactField.CompositeName.rawValue | APContactField.Emails.rawValue | APContactField.Thumbnail.rawValue
    addressBook.fieldsMask = APContactField(rawValue: fieldsMask)
belkevich commented 8 years ago

@batical please, read 0.1.x to 0.2.x migration guide @stevengharris check the swift example app

techistoner commented 8 years ago

support at iOS7 ?

belkevich commented 8 years ago

@techistoner APAddressBook is supporting iOS7