A prepared sandbox for writing keyboard-awareness visbility state management in React Native v0.63.0 using function components and Hooks.
- Clone the repository
git clone https://github.com/csantarin/keyboard-aware.git
cd keyboard-aware
- Install its dependencies.
yarn
-
Install a preferred debugging utility:
- Chrome Developer Tools (for simple console logs only).
- React Developer Tools from the official React Native docs.
- React Native Debugger v0.11 or later.
-
Add the Android (root:
/android
) and iOS (root:/ios
) projects to Android Studio and Xcode, respectively. Additional troubleshootings:-
Xcode: "Failed to set plugin placeholders" when loading the iOS project into Xcode.
- Clean (
Shift+Cmd+K
) the project. - On the Project navigator, choose KeyboardAware. You will see a panel with tabs such as Info, Build Settings, Swift Packages.
- On the same screen, choose Targets > KeyboardAware. You will see a panel with tabs starting with General, Capabilities, Resource Tags, etc.
- On those tabs, choose Build Phases. You will see a list of dropdowns on the panel.
- On those dropdowns, choose Embed App Extensions to open it.
- Under the Embed App Extensions dropdown, check Copy only when installing.
- Clean (
-
Android Studio: No known issues yet.
-
- Spin up the bundler.
yarn start
-
Hook up to an Android or iOS emulator.
-
Debug on your preferred utility. On Chrome Developer Tools, check the console out at http://localhost:8081/debugger-ui.
To see the automated tests:
yarn test
Note: Additional test cases are encouraged. Please create your pull request to offer suggestions.