- Change React and React Native version on
package.json - run
yarn installto upgrade dependencies - run
yarn outdatedoryarn upgrade-interactivelibraries that are outdated (make sure that there's no breaking changes, check release notes (one by one)) - check the diff or use the upgrade-helper and update the native code
- open Xcode and link the binaries
- run on iOS
- test iOS
- run on Android
- test Android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RTL relay testings | |
| https://github.com/facebook/relay/blob/master/packages/relay-test-utils/__tests__/RelayMockEnvironmentWithComponents-test.js | |
| https://github.com/entria/entria-fullstack/pull/109/files | |
| Very easy native splash screen on Xcode | |
| https://medium.com/@kelleyannerose/react-native-ios-splash-screen-in-xcode-bd53b84430ec | |
| Init rn app on specific rn version | |
| (rn cli 2.0.1+) | |
| react-native-cli init --version="react-native@0.59.10" my project |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function adb_connect { | |
| # PORT used to connect. Default: 5555 | |
| PORT=${1:-5555} | |
| # IP address from current device connected | |
| IP_ADDRESS=`adb shell ip route | awk '{print $9}'` | |
| echo "ADB connect to $IP_ADDRESS on port $PORT" | |
| # Change connection from usb to tcpip using $PORT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Action } from "redux"; | |
| import { ActionsObservable, Epic, StateObservable } from "redux-observable"; | |
| import { TestScheduler } from "rxjs/testing"; | |
| const assertDeepEquals = (actual: any, expected: any) => { | |
| expect(actual).toEqual(expected); | |
| }; | |
| export const marbleTest = <T extends Action, O extends T = T, S = void, D = any>({ | |
| epic, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ios | |
| match(...) | |
| package = load_json(json_path: "../package.json") | |
| increment_version_number(version_number: package["version"]) | |
| increment_build_number(build_number: ENV["CIRCLE_BUILD_NUM"] || 1) | |
| # android | |
| package = load_json(json_path: "../package.json") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| variables: | |
| ANDROID_COMPILE_SDK: "28" | |
| test:unit: | |
| image: circleci/android:api-${ANDROID_COMPILE_SDK} | |
| cache: | |
| key: gradle-cache | |
| paths: [ .gradle ] | |
| variables: | |
| # GRADLE_OPTS: "-Dorg.gradle.daemon=false" |
In your command-line run the following commands:
brew doctorbrew update
Native Module in React-Native
To get a great grip on how wo build one, read these blogs.
- https://github.com/peggyrayzis/react-native-create-bridge
- https://shift.infinite.red/beginner-s-guide-to-using-cocoapods-with-react-native-46cb4d372995
- http://moduscreate.com/swift-modules-for-react-native/
- http://browniefed.com/blog/react-native-how-to-bridge-an-objective-c-view-component/
- http://brentvatne.ca/react-native-view-component-1/
- http://brentvatne.ca/react-native-view-component-2/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| const driveUploadPath = 'https://www.googleapis.com/upload/drive/v3/files'; | |
| // 'id' is driveId - unique file id on google drive | |
| // 'version' is driveVersion - version of file on google drive | |
| // 'name' name of the file on google drive | |
| // 'appProperties' keep the custom `ifid` field | |
| const fileFields = 'id,version,name,appProperties'; |