joshuapinter / react-native-unified-contacts

Your best friend when working with the latest and greatest Contacts Framework in iOS 9+ in React Native.
MIT License
158 stars 56 forks source link

update to latest swift syntax #24

Closed chrise86 closed 7 years ago

chrise86 commented 7 years ago

Fixes issues with latest Xcode (8.3).

Also adds getGroups method:

Contacts.getGroups( (error, groups) =>  {
  if (error) {
    console.error(error);
  }
  else {
    console.log(groups);
  }
});
joshuapinter commented 7 years ago

@chrise86 Damn, that was fast. Haha.

I'll have to test it when I'm back. Is this backwards compatible or a breaking change that requires XCode 8.3+?

chrise86 commented 7 years ago

I assume it's going to be a breaking change. There seems to no longer be an option in Xcode to use legacy swift, only to set a global version used throughout the project. As far as I can tell anyway...

I don't really have any way of testing backwards compatibility 😕

joshuapinter commented 7 years ago

Okay, no problem. Are you able to add something to the README that at least says that it requires XCode 8.3 or something?

joshuapinter commented 7 years ago

@chrise86 Thanks. I'll take a look today.

joshuapinter commented 7 years ago

Tested this out locally today, @chrise86. Works great. Can you update the README with the new getGroups method as well and then I'll merge it in and publish a new version to npm.

Thanks!

chrise86 commented 7 years ago

No problem, I'm looking into adding more group-related functionality, so was debating holding off from mentioning it here (or rip it out of master) and create a new group-related feature branch with extra groupiness :)

joshuapinter commented 7 years ago

@chrise86 Ha!

I'll merge this in and then if you can create a separate branch for the additional groupy goodness, that would be great.

Thanks. 👍