diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index dd1b5d245..6b88b5acf 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1673,76 +1673,76 @@ PODS: - Yoga (0.0.0) DEPENDENCIES: - - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - - fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`) - - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) + - boost (from `../../node_modules/react-native/third-party-podspecs/boost.podspec`) + - DoubleConversion (from `../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) + - FBLazyVector (from `../../node_modules/react-native/Libraries/FBLazyVector`) + - fmt (from `../../node_modules/react-native/third-party-podspecs/fmt.podspec`) + - glog (from `../../node_modules/react-native/third-party-podspecs/glog.podspec`) + - hermes-engine (from `../../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - NitroImage (from `../../node_modules/react-native-nitro-image`) - NitroModules (from `../../node_modules/react-native-nitro-modules`) - - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCTDeprecation (from `../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`) - - RCTRequired (from `../node_modules/react-native/Libraries/Required`) - - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - - React (from `../node_modules/react-native/`) - - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) - - React-Core (from `../node_modules/react-native/`) - - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) - - React-debug (from `../node_modules/react-native/ReactCommon/react/debug`) - - React-defaultsnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/defaults`) - - React-domnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/dom`) - - React-Fabric (from `../node_modules/react-native/ReactCommon`) - - React-FabricComponents (from `../node_modules/react-native/ReactCommon`) - - React-FabricImage (from `../node_modules/react-native/ReactCommon`) - - React-featureflags (from `../node_modules/react-native/ReactCommon/react/featureflags`) - - React-featureflagsnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/featureflags`) - - React-graphics (from `../node_modules/react-native/ReactCommon/react/renderer/graphics`) - - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) - - React-idlecallbacksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks`) - - React-ImageManager (from `../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios`) - - React-jserrorhandler (from `../node_modules/react-native/ReactCommon/jserrorhandler`) - - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector-modern`) - - React-jsitracing (from `../node_modules/react-native/ReactCommon/hermes/executor/`) - - React-logger (from `../node_modules/react-native/ReactCommon/logger`) - - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`) - - React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`) + - RCT-Folly (from `../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) + - RCT-Folly/Fabric (from `../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) + - RCTDeprecation (from `../../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`) + - RCTRequired (from `../../node_modules/react-native/Libraries/Required`) + - RCTTypeSafety (from `../../node_modules/react-native/Libraries/TypeSafety`) + - React (from `../../node_modules/react-native/`) + - React-callinvoker (from `../../node_modules/react-native/ReactCommon/callinvoker`) + - React-Core (from `../../node_modules/react-native/`) + - React-Core/RCTWebSocket (from `../../node_modules/react-native/`) + - React-CoreModules (from `../../node_modules/react-native/React/CoreModules`) + - React-cxxreact (from `../../node_modules/react-native/ReactCommon/cxxreact`) + - React-debug (from `../../node_modules/react-native/ReactCommon/react/debug`) + - React-defaultsnativemodule (from `../../node_modules/react-native/ReactCommon/react/nativemodule/defaults`) + - React-domnativemodule (from `../../node_modules/react-native/ReactCommon/react/nativemodule/dom`) + - React-Fabric (from `../../node_modules/react-native/ReactCommon`) + - React-FabricComponents (from `../../node_modules/react-native/ReactCommon`) + - React-FabricImage (from `../../node_modules/react-native/ReactCommon`) + - React-featureflags (from `../../node_modules/react-native/ReactCommon/react/featureflags`) + - React-featureflagsnativemodule (from `../../node_modules/react-native/ReactCommon/react/nativemodule/featureflags`) + - React-graphics (from `../../node_modules/react-native/ReactCommon/react/renderer/graphics`) + - React-hermes (from `../../node_modules/react-native/ReactCommon/hermes`) + - React-idlecallbacksnativemodule (from `../../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks`) + - React-ImageManager (from `../../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios`) + - React-jserrorhandler (from `../../node_modules/react-native/ReactCommon/jserrorhandler`) + - React-jsi (from `../../node_modules/react-native/ReactCommon/jsi`) + - React-jsiexecutor (from `../../node_modules/react-native/ReactCommon/jsiexecutor`) + - React-jsinspector (from `../../node_modules/react-native/ReactCommon/jsinspector-modern`) + - React-jsitracing (from `../../node_modules/react-native/ReactCommon/hermes/executor/`) + - React-logger (from `../../node_modules/react-native/ReactCommon/logger`) + - React-Mapbuffer (from `../../node_modules/react-native/ReactCommon`) + - React-microtasksnativemodule (from `../../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`) - react-native-safe-area-context (from `../../node_modules/react-native-safe-area-context`) - "react-native-segmented-control (from `../../node_modules/@react-native-segmented-control/segmented-control`)" - - React-nativeconfig (from `../node_modules/react-native/ReactCommon`) - - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) - - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) - - React-performancetimeline (from `../node_modules/react-native/ReactCommon/react/performance/timeline`) - - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) - - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) - - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) - - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) - - React-RCTFabric (from `../node_modules/react-native/React`) - - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) - - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) - - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) - - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) - - React-RCTText (from `../node_modules/react-native/Libraries/Text`) - - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - - React-rendererconsistency (from `../node_modules/react-native/ReactCommon/react/renderer/consistency`) - - React-rendererdebug (from `../node_modules/react-native/ReactCommon/react/renderer/debug`) - - React-rncore (from `../node_modules/react-native/ReactCommon`) - - React-RuntimeApple (from `../node_modules/react-native/ReactCommon/react/runtime/platform/ios`) - - React-RuntimeCore (from `../node_modules/react-native/ReactCommon/react/runtime`) - - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - - React-RuntimeHermes (from `../node_modules/react-native/ReactCommon/react/runtime`) - - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - - React-timing (from `../node_modules/react-native/ReactCommon/react/timing`) - - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) + - React-nativeconfig (from `../../node_modules/react-native/ReactCommon`) + - React-NativeModulesApple (from `../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) + - React-perflogger (from `../../node_modules/react-native/ReactCommon/reactperflogger`) + - React-performancetimeline (from `../../node_modules/react-native/ReactCommon/react/performance/timeline`) + - React-RCTActionSheet (from `../../node_modules/react-native/Libraries/ActionSheetIOS`) + - React-RCTAnimation (from `../../node_modules/react-native/Libraries/NativeAnimation`) + - React-RCTAppDelegate (from `../../node_modules/react-native/Libraries/AppDelegate`) + - React-RCTBlob (from `../../node_modules/react-native/Libraries/Blob`) + - React-RCTFabric (from `../../node_modules/react-native/React`) + - React-RCTImage (from `../../node_modules/react-native/Libraries/Image`) + - React-RCTLinking (from `../../node_modules/react-native/Libraries/LinkingIOS`) + - React-RCTNetwork (from `../../node_modules/react-native/Libraries/Network`) + - React-RCTSettings (from `../../node_modules/react-native/Libraries/Settings`) + - React-RCTText (from `../../node_modules/react-native/Libraries/Text`) + - React-RCTVibration (from `../../node_modules/react-native/Libraries/Vibration`) + - React-rendererconsistency (from `../../node_modules/react-native/ReactCommon/react/renderer/consistency`) + - React-rendererdebug (from `../../node_modules/react-native/ReactCommon/react/renderer/debug`) + - React-rncore (from `../../node_modules/react-native/ReactCommon`) + - React-RuntimeApple (from `../../node_modules/react-native/ReactCommon/react/runtime/platform/ios`) + - React-RuntimeCore (from `../../node_modules/react-native/ReactCommon/react/runtime`) + - React-runtimeexecutor (from `../../node_modules/react-native/ReactCommon/runtimeexecutor`) + - React-RuntimeHermes (from `../../node_modules/react-native/ReactCommon/react/runtime`) + - React-runtimescheduler (from `../../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) + - React-timing (from `../../node_modules/react-native/ReactCommon/react/timing`) + - React-utils (from `../../node_modules/react-native/ReactCommon/react/utils`) - ReactCodegen (from `build/generated/ios`) - - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - ReactCommon/turbomodule/core (from `../../node_modules/react-native/ReactCommon`) - RNScreens (from `../../node_modules/react-native-screens`) - - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) + - Yoga (from `../../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: trunk: @@ -1750,142 +1750,142 @@ SPEC REPOS: EXTERNAL SOURCES: boost: - :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" + :podspec: "../../node_modules/react-native/third-party-podspecs/boost.podspec" DoubleConversion: - :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" + :podspec: "../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" FBLazyVector: - :path: "../node_modules/react-native/Libraries/FBLazyVector" + :path: "../../node_modules/react-native/Libraries/FBLazyVector" fmt: - :podspec: "../node_modules/react-native/third-party-podspecs/fmt.podspec" + :podspec: "../../node_modules/react-native/third-party-podspecs/fmt.podspec" glog: - :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" + :podspec: "../../node_modules/react-native/third-party-podspecs/glog.podspec" hermes-engine: - :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" + :podspec: "../../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" :tag: hermes-2024-11-12-RNv0.76.2-5b4aa20c719830dcf5684832b89a6edb95ac3d64 NitroImage: :path: "../../node_modules/react-native-nitro-image" NitroModules: :path: "../../node_modules/react-native-nitro-modules" RCT-Folly: - :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" + :podspec: "../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" RCTDeprecation: - :path: "../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation" + :path: "../../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation" RCTRequired: - :path: "../node_modules/react-native/Libraries/Required" + :path: "../../node_modules/react-native/Libraries/Required" RCTTypeSafety: - :path: "../node_modules/react-native/Libraries/TypeSafety" + :path: "../../node_modules/react-native/Libraries/TypeSafety" React: - :path: "../node_modules/react-native/" + :path: "../../node_modules/react-native/" React-callinvoker: - :path: "../node_modules/react-native/ReactCommon/callinvoker" + :path: "../../node_modules/react-native/ReactCommon/callinvoker" React-Core: - :path: "../node_modules/react-native/" + :path: "../../node_modules/react-native/" React-CoreModules: - :path: "../node_modules/react-native/React/CoreModules" + :path: "../../node_modules/react-native/React/CoreModules" React-cxxreact: - :path: "../node_modules/react-native/ReactCommon/cxxreact" + :path: "../../node_modules/react-native/ReactCommon/cxxreact" React-debug: - :path: "../node_modules/react-native/ReactCommon/react/debug" + :path: "../../node_modules/react-native/ReactCommon/react/debug" React-defaultsnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/defaults" + :path: "../../node_modules/react-native/ReactCommon/react/nativemodule/defaults" React-domnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/dom" + :path: "../../node_modules/react-native/ReactCommon/react/nativemodule/dom" React-Fabric: - :path: "../node_modules/react-native/ReactCommon" + :path: "../../node_modules/react-native/ReactCommon" React-FabricComponents: - :path: "../node_modules/react-native/ReactCommon" + :path: "../../node_modules/react-native/ReactCommon" React-FabricImage: - :path: "../node_modules/react-native/ReactCommon" + :path: "../../node_modules/react-native/ReactCommon" React-featureflags: - :path: "../node_modules/react-native/ReactCommon/react/featureflags" + :path: "../../node_modules/react-native/ReactCommon/react/featureflags" React-featureflagsnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/featureflags" + :path: "../../node_modules/react-native/ReactCommon/react/nativemodule/featureflags" React-graphics: - :path: "../node_modules/react-native/ReactCommon/react/renderer/graphics" + :path: "../../node_modules/react-native/ReactCommon/react/renderer/graphics" React-hermes: - :path: "../node_modules/react-native/ReactCommon/hermes" + :path: "../../node_modules/react-native/ReactCommon/hermes" React-idlecallbacksnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks" + :path: "../../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks" React-ImageManager: - :path: "../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios" + :path: "../../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios" React-jserrorhandler: - :path: "../node_modules/react-native/ReactCommon/jserrorhandler" + :path: "../../node_modules/react-native/ReactCommon/jserrorhandler" React-jsi: - :path: "../node_modules/react-native/ReactCommon/jsi" + :path: "../../node_modules/react-native/ReactCommon/jsi" React-jsiexecutor: - :path: "../node_modules/react-native/ReactCommon/jsiexecutor" + :path: "../../node_modules/react-native/ReactCommon/jsiexecutor" React-jsinspector: - :path: "../node_modules/react-native/ReactCommon/jsinspector-modern" + :path: "../../node_modules/react-native/ReactCommon/jsinspector-modern" React-jsitracing: - :path: "../node_modules/react-native/ReactCommon/hermes/executor/" + :path: "../../node_modules/react-native/ReactCommon/hermes/executor/" React-logger: - :path: "../node_modules/react-native/ReactCommon/logger" + :path: "../../node_modules/react-native/ReactCommon/logger" React-Mapbuffer: - :path: "../node_modules/react-native/ReactCommon" + :path: "../../node_modules/react-native/ReactCommon" React-microtasksnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks" + :path: "../../node_modules/react-native/ReactCommon/react/nativemodule/microtasks" react-native-safe-area-context: :path: "../../node_modules/react-native-safe-area-context" react-native-segmented-control: :path: "../../node_modules/@react-native-segmented-control/segmented-control" React-nativeconfig: - :path: "../node_modules/react-native/ReactCommon" + :path: "../../node_modules/react-native/ReactCommon" React-NativeModulesApple: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" + :path: "../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" React-perflogger: - :path: "../node_modules/react-native/ReactCommon/reactperflogger" + :path: "../../node_modules/react-native/ReactCommon/reactperflogger" React-performancetimeline: - :path: "../node_modules/react-native/ReactCommon/react/performance/timeline" + :path: "../../node_modules/react-native/ReactCommon/react/performance/timeline" React-RCTActionSheet: - :path: "../node_modules/react-native/Libraries/ActionSheetIOS" + :path: "../../node_modules/react-native/Libraries/ActionSheetIOS" React-RCTAnimation: - :path: "../node_modules/react-native/Libraries/NativeAnimation" + :path: "../../node_modules/react-native/Libraries/NativeAnimation" React-RCTAppDelegate: - :path: "../node_modules/react-native/Libraries/AppDelegate" + :path: "../../node_modules/react-native/Libraries/AppDelegate" React-RCTBlob: - :path: "../node_modules/react-native/Libraries/Blob" + :path: "../../node_modules/react-native/Libraries/Blob" React-RCTFabric: - :path: "../node_modules/react-native/React" + :path: "../../node_modules/react-native/React" React-RCTImage: - :path: "../node_modules/react-native/Libraries/Image" + :path: "../../node_modules/react-native/Libraries/Image" React-RCTLinking: - :path: "../node_modules/react-native/Libraries/LinkingIOS" + :path: "../../node_modules/react-native/Libraries/LinkingIOS" React-RCTNetwork: - :path: "../node_modules/react-native/Libraries/Network" + :path: "../../node_modules/react-native/Libraries/Network" React-RCTSettings: - :path: "../node_modules/react-native/Libraries/Settings" + :path: "../../node_modules/react-native/Libraries/Settings" React-RCTText: - :path: "../node_modules/react-native/Libraries/Text" + :path: "../../node_modules/react-native/Libraries/Text" React-RCTVibration: - :path: "../node_modules/react-native/Libraries/Vibration" + :path: "../../node_modules/react-native/Libraries/Vibration" React-rendererconsistency: - :path: "../node_modules/react-native/ReactCommon/react/renderer/consistency" + :path: "../../node_modules/react-native/ReactCommon/react/renderer/consistency" React-rendererdebug: - :path: "../node_modules/react-native/ReactCommon/react/renderer/debug" + :path: "../../node_modules/react-native/ReactCommon/react/renderer/debug" React-rncore: - :path: "../node_modules/react-native/ReactCommon" + :path: "../../node_modules/react-native/ReactCommon" React-RuntimeApple: - :path: "../node_modules/react-native/ReactCommon/react/runtime/platform/ios" + :path: "../../node_modules/react-native/ReactCommon/react/runtime/platform/ios" React-RuntimeCore: - :path: "../node_modules/react-native/ReactCommon/react/runtime" + :path: "../../node_modules/react-native/ReactCommon/react/runtime" React-runtimeexecutor: - :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" + :path: "../../node_modules/react-native/ReactCommon/runtimeexecutor" React-RuntimeHermes: - :path: "../node_modules/react-native/ReactCommon/react/runtime" + :path: "../../node_modules/react-native/ReactCommon/react/runtime" React-runtimescheduler: - :path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" + :path: "../../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" React-timing: - :path: "../node_modules/react-native/ReactCommon/react/timing" + :path: "../../node_modules/react-native/ReactCommon/react/timing" React-utils: - :path: "../node_modules/react-native/ReactCommon/react/utils" + :path: "../../node_modules/react-native/ReactCommon/react/utils" ReactCodegen: :path: build/generated/ios ReactCommon: - :path: "../node_modules/react-native/ReactCommon" + :path: "../../node_modules/react-native/ReactCommon" RNScreens: :path: "../../node_modules/react-native-screens" Yoga: - :path: "../node_modules/react-native/ReactCommon/yoga" + :path: "../../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: boost: 1dca942403ed9342f98334bf4c3621f011aa7946 @@ -1895,7 +1895,7 @@ SPEC CHECKSUMS: glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a hermes-engine: 1949ca944b195a8bde7cbf6316b9068e19cf53c6 NitroImage: ff97c5986ea4619abd3d6399b886eac84f5a4b65 - NitroModules: bbe10b61d6fefce0176ba06e6a34eea92efb7704 + NitroModules: 9d5bc0172f6d9b098eb29e8cd9891e16881cd4b6 RCT-Folly: bf5c0376ffe4dd2cf438dcf86db385df9fdce648 RCTDeprecation: 063fc281b30b7dc944c98fe53a7e266dab1a8706 RCTRequired: 8eda2a5a745f6081157a4f34baac40b65fe02b31 @@ -1952,7 +1952,7 @@ SPEC CHECKSUMS: React-runtimescheduler: 9f6b0b85154ed8a17a899cd1bab258a26c8db2cd React-timing: c9c7c0fe2fdfc433ef208889b6191dfb45457d68 React-utils: e6697b03f21c7ac57b075d848cda7882662cabf7 - ReactCodegen: ea6042d14b12c4c5b17889270956ec2d508e154a + ReactCodegen: 0370f6cd84878ee4686c27694f2b1fdb4d8b5ba7 ReactCommon: 832cdd669aeecd430d9ca1975d15676b38d0b263 RNScreens: 2fe13c8d610ef2d9d5ace2e7d85b716ec0f5217c SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 diff --git a/package.json b/package.json index 231531a8e..99b9bc91e 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,11 @@ ], "scripts": { "build": "bun run --cwd packages/react-native-nitro-modules build && bun run --cwd packages/nitrogen build && bun run --cwd packages/react-native-nitro-image build", + "bootstrap": "bun i && bun run build && cd example && bundle install && bun pods", "typecheck": "bun --filter=\"**\" typecheck", "lint": "bun nitro lint && bun nitrogen lint && bun image lint && bun example lint", "lint-cpp": "./scripts/clang-format.sh", - "clean": "rm -rf packages/**/tsconfig.tsbuildinfo packages/**/node_modules packages/**/lib", + "clean": "git clean -dfx", "release": "./scripts/release.sh", "docs": "bun --cwd docs", "nitro": "bun --cwd packages/react-native-nitro-modules", diff --git a/packages/react-native-nitro-modules/NitroModules.podspec b/packages/react-native-nitro-modules/NitroModules.podspec index 05093101b..74e9fa8f4 100644 --- a/packages/react-native-nitro-modules/NitroModules.podspec +++ b/packages/react-native-nitro-modules/NitroModules.podspec @@ -1,4 +1,5 @@ require "json" +require_relative './nitro_pod_utils' package = JSON.parse(File.read(File.join(__dir__, "package.json"))) @@ -53,6 +54,12 @@ Pod::Spec.new do |s| "ios/utils/SwiftClosure.hpp", ] + compiler_flags = "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES" + if has_react_native() + react_native_version = get_react_native_version() + compiler_flags += " HAS_REACT_NATIVE REACT_NATIVE_VERSION=#{react_native_version}" + end + s.pod_target_xcconfig = { # Use C++ 20 "CLANG_CXX_LANGUAGE_STANDARD" => "c++20", @@ -60,11 +67,17 @@ Pod::Spec.new do |s| "SWIFT_OBJC_INTEROP_MODE" => "objcxx", # Enables stricter modular headers "DEFINES_MODULE" => "YES", - # C++ compiler flags, mainly for folly. - "GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES" + # C++ compiler flags, mainly for RN version and folly. + "GCC_PREPROCESSOR_DEFINITIONS" => compiler_flags } - s.dependency 'React-jsi' - s.dependency 'React-callinvoker' - install_modules_dependencies(s) + if has_react_native() + # Using Nitro in react-native + s.dependency 'React-jsi' + s.dependency 'React-callinvoker' + install_modules_dependencies(s) + else + # Using Nitro somewhere else (NativeScript? Bare iOS?) + raise "Couldn't find react-native - are you trying to use Nitro outside of React Native?" + end end diff --git a/packages/react-native-nitro-modules/android/CMakeLists.txt b/packages/react-native-nitro-modules/android/CMakeLists.txt index 131567ccd..8a0226d31 100644 --- a/packages/react-native-nitro-modules/android/CMakeLists.txt +++ b/packages/react-native-nitro-modules/android/CMakeLists.txt @@ -18,6 +18,12 @@ add_library(NitroModules SHARED ${android_files} ) +# Add C++ flags +if (HAS_REACT_NATIVE) + message(STATUS "Building with React Native v${REACT_NATIVE_VERSION}...") + add_compile_definitions(HAS_REACT_NATIVE REACT_NATIVE_VERSION=${REACT_NATIVE_VERSION}) +endif () + # Specifies a path to native header files. include_directories( # Shared C++ includes diff --git a/packages/react-native-nitro-modules/android/build.gradle b/packages/react-native-nitro-modules/android/build.gradle index a2d821867..edba5e2de 100644 --- a/packages/react-native-nitro-modules/android/build.gradle +++ b/packages/react-native-nitro-modules/android/build.gradle @@ -1,3 +1,5 @@ +import groovy.json.JsonSlurper + buildscript { repositories { google() @@ -9,6 +11,28 @@ buildscript { } } +def getReactNativePackagePath() { + return file(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()) +} + +def hasReactNative() { + def path = getReactNativePackagePath() + return path.exists() +} + +def getReactNativeVersion() { + logger.info("[NitroModules] Finding react-native package...") + def reactNativePackage = getReactNativePackagePath() + if (!reactNativePackage.exists()) { + throw new GradleException("[NitroModules] Couldn't find react-native path!") + } + def json = new JsonSlurper().parse(reactNativePackage) + def version = json.version + def minorVersion = version.tokenize('.')[1].toInteger() + logger.info("[NitroModules] Found react-native ${json.version} (${minorVersion}) at ${reactNativePackage}!") + return minorVersion +} + def reactNativeArchitectures() { def value = rootProject.getProperties().get("reactNativeArchitectures") return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] @@ -49,7 +73,12 @@ android { externalNativeBuild { cmake { cppFlags "-frtti -fexceptions -Wall -Wextra -fstack-protector-all" - arguments "-DANDROID_STL=c++_shared" + if (hasReactNative()) { + def reactNativeVersion = getReactNativeVersion() + arguments "-DANDROID_STL=c++_shared", "-DHAS_REACT_NATIVE=YES", "-DREACT_NATIVE_VERSION=${reactNativeVersion}" + } else { + arguments "-DANDROID_STL=c++_shared" + } abiFilters (*reactNativeArchitectures()) buildTypes { @@ -154,7 +183,7 @@ if (isNewArchitectureEnabled()) { } } -task prepareHeaders(type: Copy) { +tasks.register('prepareHeaders', Copy) { from fileTree('./src/main/cpp').filter { it.isFile() } from fileTree('../cpp/').filter { it.isFile() } include "*.hpp" diff --git a/packages/react-native-nitro-modules/cpp/core/HybridObject.cpp b/packages/react-native-nitro-modules/cpp/core/HybridObject.cpp index dfef5c17b..ceaf85d29 100644 --- a/packages/react-native-nitro-modules/cpp/core/HybridObject.cpp +++ b/packages/react-native-nitro-modules/cpp/core/HybridObject.cpp @@ -9,7 +9,6 @@ namespace margelo::nitro { HybridObject::HybridObject(const char* name) : HybridObjectPrototype(), _name(name) {} -HybridObject::~HybridObject() {} std::string HybridObject::toString() { return "[HybridObject " + std::string(_name) + "]"; @@ -19,7 +18,7 @@ std::string HybridObject::getName() { return _name; } -bool HybridObject::equals(std::shared_ptr other) { +bool HybridObject::equals(const std::shared_ptr& other) { return this == other.get(); } diff --git a/packages/react-native-nitro-modules/cpp/core/HybridObject.hpp b/packages/react-native-nitro-modules/cpp/core/HybridObject.hpp index 349c30e9a..ac5eabc7f 100644 --- a/packages/react-native-nitro-modules/cpp/core/HybridObject.hpp +++ b/packages/react-native-nitro-modules/cpp/core/HybridObject.hpp @@ -34,7 +34,7 @@ class HybridObject : public virtual jsi::NativeState, public HybridObjectPrototy * Called when no more references to the given `HybridObject` exist in both C++ and JS. * JS might keep references for longer, as it is a garbage collected language. */ - virtual ~HybridObject(); + ~HybridObject() override = default; /** * HybridObjects cannot be copied. */ @@ -80,7 +80,7 @@ class HybridObject : public virtual jsi::NativeState, public HybridObjectPrototy * While two `jsi::Object`s of the same `HybridObject` might not be equal when compared with `==`, * they might still be the same `HybridObject` - in this case `equals(other)` will return true. */ - bool equals(std::shared_ptr other); + bool equals(const std::shared_ptr& other); /** * Get a string representation of this `HybridObject` - useful for logging or debugging. */ diff --git a/packages/react-native-nitro-modules/nitro_pod_utils.rb b/packages/react-native-nitro-modules/nitro_pod_utils.rb new file mode 100644 index 000000000..56b630783 --- /dev/null +++ b/packages/react-native-nitro-modules/nitro_pod_utils.rb @@ -0,0 +1,27 @@ +require "json" + +# Gets the path of the react-native/package.json file. +def get_react_native_package_path() + pod_root = Pod::Config.instance.installation_root.to_s + return `cd "#{pod_root}" && node --print "require.resolve('react-native/package.json')"`.strip! +end + +# Finds out whether react-native is available, or not. +# This works by checking if the react-native node package can be resolved. +def has_react_native() + react_native_package_path = get_react_native_package_path() + return File.exist?(react_native_package_path) +end + +# Gets the minor react-native version (e.g 76 for 0.76.4) +def get_react_native_version() + react_native_package_path = get_react_native_package_path() + if !File.exist?(react_native_package_path) + raise "[NitroModules] Couldn't find react-native path! File '#{react_native_package_path}' doesn't exist!" + end + react_native_package = JSON.parse(File.read(react_native_package_path)) + react_native_version = react_native_package['version'] + react_native_minor_version = react_native_version.split('.')[1].to_i + Pod::UI.puts "[NitroModules] Found react-native #{react_native_version} (#{react_native_minor_version}) in #{File.dirname(react_native_package_path)}!" + return react_native_minor_version +end diff --git a/packages/react-native-nitro-modules/package.json b/packages/react-native-nitro-modules/package.json index 072e27a3e..a90163c96 100644 --- a/packages/react-native-nitro-modules/package.json +++ b/packages/react-native-nitro-modules/package.json @@ -20,6 +20,7 @@ "cpp/", "app.plugin.js", "*.podspec", + "nitro_pod_utils.rb", "README.md" ], "keywords": [