From 4cbfa22902d60683d57051c17a7d9fa2fbdd8c7c Mon Sep 17 00:00:00 2001 From: Scott Hofman Date: Wed, 11 Apr 2018 14:24:30 +0200 Subject: [PATCH 1/2] Add podspec file to project, which allows development with CocoaPods --- react-native-keyboard-input.podspec | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 react-native-keyboard-input.podspec diff --git a/react-native-keyboard-input.podspec b/react-native-keyboard-input.podspec new file mode 100644 index 0000000..4728c2e --- /dev/null +++ b/react-native-keyboard-input.podspec @@ -0,0 +1,18 @@ +require 'json' +version = JSON.parse(File.read('package.json'))["version"] + +Pod::Spec.new do |s| + + s.name = "react-native-keyboard-input" + s.version = version + s.summary = "Keyboard Input for React Native." + s.homepage = "https://github.com/wix/react-native-keyboard-input" + s.license = 'MIT' + s.source = { path: '.' } + s.ios.deployment_target = '9.0' + s.authors = { 'Leo Natan' => 'lnatan@wix.com' } + s.source_files = 'lib/ios/{LNInterpolation/*,RCTCustomInputController/*}.{h,m,mm}' + s.dependency 'React' + s.dependency 'react-native-keyboard-tracking-view' + +end \ No newline at end of file From b2d6cbb9204b0917670c513b29d544a81654acab Mon Sep 17 00:00:00 2001 From: Scott Hofman Date: Wed, 11 Apr 2018 14:31:50 +0200 Subject: [PATCH 2/2] Updated README to illustrate how to use with Cocoapods --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index f98ad45..ebbf36e 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,8 @@ If you have pro-guard enabled and are having trouble with your build, apply this ``` ## iOS + +### Option: Manually In Xcode, drag both `RCTCustomInputController.xcodeproj` and `KeyboardTrackingView.xcodeproj` from your `node_modules` to the Libraries folder in the Project Navigator, then add `libRCTCustomInputController.a` and `libKeyboardTrackingView.a` to your app target "Linked Frameworks and Libraries". #### Covering the whold keyboard in predictive mode @@ -65,6 +67,15 @@ From Xcode menu: If necessary, you can take a look at how it is set-up in the demo project. +### Option: With [CocoaPods](https://cocoapods.org/) + +Add the following two pods to your `Podfile` and run `pod update`: + +``` +pod 'react-native-keyboard-input', :path => '../node_modules/react-native-keyboard-input' +pod 'react-native-keyboard-tracking-view', :path => '../node_modules/react-native-keyboard-tracking-view' +``` + # Usage