Mobile client for IoT
- React Native (follow Android and iOS guides)
- Device or emulator with Google Play Services installed
- Clone the repo
$ git clone https://github.com/eclub-sense/zettor-client.git
$ cd zettor-client
- Install dependencies
$ npm install
-
Google Sign in configuration
Android:
- Open Google Sign-In for Android
- Click on
Get a configuration file
button - Fill out a form (App name:
Zettor
, Android package name:com.zettor
) - Continue to
Choose and configure services
- Choose
Google Sign-In
- Continue to
Generate configuration files
- Download
google-services.json
and place it intozettor-client/android/app/
folder
iOS:
- Open Google Sign-In for iOS
- Click on
Get a configuration file
button - Fill out a form (App name:
Zettor
, iOS Bundle ID:org.reactjs.native.example.zettor
) - Continue to
Choose and configure services
- Choose
Google Sign-In
- Continue to
Generate configuration files
- Download
GoogleService-Info.plist
- Open Xcode project
zettor-client/ios/Zettor.xcodeproj
- Edit
URL Types
in theInfo
panel: replace predefinedREVERSED_CLIENT_ID
with yours (found insideGoogleService-Info.plist
) (don't change second URL Typeorg.reactjs.native.example.zettor
)
-
Edit configuration file
- Copy
zettor-client/config.json.dist
intozettor-client/config.json
- Open Google API Console
- Select
Credentials
- Create new OAuth client ID credentials (Application type:
Web application
) - Copy your client ID and paste it into
webClientId
inzettor-client/config.json
- Create new OAuth client ID credentials (Application type:
iOS
, Bundle ID:org.reactjs.native.example.zettor
) - Copy your client ID and paste it into
iosClientId
inzettor-client/config.json
- Paste your IoT HUB server URL into
serverUrl
inzettor-client/config.json
- Copy
-
Running on Android:
$ react-native run-android
$ adb reverse tcp:8081 tcp:8081
- Running on iOS:
$ react-native run-ios