$ npm install @mango-chutney/react-native-twitter-kit --save
$ react-native link @mango-chutney/react-native-twitter-kit
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜@mango-chutney/react-native-twitter-kit
and addRNTwitterKit.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNTwitterKit.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import au.com.mangochutney.twitterkit.RNTwitterKitPackage;
to the imports at the top of the file - Add
new RNTwitterKitPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':@mango-chutney/react-native-twitter-kit' project(':@mango-chutney/react-native-twitter-kit').projectDir = new File(rootProject.projectDir, '../node_modules/@mango-chutney/react-native-twitter-kit/android')
- Insert the following lines inside the dependencies block in
androd/app/build.gradle
:compile project(':@mango-chutney/react-native-twitter-kit')
Install TwitterKit for Android
import RNTwitterKit from '@mango-chutney/react-native-twitter-kit';
await RNTwitterKit.compose(options);
Note:
image
must be a base64 string.