For now - default configuration for React Native: expo.io
Package naming: com.[company].[appname]
Environment info
npx expo-env-info
npx create-expo-app --template
This APP can only be used in a secure environment (
https
). You can use exponpx start:web --https
npm i
EXPO_DEVTOOLS_LISTEN_ADDRESS=[local-ip] expo r -c
npx expo install expo-camera expo-barcode-scanner
- Create own .env file
- Deploy
Web (using Vercel)
npm build:web # first build to create web-build folder to .vercel configuration there
cd web-build
npx vercel init
cp -r .vercel ..
npm build:web
cp -r .vercel web-build/
npx vercel --prod web-build
one-liners
npx expo build:web && cp -r .vercel web-build && npx vercel --prod web-buildEAS
npm install -g eas-cli
Android
eas build -p android
adb usb
adb push *.aab /sdcard/
iOS
eas build -p ios
xcrun simctl install booted build/ios/build/Debug-iphonesimulator/*.app
mkdir -p reports && npx lighthouse http://localhost:19006/ --view --output=json --output-path=./reports/lighthouse-results.json --save-assets
https://googlechrome.github.io/lighthouse/viewer/
Optimize for production
npx expo-optimize
Deep links in Expo:
Deep link: [scheme]://[in-app-uri]
Example: myapp://foo?bar=baz
exp://127.0.0.1:19000/--/[in-app-uri]
exp://localhost:19000/--/[in-app-uri]
exp://[local-ip]:19000/--/[in-app-uri]
exp://u.expo.dev/[project-id]/--/[in-app-uri]
more
exp://u.expo.dev/[project-id]?channel-name=[channel-name]&runtime-version=[runtime-version]/--/[in-app-uri]Where: channel-name=default runtime-version=ios.runtimeVersion | android.runtimeVersion | runtimeVersion within app.json
deeplink "exp://`ip`:19000/--/foo"
more
adb shell am start -a android.intent.action.VIEW -d "[scheme]://[in-app-uri]" com.[company].[appname]adb shell am start -a android.intent.action.VIEW -d "exp://127.0.0.1:19000/--/[in-app-uri]" host.exp.exponent xcrun simctl openurl booted 'exp://127.0.0.1:19000/--/Payment'
Fix permissions:
sudo chmod 2777 /usr/local/var/run/watchman
sudo rm -rf /usr/local/var/run/watchman/*
Restart server
watchman watch-del-all
watchman shutdown-server
rm -rf /var/run/watchman/$USER-state/
watchman --foreground --logfile=/dev/stdout --no-pretty get-sockname
watchman watch-del-all &&
rm -rf $TMPDIR/react-native-packager-cache-* &&
rm -rf $TMPDIR/metro-bundler-cache-*
fingerprint
adb pubkey ~/.android/adbkey | awk '{print $1}' \
| openssl base64 -A -a -d | openssl md5 -c | tr a-z A-Z
View log messages of React Native
adb logcat -s ReactNative:V ReactNativeJS:V PackageManager:V AndroidRuntime:V
Dump resource id index from APK
W/ResourceType( 6139): For resource 0x0101053d, entry index(1341) is beyond type entryCount(1155)
aapt dump --values resources myAPK.apk > c:\my-res.txt
There is no differrences between .keystore
and .jks
https://wix.github.io/Detox/docs/introduction/getting-started/
npm install --global detox-cli