diff --git a/docs/dev_environment.md b/docs/dev_environment.md --- a/docs/dev_environment.md +++ b/docs/dev_environment.md @@ -725,7 +725,7 @@ ## React Developer Tools - For web, you can access the React Developer Tools through the Chrome extension by opening the Chrome Developer Tools and selecting the “Components” or “Profiler” tabs. This should work in both our development environment and in production. -- For iOS and Android, a later commit in this stack will add support via `expo-dev-client`. +- For iOS and Android, TODO ## Redux Developer Tools @@ -735,7 +735,7 @@ ## Debugging JavaScript - For web, you can just use your browser of choice’s dev tools. -- For iOS and Android, a later commit in this stack will add support via `expo-dev-client`. +- For iOS and Android, you can use the dev menu in dev builds to open up a JS debugger, where you can set breakpoints via the `debugger` expression. # Working with Phabricator diff --git a/docs/nix_web_workflows.md b/docs/nix_web_workflows.md --- a/docs/nix_web_workflows.md +++ b/docs/nix_web_workflows.md @@ -71,7 +71,7 @@ ## React Developer Tools - For web, you can access the React Developer Tools through the Chrome extension by opening the Chrome Developer Tools and selecting the “Components” or “Profiler” tabs. This should work in both our development environment and in production. -- For iOS and Android, a later commit in this stack will add support via `expo-dev-client`. +- For iOS and Android, TODO ## Redux Developer Tools @@ -81,4 +81,4 @@ ## Debugging JavaScript - For web, you can just use your browser of choice’s dev tools. -- For iOS and Android, a later commit in this stack will add support via `expo-dev-client`. +- For iOS and Android, you can use the dev menu in dev builds to open up a JS debugger, where you can set breakpoints via the `debugger` expression. diff --git a/native/.gitignore b/native/.gitignore --- a/native/.gitignore +++ b/native/.gitignore @@ -59,3 +59,6 @@ codegen/dist facts/network.json + +# Expo +.expo diff --git a/native/ios/Comm.xcodeproj/project.pbxproj b/native/ios/Comm.xcodeproj/project.pbxproj --- a/native/ios/Comm.xcodeproj/project.pbxproj +++ b/native/ios/Comm.xcodeproj/project.pbxproj @@ -858,6 +858,8 @@ "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-launcher/EXDevLauncher.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-menu/EXDevMenu.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( @@ -879,6 +881,8 @@ "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXDevLauncher.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXDevMenu.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -910,6 +914,8 @@ "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-launcher/EXDevLauncher.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-menu/EXDevMenu.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( @@ -931,6 +937,8 @@ "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXDevLauncher.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXDevMenu.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; diff --git a/native/ios/Podfile b/native/ios/Podfile --- a/native/ios/Podfile +++ b/native/ios/Podfile @@ -70,8 +70,9 @@ # Excluding arm64 because ARM-based Mac simulator isn't supported yet # Excluding 32-bit x86 because nobody uses it and it causes compilation issues installer.pods_project.build_configurations.each do |config| - config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64 i386" - config.build_settings['OTHER_CPLUSPLUSFLAGS'] = '-DDONT_AUTOINSTALL_REANIMATED' + config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386' + config.build_settings['OTHER_CPLUSPLUSFLAGS'] = + '-DDONT_AUTOINSTALL_REANIMATED -DFOLLY_NO_CONFIG -DRNVERSION=70' end # Lines below are only needed to compile and use Expo Secure Store in diff --git a/native/ios/Podfile.lock b/native/ios/Podfile.lock --- a/native/ios/Podfile.lock +++ b/native/ios/Podfile.lock @@ -13,11 +13,86 @@ - EXImageLoader (4.0.0): - ExpoModulesCore - React-Core + - EXJSONUtils (0.4.0) + - EXManifests (0.4.0): + - EXJSONUtils - EXMediaLibrary (15.0.0): - ExpoModulesCore - React-Core - Expo (47.0.8): - ExpoModulesCore + - expo-dev-client (2.0.1): + - EXManifests + - expo-dev-launcher + - expo-dev-menu + - expo-dev-menu-interface + - EXUpdatesInterface + - expo-dev-launcher (2.0.2): + - EXManifests + - expo-dev-launcher/Main (= 2.0.2) + - expo-dev-menu + - expo-dev-menu-interface + - ExpoModulesCore + - EXUpdatesInterface + - React-Core + - expo-dev-launcher/Main (2.0.2): + - EXManifests + - expo-dev-launcher/Unsafe + - expo-dev-menu + - expo-dev-menu-interface + - ExpoModulesCore + - EXUpdatesInterface + - React-Core + - expo-dev-launcher/Unsafe (2.0.2): + - EXManifests + - expo-dev-menu + - expo-dev-menu-interface + - ExpoModulesCore + - EXUpdatesInterface + - React-Core + - expo-dev-menu (2.0.2): + - expo-dev-menu/Main (= 2.0.2) + - expo-dev-menu-interface (1.0.0) + - expo-dev-menu/GestureHandler (2.0.2) + - expo-dev-menu/Main (2.0.2): + - EXManifests + - expo-dev-menu-interface + - expo-dev-menu/Vendored + - ExpoModulesCore + - React-Core + - expo-dev-menu/Reanimated (2.0.2): + - DoubleConversion + - FBLazyVector + - FBReactNativeSpec + - glog + - RCT-Folly + - RCTRequired + - RCTTypeSafety + - React-callinvoker + - React-Core + - React-Core/DevSupport + - React-Core/RCTWebSocket + - React-CoreModules + - React-cxxreact + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-RCTActionSheet + - React-RCTAnimation + - React-RCTBlob + - React-RCTImage + - React-RCTLinking + - React-RCTNetwork + - React-RCTSettings + - React-RCTText + - React-RCTVibration + - ReactCommon/turbomodule/core + - Yoga + - expo-dev-menu/SafeAreaView (2.0.2) + - expo-dev-menu/Vendored (2.0.2): + - expo-dev-menu/GestureHandler + - expo-dev-menu/Reanimated + - expo-dev-menu/SafeAreaView - ExpoHaptics (12.0.1): - ExpoModulesCore - ExpoImageManipulator (11.0.0): @@ -33,6 +108,7 @@ - EXSplashScreen (0.17.5): - ExpoModulesCore - React-Core + - EXUpdatesInterface (0.8.1) - FBLazyVector (0.70.6) - FBReactNativeSpec (0.70.6): - RCT-Folly (= 2021.07.22.00) @@ -477,14 +553,21 @@ - EXFileSystem (from `../../node_modules/expo-file-system/ios`) - EXFont (from `../../node_modules/expo-font/ios`) - EXImageLoader (from `../../node_modules/expo-image-loader/ios`) + - EXJSONUtils (from `../../node_modules/expo-json-utils/ios`) + - EXManifests (from `../../node_modules/expo-manifests/ios`) - EXMediaLibrary (from `../../node_modules/expo-media-library/ios`) - Expo (from `../../node_modules/expo`) + - expo-dev-client (from `../../node_modules/expo-dev-client/ios`) + - expo-dev-launcher (from `../../node_modules/expo-dev-launcher`) + - expo-dev-menu (from `../../node_modules/expo-dev-menu`) + - expo-dev-menu-interface (from `../../node_modules/expo-dev-menu-interface/ios`) - ExpoHaptics (from `../../node_modules/expo-haptics/ios`) - ExpoImageManipulator (from `../../node_modules/expo-image-manipulator/ios`) - ExpoKeepAwake (from `../../node_modules/expo-keep-awake/ios`) - ExpoModulesCore (from `../../node_modules/expo-modules-core`) - EXSecureStore (from `../../node_modules/expo-secure-store/ios`) - EXSplashScreen (from `../../node_modules/expo-splash-screen/ios`) + - EXUpdatesInterface (from `../../node_modules/expo-updates-interface/ios`) - FBLazyVector (from `../../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../../node_modules/react-native/React/FBReactNativeSpec`) - glog (from `../../node_modules/react-native/third-party-podspecs/glog.podspec`) @@ -578,10 +661,22 @@ :path: "../../node_modules/expo-font/ios" EXImageLoader: :path: "../../node_modules/expo-image-loader/ios" + EXJSONUtils: + :path: "../../node_modules/expo-json-utils/ios" + EXManifests: + :path: "../../node_modules/expo-manifests/ios" EXMediaLibrary: :path: "../../node_modules/expo-media-library/ios" Expo: :path: "../../node_modules/expo" + expo-dev-client: + :path: "../../node_modules/expo-dev-client/ios" + expo-dev-launcher: + :path: "../../node_modules/expo-dev-launcher" + expo-dev-menu: + :path: "../../node_modules/expo-dev-menu" + expo-dev-menu-interface: + :path: "../../node_modules/expo-dev-menu-interface/ios" ExpoHaptics: :path: "../../node_modules/expo-haptics/ios" ExpoImageManipulator: @@ -594,6 +689,8 @@ :path: "../../node_modules/expo-secure-store/ios" EXSplashScreen: :path: "../../node_modules/expo-splash-screen/ios" + EXUpdatesInterface: + :path: "../../node_modules/expo-updates-interface/ios" FBLazyVector: :path: "../../node_modules/react-native/Libraries/FBLazyVector" FBReactNativeSpec: @@ -730,14 +827,21 @@ EXFileSystem: 60602b6eefa6873f97172c684b7537c9760b50d6 EXFont: 319606bfe48c33b5b5063fb0994afdc496befe80 EXImageLoader: 84b65e6bd9d3345d6fbb3ab936a546c54496a64d + EXJSONUtils: 09aef2c1fba1a116ca8c73a2c8299aac00d96b43 + EXManifests: 347f49430b63444579aa013f0ad057d16b8d1cc8 EXMediaLibrary: b1c4f78878e45f6a359aff3a059e1660c41b73ab Expo: 36b5f625d36728adbdd1934d4d57182f319ab832 + expo-dev-client: d723d52ccfbe2eb47ee24d1ac0cf5b39001589c2 + expo-dev-launcher: 953f564f7d006f1af50b119cacb48cafcad40c73 + expo-dev-menu: 3d25298c15e2179c9f71b92f2273c83bdd71c435 + expo-dev-menu-interface: 45581093393dacd51ce5e7f641cf9ed5064a2e3f ExpoHaptics: 5a56d30a87ea213dd00b09566dc4b441a4dff97f ExpoImageManipulator: 5f3c1ab8dd81de11491b5051bb925abc91fe57e4 ExpoKeepAwake: 69b59d0a8d2b24de9f82759c39b3821fec030318 ExpoModulesCore: b5d21c8880afda6fb6ee95469f9ac2ec9b98e995 EXSecureStore: daec0117c922a67c658cb229152a9e252e5c1750 EXSplashScreen: 3e989924f61a8dd07ee4ea584c6ba14be9b51949 + EXUpdatesInterface: bffd1ead18f0bab04fa784ca159c115607b8a23c FBLazyVector: 48289402952f4f7a4e235de70a9a590aa0b79ef4 FBReactNativeSpec: c8856286d1e15e74b57b892c68d7d1d05b79c7de fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 @@ -810,6 +914,6 @@ SQLCipher-Amalgamation: cbd36045fe7b458b8a442958a01aefdbc44c20f8 Yoga: 99caf8d5ab45e9d637ee6e0174ec16fbbb01bcfc -PODFILE CHECKSUM: 773766c9c6cbcb12022cfa6d3b3dc498a490fe25 +PODFILE CHECKSUM: 60ed9de6b14a66c6022cd82cafcb04594edd7eaf COCOAPODS: 1.11.3 diff --git a/native/package.json b/native/package.json --- a/native/package.json +++ b/native/package.json @@ -11,8 +11,8 @@ "clean-ios": "rm -rf ios/Pods/", "clean-all": "yarn clean && rm -rf ~/Library/Developer/Xcode/DerivedData/Comm-*; cd android && (./gradlew clean || true)", "postinstall": "cd ../ && echo '{\"name\": \"olm\", \"version\": \"3.2.4\"}' > ./node_modules/olm/package.json && yarn patch-package && yarn flow-mono create-symlinks native && cd native && yarn jetify && ((cd ios && PATH=/usr/bin:\"$PATH\" pod install) || true)", - "start": "yarn react-native start", - "dev": "yarn concurrently --names=\"REDUX,METRO\" -c \"bgGreen.bold,bgBlue.bold\" \"yarn redux-devtools\" \"yarn start\"", + "start": "yarn expo start --dev-client", + "dev": "yarn concurrently --names=\"REDUX,EXDEV\" -c \"bgGreen.bold,bgBlue.bold\" \"yarn redux-devtools\" \"yarn start\"", "test": "yarn jest", "logfirebase": "adb shell logcat | grep -E -i 'FIRMessagingModule|firebase'", "redux-devtools": "redux-devtools --port=8043", @@ -63,6 +63,7 @@ "@react-navigation/stack": "^6.3.2", "base-64": "^0.1.0", "expo": "47.0.8", + "expo-dev-client": "~2.0.1", "expo-haptics": "~12.0.1", "expo-image-manipulator": "~11.0.0", "expo-media-library": "~15.0.0", diff --git a/yarn.lock b/yarn.lock --- a/yarn.lock +++ b/yarn.lock @@ -10017,6 +10017,39 @@ "@expo/config" "~7.0.2" uuid "^3.3.2" +expo-dev-client@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/expo-dev-client/-/expo-dev-client-2.0.1.tgz#f5878807c96a60d90fc219b6535654cb6ddb9214" + integrity sha512-+OXXZKKo/CplqklpaZasHAX7qaRrzC83biqXTFa1z5NiFW41uqtAqTFx6gmPi4kx3YgwtD+ep6R3SRrKjdCukg== + dependencies: + expo-dev-launcher "2.0.2" + expo-dev-menu "2.0.2" + expo-dev-menu-interface "1.0.0" + expo-manifests "~0.4.0" + expo-updates-interface "~0.8.0" + +expo-dev-launcher@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expo-dev-launcher/-/expo-dev-launcher-2.0.2.tgz#bbcde0dd35e81ed6a415dc5b246da68e9b365255" + integrity sha512-MQT7VSOHJQrEs3YAv5BQLYs3Uk7P1dNqBw6kKrj3jKBq0z92k2LLg1aCk7nP8OGJVDvrb2jTXBka8VXVqF0ECg== + dependencies: + expo-dev-menu "2.0.2" + resolve-from "^5.0.0" + semver "^7.3.5" + +expo-dev-menu-interface@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/expo-dev-menu-interface/-/expo-dev-menu-interface-1.0.0.tgz#00204cb7e1c43cc8a4eee9cb74f6e5760b512d75" + integrity sha512-4lsVofTwV9oBM+zo7XhtmvbfiXD4I7I3Rqns6U0i6IOnH7OGBDpKvGZ5YikWPFGn6NOu8loqqd8S7inFIaxC0A== + +expo-dev-menu@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expo-dev-menu/-/expo-dev-menu-2.0.2.tgz#9a2d7a00097d4eafe54cf8e9a5c727174e101e4c" + integrity sha512-SxR5riXgm+VVKsDKC/bOLuOJ0CKutW07G+OqJ9eYfxwGfxa8omLJHwagbCsd8FwUPGkzvzgfRJRGLo5J6REMow== + dependencies: + expo-dev-menu-interface "1.0.0" + semver "^7.3.5" + expo-error-recovery@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/expo-error-recovery/-/expo-error-recovery-4.0.1.tgz#3e3333e134c992c234539d3773fe78915c883755" @@ -10053,11 +10086,23 @@ dependencies: expo-image-loader "~4.0.0" +expo-json-utils@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/expo-json-utils/-/expo-json-utils-0.4.0.tgz#47ae83a1cc973101d62371f94790e9ad39491751" + integrity sha512-lK6gjea72XTYafpKNNJaMrBK5dYAX8LFLXrp/M1MKJU4Zy7EHd2rKrLwop3GZts8VdwLHeVcMko79SAbhe3i5Q== + expo-keep-awake@~11.0.1: version "11.0.1" resolved "https://registry.yarnpkg.com/expo-keep-awake/-/expo-keep-awake-11.0.1.tgz#ee354465892a94040ffe09901b85b469e7d54fb3" integrity sha512-44ZjgLE4lnce2d40Pv8xsjMVc6R5GvgHOwZfkLYtGmgYG9TYrEJeEj5UfSeweXPL3pBFhXKfFU8xpGYMaHdP0A== +expo-manifests@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/expo-manifests/-/expo-manifests-0.4.0.tgz#6fd44b6427e113f2eb9409ca46df95cbbea068df" + integrity sha512-IdZjIYDxx4nH0Gb3X4T4/2YknmR/jSLxymAS0m7SfJ9V7Vlu/y0p3lNwUys9/JzihxX9PDIuOi/Y4/uqL6TlXg== + dependencies: + expo-json-utils "~0.4.0" + expo-media-library@~15.0.0: version "15.0.0" resolved "https://registry.yarnpkg.com/expo-media-library/-/expo-media-library-15.0.0.tgz#12b05bb2c3cc209a08acbd2d3e35ba0a6a141003" @@ -10095,6 +10140,11 @@ "@expo/configure-splash-screen" "^0.6.0" "@expo/prebuild-config" "5.0.7" +expo-updates-interface@~0.8.0: + version "0.8.1" + resolved "https://registry.yarnpkg.com/expo-updates-interface/-/expo-updates-interface-0.8.1.tgz#baeeeb01a77439682432be83ba78bc2e00547c4e" + integrity sha512-1TPFCTQFHMZbltFGnxig3PbN/b6nO4T0RyL8XqdmYvQY0ElOCprZXQQ8vNDqeLYHgausG1lD4OyJwFzh2SNBSA== + expo@47.0.8: version "47.0.8" resolved "https://registry.yarnpkg.com/expo/-/expo-47.0.8.tgz#80390fd63f8305103445069c647011915f7c32dd"