This reference app is provided to demonstrate how to use the TallyGo SDK with React Native.
This project is compatible with both iOS and Android and will run on either kind of device.
Follow the React Native getting started guide (click 'Building Projects with Native Code') to install the needed dependencies:
- Node.js
- NPM
- Watchman (recommended)
- react-native-cli
In addition to the above, you will need:
- Xcode
- Cocoapods
TBD
-
In Terminal,
cd
to the reference app, and runnpm install
. -
Follow the iOS and/or Android instructions below, depending on which platforms you need to support.
-
In Terminal,
cd
to theios
folder within the reference app folder, and then runpod install
before you open the project for the first time. -
In Xcode, open
AppDelegate.m
and paste your TallyGo access token. If you don't have an access token yet, get one here for free. The app will not run without a valid access token. -
Compile and run as normal for an iOS app.
TBD
The TallyGo SDK is provided as a native Objective-C SDK for iOS, and a native Java SDK for Android. You can use either one, or both, depending on which platforms you need to support.
Because the TallyGo SDKs are platform-specific, and React Native is cross-platform, additional 'bridging' code must be written in order to use TallyGo SDK functionality from within React Native. You can see an example in this reference app in the TallyGoNativeBridge
class, which exists in both the ios
and the android
subfolders (where it is written in Objective-C and Java, respectively).
In order to make further use of the SDK, beyond what is shown in the reference app, you will need to write more bridging code. Check out the React Native docs on this subject for more information.
This reference app has just a few examples to demonstrate how to use our SDK specifically with React Native. In general, you can also use any of the Objective-C or Java examples in your React Native app. So if you're looking for more, be sure to also check out our iOS Reference App and our Android Reference App. You can also find explanations for how all of these examples work on our documentation site.