react-native-spatialconnect is Javascript library used to integrate SpatialConnect with your React Native applications.
For iOS, you need to have Carthage and Xcode installed on your system.
From the root directory of your React Native app, you can install by running:
npm install react-native-spatialconnect --save
Note: this may take a few minutes to download and compile all the dependencies.
iOS:
- Open your React Native iOS project in Xcode.
- Drag
RNSpatialConnect.xcodeproj
located in.node_modules/react-native-spatialconnect/ios
to theLibraries
folder of your project in Xcode. - In the
General
settings tab of your app underLinked Frameworks and Libraries
, addlibRNSpatialConnect.a
. - In
Build Settings
/Search Paths
/Framework search paths
add path:$(SRCROOT)/../node_modules/react-native-spatialconnect/ios/Carthage/Build/iOS
. - In
Build Settings
/Build Options
/Always Embed Swift Standard Libraries
set toYes
. - In
Build Phases
click on top left plus (+) button and addNew Run Script Phase
.- Shell command:
/usr/local/bin/carthage copy-frameworks
- Input Files:
$(SRCROOT)/../node_modules/react-native-spatialconnect/ios/Carthage/Build/iOS/SpatialConnect.framework
$(SRCROOT)/../node_modules/react-native-spatialconnect/ios/Carthage/Build/iOS/ReactiveCocoa.framework
$(SRCROOT)/../node_modules/react-native-spatialconnect/ios/Carthage/Build/iOS/wkb_ios.framework
$(SRCROOT)/../node_modules/react-native-spatialconnect/ios/Carthage/Build/iOS/JWT.framework
$(SRCROOT)/../node_modules/react-native-spatialconnect/ios/Carthage/Build/iOS/libgpkgios.framework
$(SRCROOT)/../node_modules/react-native-spatialconnect/ios/Carthage/Build/iOS/MQTTFramework.framework
$(SRCROOT)/../node_modules/react-native-spatialconnect/ios/Carthage/Build/iOS/proj4.framework
$(SRCROOT)/../node_modules/react-native-spatialconnect/ios/Carthage/Build/iOS/ZipZap.framework
$(SRCROOT)/../node_modules/react-native-spatialconnect/ios/Carthage/Build/iOS/CocoaLumberjack.framework
- Shell command:
- Minimal supported version of iOS is 8.0
Android:
- Modify
settings.gradle
located in./android
folder.- Add the following:
include ':react-native-spatialconnect'
project(':react-native-spatialconnect').projectDir = new File(rootProject.projectDir,'../node_modules/react-native-spatialconnect/android')
- Add the following:
- Modify
build.gradle
located in./android/app
folder.- Add the following under the dependencies:
compile project(':react-native-spatialconnect')
- Add the following under the dependencies: