0.12.1 • Published 8 years ago
react-native-spatialconnect v0.12.1
react-native-spatialconnect
react-native-spatialconnect is Javascript library used to integrate SpatialConnect with your React Native applications.
Prerequisites
For iOS, you need to have Carthage and Xcode installed on your system.
Configuration & Installation
From the root directory of your React Native app, you can install by running:
npm install react-native-spatialconnect --saveNote: this may take a few minutes to download and compile all the dependencies.
iOS:
- Open your React Native iOS project in Xcode.
- Drag
RNSpatialConnect.xcodeprojlocated in.node_modules/react-native-spatialconnect/iosto theLibrariesfolder of your project in Xcode. - In the
Generalsettings tab of your app underLinked Frameworks and Libraries, addlibRNSpatialConnect.a. - In
Build Settings/Search Paths/Framework search pathsadd path:$(SRCROOT)/../node_modules/react-native-spatialconnect/ios/Carthage/Build/iOS. - In
Build Settings/Build Options/Always Embed Swift Standard Librariesset toYes. - In
Build Phasesclick 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.gradlelocated in./androidfolder.- 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.gradlelocated in./android/appfolder.- Add the following under the dependencies:
compile project(':react-native-spatialconnect')
- Add the following under the dependencies: