Skip to content

getting started

Valentin Mourot edited this page Oct 24, 2019 · 3 revisions

Getting stared

ODE Mobile Framework, as a React Native application, has two layers of code : a Javascript (actually Typescript) part, and a Native one (Java for Android, objC/Swift for iOS).

1. Follow the steps described at "Installing dependencies" section of React Native's documentation under the "React Native CLI Quickstart" tab.

The latest compatible React Native version is currently the 0.60.3.

2. Once all environment dependencies are installed, you can start running ODE Mobile Framework locally :
# Clone
git clone https://github.com/opendigitaleducation/ode-mobile-framework.git


cd ode-mobile-framework

npm install

Run only for IOS

# Make sure you have Cocoa Pods installed => https://cocoapods.org/
# As of 24 oct 2019, AppCenter pod isn't compatible with cocoapods 1.8.x

# sudo gem install cocoapods -v 1.7.5

cd ios
pod install
cd ..
react-native run-ios
# - OR -
react-native run-ios --device="iPhoneXsMax"
# You can use any iOS official device name, or any connected physical device's one (ex: "iPhone de Valentin").

Run only for Android

# Start !
# /!\ Make sure your virtual device is started or your physical device is connected !
react-native run-android
# - OR -
react-native run-android --deviceId [string]
# Use an Id given by the `adb devices` command.

Note on Debugging

Because of the two layers of code (JS and Native), you cannot debug ODE Mobile Framework just with one tool.

To debug JS part, you can install a remote JS debugger, like React Native Debugguer.

To debug iOS native code, you may use Xcode.

To debug Android native code, you may use Android Studio, or run adb logcat in a terminal.

Override configuration

ODE Mobile Framework has different overrides (ONE, NEO, ...) which differs on appId, name, assets and platform configuration. By default, the override used in a generic development one.

You can switch override with these simple commands :

# Switch to a specific override
node ode-plugin.js override switch --to=<overrideId>

# Switch to the default override
node ode-plugin.js override restore

By default, platform configuration isn't overrided because it contains some private information. The override command will prompt you a custom repository to fetch your override platform configuration.

Please check the full documentation on the override plugin.

Troubleshooting

No one's there... Wait just a little, problems always come fast !