douglasjunior / react-native-keyboard-manager

⚛ Library to prevent issues of keyboard sliding up and cover inputs on React-Native iOS projects.
https://www.npmjs.com/package/react-native-keyboard-manager
MIT License
971 stars 59 forks source link

Create react-native.config.js #51

Closed MaxToyberman closed 5 years ago

MaxToyberman commented 5 years ago

For react native 0.60 (auto linking), wont work otherwise

douglasjunior commented 5 years ago

Great, thanks!

zoontek commented 5 years ago

@MaxToyberman @douglasjunior Autolinking worked great in version 4.0.13-13. The react-native.config.js file was useless because the podspec is located in the root directory and the android AndroidManifest.xml doesn't exists.

Now that the change has been done, the autolinking is broken. Check the config with the new cli: yarn react-native config. A revert or a deprecation could be nice.

douglasjunior commented 5 years ago

Thanks @zoontek , I will revert and take a look more closely on this.

douglasjunior commented 5 years ago

@zoontek do you have the link to any documentation on this?

zoontek commented 5 years ago

@douglasjunior Yes! https://github.com/react-native-community/cli/blob/master/docs/autolinking.md

This means that all libraries need to ship a Podspec either in the root of their folder or where the Xcode project is. Podspec references the native code that your library depends on.

✅Already OK

zoontek commented 5 years ago
Screenshot 2019-07-18 at 15 01 18

This is the config created by the CLI for 4.0.13-13. Everything is already OK 👌🏼

douglasjunior commented 5 years ago

Thanks for the information @zoontek.

MaxToyberman commented 5 years ago

it doesn't work for me without the config, I have many duplicate symbols

Screen Shot 2019-07-18 at 16 14 25

zoontek commented 5 years ago

Did you unlink before the update?

MaxToyberman commented 5 years ago

@zoontek yes

zoontek commented 5 years ago

I made a quick update of the project with a working react native 0.60 example, no config file needed. Check it 🙂https://github.com/douglasjunior/react-native-keyboard-manager/pull/52

Maybe check your header search paths? Did you clean your build folder? (option + click on Product) It must be tied to your project in some way.

Screenshot 2019-07-18 at 15 44 34
MaxToyberman commented 5 years ago

@zoontek doesn't help, when i run pod install both ReactNativeKeyboardManager and IQKeyboardManager are getting installed is this ok ?

zoontek commented 5 years ago

@MaxToyberman Yes, that's the goal

MaxToyberman commented 5 years ago

@zoontek strange, theres nothing in my header search paths + cleaned the project + deleted derived data

zoontek commented 5 years ago

@MaxToyberman Can you run node_modules/@react-native-community/cli/build/bin.js config and give the react-native-keyboard-manager autolinking config?

MaxToyberman commented 5 years ago
    "react-native-keyboard-manager": {
      "root": "/Users/maximtoyberman/projects/AIMobile2017/node_modules/react-native-keyboard-manager",
      "name": "react-native-keyboard-manager",
      "platforms": {
        "ios": {
          "sourceDir": "/Users/maximtoyberman/projects/AIMobile2017/node_modules/react-native-keyboard-manager/ios",
          "folder": "/Users/maximtoyberman/projects/AIMobile2017/node_modules/react-native-keyboard-manager",
          "pbxprojPath": "/Users/maximtoyberman/projects/AIMobile2017/node_modules/react-native-keyboard-manager/ios/ReactNativeKeyboardManager.xcodeproj/project.pbxproj",
          "podfile": null,
          "podspecPath": "/Users/maximtoyberman/projects/AIMobile2017/node_modules/react-native-keyboard-manager/ReactNativeKeyboardManager.podspec",
          "projectPath": "/Users/maximtoyberman/projects/AIMobile2017/node_modules/react-native-keyboard-manager/ios/ReactNativeKeyboardManager.xcodeproj",
          "projectName": "ReactNativeKeyboardManager.xcodeproj",
          "libraryFolder": "Libraries",
          "sharedLibraries": [],
          "plist": []
        },
        "android": null
      },
      "assets": [],
      "hooks": {},
      "params": []
    }
MaxToyberman commented 5 years ago

@zoontek that's it , everything is working thank you.

douglasjunior commented 5 years ago

@MaxToyberman What exactly that solved the problem? If this becomes a common problem I can add in README.

MaxToyberman commented 5 years ago

@douglasjunior unlinked again, removed it from Header Search Paths and Library Search paths , both from the project and from the target, deleted Pods and pod install again.