Projet Viseo Companion - ReactNative
- ReactNative Framework (Javascript framework for building multi-platform native mobile app)
- NPM package manager
npm install
First launch an emulator or connect a android device. Then run :
react-native run-android
The project is going to be build and deploy on the device/emulator.
You have to be on a mac to produce an iOS build.
react-native run-ios
You have to run at least once the above command.
-
Open the "ViseoCompanion.xcodeproj" in XCode.
-
Make sure you have set up the signing properties for the project and the testProject. To do so on the left dock, click on your project name. Then click on your project name in the central panel and select Tests. In signing -> team, set the appropriate account.
-
Connect your device Wait for the downloading of the symbol. (it can takes several minutes)
-
Click on the play button. For the first time you have to "trust" the developer on your phone.
These packages are not only JS package, they also have native code inside. Thus they required to be installed in the Android & iOS project. The detailed instructions are on the git of each package
- react-native-fcm
- react-native-image-picker
- react-native-navigation
- react-native-vector-icons
Don't do that unless you really want to regenerate the XCode project.
-
Remove all file in /ios folder EXCEPT "GoogleService-Info.plist"
-
In the iOS folder :
react-native upgrade
It will ask you if you want te re-create all the build file, say NO for all file in the /android folder. At this step you should see sevelar "ViseoCompanion*" folders in your ios folder.
-
We now are going to create a podfile to manage the iOS dependencies:
Before this step, make sur your have cocoapod installed (you can find all the informations here : https://guides.cocoapods.org/using/getting-started.html)
In the ios folder run :
pod init
It will create a "podfile" file.
In this file, under the 'ViseoCompanion' section, add this 3 pods :
pod 'Firebase/Messaging' pod 'Fabric' pod 'Crashlytics'
To launch the installation, just run
pod install
-
Link the dependencies in you project by running : (from your project folder)
react-native link
This will create the link between the module file and the XCode project.
-
Open the .xcodeproj in XCode. Right click on the project name (right panel) and click on "add files to <...>". Select the pod.xcodeproj, in your Pods directory.
-
Read the documentation for each "NPM PACKAGE with deep configuration" mentioned above, and add the corresponding configuration in the "appDelegate.m" and "appDelegate.h".
-
Drag and drop the "GoogleService-Info.plist" file into your project in XCode.
Your XCode project is now ready to be build.