React Native Setup
Installation of ZumoKit for React Native requires the installation of the library via npm or Yarn along with the linking of the native library for iOS and Android. Due to a Podfile being present in the library, React Native CLI should automatically attempt to link to iOS via CocoaPods.
Requirements
- Yarn / npm
- CocoaPods
- iOS 10.0+
- Xcode 11
- Android 5.0 Lollipop (API 21)
- Android Studio
- JDK 8+
Installation
Install the package:
$ yarn add zumo/zumokit-react-native
Link the library (not required for React Native 0.60 and up):
$ react-native link react-native-zumo-kit
Extra step for iOS
As ZumoKit is not yet distributed via CocoaPods Trunk, you'll need to include the ZumoKit Spec repo in your app's Podfile
(usually located in the ios
directory). You'll also need to ensure that the minimum iOS target is 10.0 or higher.
platform :ios, '10.0'
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/zumo/zumokit-specs.git'
target 'Demo' do
# ...
pod 'RNZumoKit', :path => '../node_modules/react-native-zumo-kit'
end
You will also need to execute pod install
manually from the ios
directory.
Extra step for Android
Set minSdkVersion
to 21 in your android/build.gradle
settings.