- Add `wootric` scope for react-native-wootric package so called `@wootric/react-native-wootric`.
- Add circle ci config to auto publish react-native-wootric package to npm registry.
- Remove `WootricFragmentActivity` and update `wootric.init` method of `configureWithClientID` to accept any current activity.
- Remove `windows` dir as we are currently not supporting the widnows platform.
- Add `.editorconfig` file to android project for better code styling and format.
- Update `package.json` with Author, Github URL and package version to `1.0.1`. Also remove peerDependencies.
- Add LICENSE and update README.
Test:
For Android
a. Package setup:
Make sure you have nodejs installed.
In your current directory ru npm pack to create local npm package (i.e. .tgz file) for react-native-wootric.
b. Create and setup react-native project:
- Now run your project with `react-native run-android`
- You should see survey.
b. For iOS:
- I don't have setup, please try this out and help me know if this also works for iOS
Changes:
Test:
npm pack
to create local npm package (i.e. .tgz file) for react-native-wootric. b. Create and setup react-native project:react-native init MyWootricProject
npm install --save /path/to/your/tgz/npm/package
(package which was generated above)npm link
to link our react-native module with your project.App.js
file of yourMyWootricProject
add below code:RNWootric.configureWithClientID("client_id", "NPS-1234asdf"); RNWootric.setEndUserEmail("react_example@wootric.com"); RNWootric.setSurveyImmediately(true); RNWootric.setEndUserCreatedAt(1234567890); RNWootric.setEndUserExternalId("external_id_1234"); RNWootric.setEndUserPhoneNumber("+17865551234"); RNWootric.setEndUserProperties({first_name: "React", last_name: "Native"}); RNWootric.showOptOut(true); RNWootric.setFirstSurveyAfter(5); RNWootric.setCustomLanguage("ES"); RNWootric.setCustomProductName("Wootric React Native"); RNWootric.setCustomAudience("un amigo"); RNWootric.showSurvey();