wix-incubator / react-native-keyboard-input

Use your own custom input component instead of the system keyboard
MIT License
818 stars 150 forks source link

[RN 0.60+] How to make it work on iOS? #102

Closed ggunti closed 4 years ago

ggunti commented 4 years ago

Installation instructions does not work on RN 0.60+ because of autolinking (README should be updated). Although, I was able to successfully install this package on android, based on this steps.

But on iOS I was unable to install it. I made the following steps:

  1. npm i --save react-native-keyboard-input
  2. cd iOS && pod install

But it does not work:

Captură de ecran din 2020-04-06 la 18 39 39

Also I tried the steps described in README, but it fails to build (because of RN0.60+ autolinking).

So my question is: how this package should be installed on iOS for RN0.60+?

  "dependencies": {
    "react": "16.11.0",
    "react-native": "0.62.0",
    "react-native-autogrow-textinput": "^5.3.0",
    "react-native-keyboard-input": "^6.0.0",
  },
samgermain commented 4 years ago

I got it working with cocoapods. I ignored all the instructions listed for installing on iOS and added

pod 'ReactNativeKeyboardInput', :path => '../node_modules/react-native-keyboard-input'
pod 'ReactNativeKeyboardTrackingView', :path => '../node_modules/react-native-keyboard-tracking-view'

to my podfile

ggunti commented 4 years ago

@samgermain Thank you! I added

pod 'ReactNativeKeyboardInput', :path => '../node_modules/react-native-keyboard-input'
pod 'ReactNativeKeyboardTrackingView', :path => '../node_modules/react-native-keyboard-tracking-view'

as you suggested and then I ran pod install inside ios directory.

I get an error message regarding autolinking when I run react-native run-ios, but it works.