Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ios code and add .podspec file #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ Also add
9. In same screen, click + again, you should now see the .a file for you project, Add this
10. Clean and Rebuild your Xcode project

Also if you have cocoaPods,just cd ios/ && pod install.


##API

Expand Down
11 changes: 6 additions & 5 deletions ios/RCTContactsWrapper/RCTContactsWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
// Copyright © 2016 Facebook. All rights reserved.
//

#import "RCTBridgeModule.h"
#import <React/RCTBridgeModule.h>

#import <Contacts/Contacts.h>
#import <ContactsUI/ContactsUI.h>
#import <AddressBook/AddressBook.h>
#import <AddressBookUI/AddressBookUI.h>

@import Contacts;
@import ContactsUI;
@import AddressBook;
@import AddressBookUI;

@interface RCTContactsWrapper : NSObject <RCTBridgeModule, CNContactPickerDelegate, ABPeoplePickerNavigationControllerDelegate>

Expand Down
18 changes: 18 additions & 0 deletions react-native-contacts-wrapper.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require 'json'
package = JSON.parse(File.read('package.json'))

Pod::Spec.new do |s|

s.name = package['name']
s.version = package["version"]
s.summary = 'Contacts plugin to wrap native contact pickers for iOS and Android.'
s.homepage = package['homepage']
s.license = package["license"]
s.author = package['author']['name']
s.platform = :ios, "9.0"
s.source = { :git => 'https://github.com/LynxITDigital/react-native-contacts-wrapper.git' }
s.source_files = "ios/RCTContactsWrapper/*.{h,m}"

s.dependency 'React'

end