-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Android 1.9, iOS 1.12
-
Component/s: Technical Debt
-
Tags:
-
Sprint:nxfit 9.3.5
-
Story Points:8
Pick the latest version of React Native compatible with the external libraries we use.
-----------------------------------------------
Upgraded to RN 0.47.2.
RN 0.48.0 was just released at his time but not stable enough...
Updated most of the RN external libraries.
Upgrade Process
Followed https://facebook.github.io/react-native/docs/upgrading.html
react-native-git-upgrade didn't work (git diff was done but couldn't be applied) so used the alternative with react-native upgrade.
Main breaking changes
- 0.44: iOS: Support withCredentials flag in XHRs
- 0.43: Android: Only call onLayout when layout has actually changed
- 0.41: Android - ReactNativeHost getUseDeveloperSupport to public
- 0.40: Namespace all header imports to <React/...>
- 0.39: Move to new C-based implementation of css-layout on Android
- 0.39: Fix inconsistency with fractional TextInput padding
Updated RN libraries
- "bugsnag-react-native": "1.2.3", + "bugsnag-react-native": "2.3.2", "extend": "3.0.0", "jssha": "^2.3.1", "moment": "2.17.0", "nuxeo": "^3.2.1", "query-string": "^4.3.4", "random-js": "^1.0.8", - "react": "15.4.1", - "react-native": "0.38.0", - "react-native-cookies": "2.0.0", + "react": "16.0.0-alpha.12", + "react-native": "0.47.2", + "react-native-cookies": "3.2.0", "react-native-custom-tabs": "0.1.6", - "react-native-device-info": "0.9.6", - "react-native-drawer": "2.3.0", - "react-native-fetch-blob": "0.10.0", - "react-native-i18n": "0.1.1", - "react-native-photo-view": "1.2.0", - "react-native-router-flux": "3.37.0", + "react-native-device-info": "0.11.0", + "react-native-drawer": "2.5.0", + "react-native-fetch-blob": "0.10.8", + "react-native-i18n": "2.0.5", + "react-native-photo-view": "1.4.0", + "react-native-router-flux": "3.41.0", "react-native-safari-view": "2.0.0", - "react-native-segment-analytics": "0.1.9", - "react-native-share": "1.0.17", + "react-native-segment-analytics": "git+https://github.com/chitezh/react-native-segment-analytics#88d764270b8c221b0dd483ef9e3c71d5fe4cf056", + "react-native-share": "1.0.21",
Notes:
- react-native-showdown: seems dead so we should study an alterative, see NXMOB-296
- react-native-swipeout: still relying on a patched fork, let's try to align on the main repository or study an alternative, see NXMOB-387
- react-native-router-flux: updated to the latest version of the v3 branch, see NXMOB-385 for upgrading to v4 and about the npm shrinkwrap hack
- react-native-segment-analytics: now relying on a patched fork, let's try to align on the main repository, see
NXMOB-388 - react-native-fetch-blob: we now get an non blocking error when downloading a file from Android, see
NXMOB-390 - devDependencies: didn't update any lib, about this see NXMOB-389
Build
Had some Xcode compilation issues depending on the way of linking some RN libraries.
- Sometimes react-native link worked (now need to use node_modules/react-native/local-cli/cli.js link instead of the deprecated rnpm link).
- Sometimes needed to not use react-native link but rely on Cocoapods only as for react-native-i18n.
=> running react-native link globally will add some libRNI18n.a entries in project.pbxproj that mustn't be committed as they would interfere with the pod installation and make the compilation fail. - Sometimes needed to link manually in Xcode.
After aligning on master here's the process:
gem install fastlane -NV
gem install cocoapods
rm -rf node_modules
npm cache clean --force
npm install
npm prune
pod repo update
cd ios
rm -rf Pods
pod install
# make sure it compiles
fastlane gym --scheme NuxeoMobile --export_method app-store --workspace './ios/NuxeoMobile.xcworkspace'
npm start -- --reset-cache
npm run ios
- is related to
-
NXMOB-296 Investigate Could not open URL 'data:text/html; charset=utf-8;charset=utf-8;base64,': No Activity found to handle Intent
- Open
-
NXMOB-390 File download error on Android
- Resolved
-
NXMOB-413 Fix peer invalid: react@^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0, required by react-static-container@1.0.2
- Resolved
-
NXMOB-385 Upgrade to react-native-router-flux v4
- Open
-
NXMOB-387 Study an alternative to react-native-swipeout
- Open
-
NXMOB-389 Update devDependencies
- Open
-
NXMOB-388 Align react-native-segment-analytics on the main repository
- Resolved
-
NXMOB-486 Update React Native version to latest
- Resolved
- is required by
-
NXMOB-383 Use FlatList instead of ListView
- Resolved