diff --git a/.yarn/plugins/boost-workaround.cjs b/.yarn/plugins/boost-workaround.cjs deleted file mode 100644 index 251867af0..000000000 --- a/.yarn/plugins/boost-workaround.cjs +++ /dev/null @@ -1,58 +0,0 @@ -// @ts-check -/** - * @typedef {{ values: Map; }} Configuration - * @typedef {{ cwd: string; }} Workspace - * @typedef {{ configuration: Configuration; cwd: string; workspaces: Workspace[]; }} Project - * @typedef {{ mode?: "skip-build" | "update-lockfile"; }} InstallOptions - * - * @type {{ name: string; factory: (require: NodeJS.Require) => unknown; }} - */ -module.exports = { - name: "plugin-boost-workaround", - factory: (require) => ({ - hooks: { - /** @type {(project: Project, options: InstallOptions) => void} */ - afterAllInstalled(project, options) { - // This mode is typically used by tools like Renovate or Dependabot to - // keep a lockfile up-to-date without incurring the full install cost. - if (options.mode === "update-lockfile") { - return; - } - - // Download Boost directly from boost.io instead of JFrog. - // See https://github.com/facebook/react-native/issues/42180 - if (project.configuration.values.get("nodeLinker") !== "node-modules") { - return; - } - - const { npath } = require("@yarnpkg/fslib"); - const fs = require("node:fs"); - const path = require("node:path"); - - const boostPodspecs = [ - "node_modules/react-native/third-party-podspecs/boost.podspec", - "node_modules/react-native-macos/third-party-podspecs/boost.podspec", - ]; - - for (const ws of project.workspaces) { - for (const boostPodspec of boostPodspecs) { - const workspaceDir = npath.fromPortablePath(ws.cwd); - const podspecPath = path.join(workspaceDir, boostPodspec); - if (!fs.existsSync(podspecPath)) { - continue; - } - - const podspec = fs.readFileSync(podspecPath, { encoding: "utf-8" }); - const patched = podspec.replace( - "https://boostorg.jfrog.io/artifactory/main/release", - "https://archives.boost.io/release" - ); - if (patched !== podspec) { - fs.writeFileSync(boostPodspec, patched); - } - } - } - }, - }, - }), -}; diff --git a/.yarnrc.yml b/.yarnrc.yml index 67e0ea815..b39c43786 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -27,7 +27,6 @@ plugins: spec: "@yarnpkg/plugin-compat" - path: .yarn/plugins/clean.cjs - path: .yarn/plugins/link-project.cjs - - path: .yarn/plugins/boost-workaround.cjs - path: .yarn/plugins/npm-workaround.cjs - path: .yarn/plugins/undo-bin-sorting.cjs tsEnableAutoTypes: false diff --git a/android/app/src/camera/java/com/microsoft/reacttestapp/camera/MainActivityExtensions.kt b/android/app/src/camera/java/com/microsoft/reacttestapp/camera/MainActivityExtensions.kt index f608eb0cb..149672fd3 100644 --- a/android/app/src/camera/java/com/microsoft/reacttestapp/camera/MainActivityExtensions.kt +++ b/android/app/src/camera/java/com/microsoft/reacttestapp/camera/MainActivityExtensions.kt @@ -33,6 +33,7 @@ fun MainActivity.scanForQrCode() { } fragment.show(supportFragmentManager, QRCodeScannerFragment.TAG) } + shouldShowRequestPermissionRationale(Manifest.permission.CAMERA) -> { Snackbar .make( @@ -49,6 +50,7 @@ fun MainActivity.scanForQrCode() { } .show() } + else -> { ActivityCompat.requestPermissions( this, diff --git a/android/app/src/main/java/com/microsoft/reacttestapp/MainActivity.kt b/android/app/src/main/java/com/microsoft/reacttestapp/MainActivity.kt index 185fbcf68..56a6cd55b 100644 --- a/android/app/src/main/java/com/microsoft/reacttestapp/MainActivity.kt +++ b/android/app/src/main/java/com/microsoft/reacttestapp/MainActivity.kt @@ -201,21 +201,25 @@ class MainActivity : ReactActivity() { reload(BundleSource.Disk) true } + R.id.load_from_dev_server -> { PackagerConnectionSettings(this).debugServerHost = "" reload(BundleSource.Server) true } + R.id.remember_last_component -> { val enable = !menuItem.isChecked menuItem.isChecked = enable session.shouldRememberLastComponent = enable true } + R.id.scan_qr_code -> { scanForQrCode() true } + R.id.show_dev_options -> { val devSupportManager = if (BuildConfig.REACTAPP_USE_BRIDGELESS) { (application as TestApp).reactHost.devSupportManager @@ -225,6 +229,7 @@ class MainActivity : ReactActivity() { devSupportManager?.showDevOptionsDialog() true } + else -> false } } @@ -254,6 +259,7 @@ class MainActivity : ReactActivity() { .newInstance(component) .show(supportFragmentManager, ComponentBottomSheetDialogFragment.TAG) } + else -> { findActivityClass(component.name)?.let { startActivity(Intent(this, it)) diff --git a/android/app/src/reacthost-0.76/java/com/microsoft/reacttetapp/react/MainReactNativeHost.kt b/android/app/src/reacthost-0.76/java/com/microsoft/reacttetapp/react/MainReactNativeHost.kt index d1eaaa447..87a72498b 100644 --- a/android/app/src/reacthost-0.76/java/com/microsoft/reacttetapp/react/MainReactNativeHost.kt +++ b/android/app/src/reacthost-0.76/java/com/microsoft/reacttetapp/react/MainReactNativeHost.kt @@ -108,6 +108,7 @@ class MainReactNativeHost( BundleSource.Action.RELOAD -> { reactInstanceManager.devSupportManager.handleReloadJS() } + BundleSource.Action.RESTART -> { if (activity !is MainActivity) { activity.navigateUpTo(Intent(application, MainActivity.Companion::class.java))