diff --git a/apps/llm/ios/Podfile.lock b/apps/llm/ios/Podfile.lock index a4c23ac88..9b8775d95 100644 --- a/apps/llm/ios/Podfile.lock +++ b/apps/llm/ios/Podfile.lock @@ -1427,7 +1427,6 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - sqlite3 - Yoga - react-native-safe-area-context (5.4.0): - DoubleConversion @@ -2151,9 +2150,6 @@ PODS: - ReactCommon/turbomodule/core - Yoga - SocketRocket (0.7.1) - - sqlite3 (3.50.1): - - sqlite3/common (= 3.50.1) - - sqlite3/common (3.50.1) - Yoga (0.0.0) DEPENDENCIES: @@ -2253,7 +2249,6 @@ SPEC REPOS: trunk: - opencv-rne - SocketRocket - - sqlite3 EXTERNAL SOURCES: boost: @@ -2487,7 +2482,7 @@ SPEC CHECKSUMS: React-logger: 8edfcedc100544791cd82692ca5a574240a16219 React-Mapbuffer: c3f4b608e4a59dd2f6a416ef4d47a14400194468 React-microtasksnativemodule: 054f34e9b82f02bd40f09cebd4083828b5b2beb6 - react-native-executorch: 3c871f7ed2e2b0ff92519ce38f06f0904784dbdb + react-native-executorch: 2e91894f47ec0f8a31160a90b95ffed6e2414b00 react-native-safe-area-context: 562163222d999b79a51577eda2ea8ad2c32b4d06 React-NativeModulesApple: 2c4377e139522c3d73f5df582e4f051a838ff25e React-oscompat: ef5df1c734f19b8003e149317d041b8ce1f7d29c @@ -2520,14 +2515,13 @@ SPEC CHECKSUMS: ReactAppDependencyProvider: 04d5eb15eb46be6720e17a4a7fa92940a776e584 ReactCodegen: 7ea266ccd94436294f516247db7402b57b1214af ReactCommon: 76d2dc87136d0a667678668b86f0fca0c16fdeb0 - RNAudioAPI: 3e398c4e9d44bb6b0c0b00e902057613224fc024 + RNAudioAPI: c52fc76df51a60ee7324ac2e86b6fcc23a8c4d08 RNDeviceInfo: d863506092aef7e7af3a1c350c913d867d795047 RNGestureHandler: 7d0931a61d7ba0259f32db0ba7d0963c3ed15d2b RNReanimated: afd6a269a47d6f13ba295c46c6c0e14e3cbd0d8a RNScreens: 482e9707f9826230810c92e765751af53826d509 RNSVG: 794f269526df9ddc1f79b3d1a202b619df0368e3 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - sqlite3: 1d85290c3321153511f6e900ede7a1608718bbd5 Yoga: c758bfb934100bb4bf9cbaccb52557cee35e8bdf PODFILE CHECKSUM: bba19a069e673f2259009e9d2caab44374fdebcf diff --git a/apps/llm/ios/llm.xcodeproj/project.pbxproj b/apps/llm/ios/llm.xcodeproj/project.pbxproj index 3bb7013fc..c795023f4 100644 --- a/apps/llm/ios/llm.xcodeproj/project.pbxproj +++ b/apps/llm/ios/llm.xcodeproj/project.pbxproj @@ -8,8 +8,8 @@ /* Begin PBXBuildFile section */ 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 17A36B91F59AA249EC3CBA5B /* libPods-llm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B3B9A534BAF75106A33CD15 /* libPods-llm.a */; }; 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; }; - 43F68E6573C0341F9AABF14F /* libPods-llm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F5CE0775ADE5923FA417B603 /* libPods-llm.a */; }; 5BF945B85D1D224F6EA71C77 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = B79E360E00239D910BF9B38D /* PrivacyInfo.xcprivacy */; }; 9A387428F0214E9D9C1DC3F5 /* Aeonik-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = F866B7979FB94C8797EE2E3D /* Aeonik-Regular.otf */; }; A9775F3A313447B197B057ED /* Aeonik-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = E8C01EF33FCE4105BBBC9DF6 /* Aeonik-Medium.otf */; }; @@ -22,8 +22,9 @@ 13B07F961A680F5B00A75B9A /* llm.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = llm.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = llm/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = llm/Info.plist; sourceTree = ""; }; - 4F489A14802F01369BFDDEFD /* Pods-llm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-llm.debug.xcconfig"; path = "Target Support Files/Pods-llm/Pods-llm.debug.xcconfig"; sourceTree = ""; }; - 63C842393C3838DA2ECEFC7C /* Pods-llm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-llm.release.xcconfig"; path = "Target Support Files/Pods-llm/Pods-llm.release.xcconfig"; sourceTree = ""; }; + 1C13F4C8CCA7B641EDCEA802 /* Pods-llm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-llm.release.xcconfig"; path = "Target Support Files/Pods-llm/Pods-llm.release.xcconfig"; sourceTree = ""; }; + 5B3B9A534BAF75106A33CD15 /* libPods-llm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-llm.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 88496D8737DE09B515354EED /* Pods-llm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-llm.debug.xcconfig"; path = "Target Support Files/Pods-llm/Pods-llm.debug.xcconfig"; sourceTree = ""; }; 8CD8BF58A368F789F1E7DF50 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-llm/ExpoModulesProvider.swift"; sourceTree = ""; }; AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = llm/SplashScreen.storyboard; sourceTree = ""; }; B79E360E00239D910BF9B38D /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = llm/PrivacyInfo.xcprivacy; sourceTree = ""; }; @@ -32,7 +33,6 @@ ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; F11748412D0307B40044C1D9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = llm/AppDelegate.swift; sourceTree = ""; }; F11748442D0722820044C1D9 /* llm-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "llm-Bridging-Header.h"; path = "llm/llm-Bridging-Header.h"; sourceTree = ""; }; - F5CE0775ADE5923FA417B603 /* libPods-llm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-llm.a"; sourceTree = BUILT_PRODUCTS_DIR; }; F866B7979FB94C8797EE2E3D /* Aeonik-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Aeonik-Regular.otf"; path = "../assets/fonts/Aeonik-Regular.otf"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -41,7 +41,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 43F68E6573C0341F9AABF14F /* libPods-llm.a in Frameworks */, + 17A36B91F59AA249EC3CBA5B /* libPods-llm.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -82,7 +82,7 @@ isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - F5CE0775ADE5923FA417B603 /* libPods-llm.a */, + 5B3B9A534BAF75106A33CD15 /* libPods-llm.a */, ); name = Frameworks; sourceTree = ""; @@ -90,8 +90,8 @@ 3014A6CAF64EC97E4003A2A3 /* Pods */ = { isa = PBXGroup; children = ( - 4F489A14802F01369BFDDEFD /* Pods-llm.debug.xcconfig */, - 63C842393C3838DA2ECEFC7C /* Pods-llm.release.xcconfig */, + 88496D8737DE09B515354EED /* Pods-llm.debug.xcconfig */, + 1C13F4C8CCA7B641EDCEA802 /* Pods-llm.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -152,14 +152,14 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "llm" */; buildPhases = ( - 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */, + D84A76355ECD908C8FB22A4F /* [CP] Check Pods Manifest.lock */, 281D8603161F8B331E2BA335 /* [Expo] Configure project */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */, - 62055444ECB4CA2743E68CDC /* [CP] Embed Pods Frameworks */, + A2B57F542CA8F59AACC145C9 /* [CP] Embed Pods Frameworks */, + DDB198386A53904071F2DCB8 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -233,28 +233,6 @@ shellPath = /bin/sh; shellScript = "if [[ -f \"$PODS_ROOT/../.xcode.env\" ]]; then\n source \"$PODS_ROOT/../.xcode.env\"\nfi\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\n# The project root by default is one level up from the ios directory\nexport PROJECT_ROOT=\"$PROJECT_DIR\"/..\n\nif [[ \"$CONFIGURATION\" = *Debug* ]]; then\n export SKIP_BUNDLING=1\nfi\nif [[ -z \"$ENTRY_FILE\" ]]; then\n # Set the entry JS file using the bundler's entry resolution.\n export ENTRY_FILE=\"$(\"$NODE_BINARY\" -e \"require('expo/scripts/resolveAppEntry')\" \"$PROJECT_ROOT\" ios absolute | tail -n 1)\"\nfi\n\nif [[ -z \"$CLI_PATH\" ]]; then\n # Use Expo CLI\n export CLI_PATH=\"$(\"$NODE_BINARY\" --print \"require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })\")\"\nfi\nif [[ -z \"$BUNDLE_COMMAND\" ]]; then\n # Default Expo CLI command for bundling\n export BUNDLE_COMMAND=\"export:embed\"\nfi\n\n# Source .xcode.env.updates if it exists to allow\n# SKIP_BUNDLING to be unset if needed\nif [[ -f \"$PODS_ROOT/../.xcode.env.updates\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.updates\"\nfi\n# Source local changes to allow overrides\n# if needed\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\n`\"$NODE_BINARY\" --print \"require('path').dirname(require.resolve('react-native/package.json')) + '/scripts/react-native-xcode.sh'\"`\n\n"; }; - 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-llm-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; 281D8603161F8B331E2BA335 /* [Expo] Configure project */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -274,7 +252,7 @@ shellPath = /bin/sh; shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-llm/expo-configure-project.sh\"\n"; }; - 62055444ECB4CA2743E68CDC /* [CP] Embed Pods Frameworks */ = { + A2B57F542CA8F59AACC145C9 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -286,6 +264,7 @@ "${PODS_XCFRAMEWORKS_BUILD_DIR}/RNAudioAPI/libavutil.framework/libavutil", "${PODS_XCFRAMEWORKS_BUILD_DIR}/RNAudioAPI/libswresample.framework/libswresample", "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/react-native-executorch/ExecutorchLib.framework/ExecutorchLib", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( @@ -294,13 +273,36 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libavutil.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libswresample.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ExecutorchLib.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-llm/Pods-llm-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = { + D84A76355ECD908C8FB22A4F /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-llm-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + DDB198386A53904071F2DCB8 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -353,7 +355,7 @@ /* Begin XCBuildConfiguration section */ 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4F489A14802F01369BFDDEFD /* Pods-llm.debug.xcconfig */; + baseConfigurationReference = 88496D8737DE09B515354EED /* Pods-llm.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -389,7 +391,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 63C842393C3838DA2ECEFC7C /* Pods-llm.release.xcconfig */; + baseConfigurationReference = 1C13F4C8CCA7B641EDCEA802 /* Pods-llm.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; diff --git a/packages/react-native-executorch/.gitignore b/packages/react-native-executorch/.gitignore index 1a82a7132..696276e65 100644 --- a/packages/react-native-executorch/.gitignore +++ b/packages/react-native-executorch/.gitignore @@ -1 +1,3 @@ -*.tsbuildinfo \ No newline at end of file +*.tsbuildinfo + +third-party/ios/ExecutorchLib/output \ No newline at end of file diff --git a/packages/react-native-executorch/package.json b/packages/react-native-executorch/package.json index fc83fd0df..83f2547ed 100644 --- a/packages/react-native-executorch/package.json +++ b/packages/react-native-executorch/package.json @@ -17,6 +17,8 @@ "*.podspec", "third-party/include", "third-party", + "!third-party/ios/ExecutorchLib", + "!ios/libs/executorch", "!ios/build", "!android/build", "!android/gradle", diff --git a/packages/react-native-executorch/react-native-executorch.podspec b/packages/react-native-executorch/react-native-executorch.podspec index 2c63c0923..0c5c1de1c 100644 --- a/packages/react-native-executorch/react-native-executorch.podspec +++ b/packages/react-native-executorch/react-native-executorch.podspec @@ -16,14 +16,6 @@ Pod::Spec.new do |s| et_binaries_path = File.expand_path('$(PODS_TARGET_SRCROOT)/ios/libs/executorch', __dir__) tokenizers_binaries_path = File.expand_path('$(PODS_TARGET_SRCROOT)/ios/libs/tokenizers-cpp', __dir__) - s.frameworks = [ - 'CoreML', - 'Accelerate', - 'Metal', - 'MetalPerformanceShaders', - 'MetalPerformanceShadersGraph' - ] - pthreadpool_binaries_path = File.expand_path('$(PODS_TARGET_SRCROOT)/ios/libs/pthreadpool', __dir__) cpuinfo_binaries_path = File.expand_path('$(PODS_TARGET_SRCROOT)/ios/libs/cpuinfo', __dir__) @@ -32,14 +24,6 @@ Pod::Spec.new do |s| "OTHER_LDFLAGS[sdk=iphoneos*]" => [ '$(inherited)', - "-force_load \"#{et_binaries_path}\"/libbackend_coreml_ios.a", - "-force_load \"#{et_binaries_path}\"/libbackend_mps_ios.a", - "-force_load \"#{et_binaries_path}\"/libbackend_xnnpack_ios.a", - "-force_load \"#{et_binaries_path}\"/libexecutorch_ios.a", - "-force_load \"#{et_binaries_path}\"/libkernels_custom_ios.a", - "-force_load \"#{et_binaries_path}\"/libkernels_optimized_ios.a", - "-force_load \"#{et_binaries_path}\"/libkernels_quantized_ios.a", - "-force_load \"#{et_binaries_path}\"/libthreadpool_ios.a", "\"#{tokenizers_binaries_path}/physical-arm64-release/libtokenizers_cpp.a\"", "\"#{tokenizers_binaries_path}/physical-arm64-release/libsentencepiece.a\"", "\"#{tokenizers_binaries_path}/physical-arm64-release/libtokenizers_c.a\"", @@ -49,14 +33,6 @@ Pod::Spec.new do |s| "OTHER_LDFLAGS[sdk=iphonesimulator*]" => [ '$(inherited)', - "-force_load \"#{et_binaries_path}\"/libbackend_coreml_simulator.a", - "-force_load \"#{et_binaries_path}\"/libbackend_mps_simulator.a", - "-force_load \"#{et_binaries_path}\"/libbackend_xnnpack_simulator.a", - "-force_load \"#{et_binaries_path}\"/libexecutorch_simulator.a", - "-force_load \"#{et_binaries_path}\"/libkernels_custom_simulator.a", - "-force_load \"#{et_binaries_path}\"/libkernels_optimized_simulator.a", - "-force_load \"#{et_binaries_path}\"/libkernels_quantized_simulator.a", - "-force_load \"#{et_binaries_path}\"/libthreadpool_simulator.a", "\"#{tokenizers_binaries_path}/simulator-arm64-debug/libtokenizers_cpp.a\"", "\"#{tokenizers_binaries_path}/simulator-arm64-debug/libsentencepiece.a\"", "\"#{tokenizers_binaries_path}/simulator-arm64-debug/libtokenizers_c.a\"", @@ -83,7 +59,7 @@ Pod::Spec.new do |s| ] s.libraries = "z" - + s.ios.vendored_frameworks = "third-party/ios/ExecutorchLib.xcframework" # Exclude file with tests to not introduce gtest dependency. # Do not include the headers from common/rnexecutorch/jsi/ as source files. # Xcode/Cocoapods leaks them to other pods that an app also depends on, so if @@ -100,7 +76,6 @@ Pod::Spec.new do |s| s.preserve_paths = "common/rnexecutorch/jsi/*.{h,hpp}" s.dependency "opencv-rne", "~> 4.11.0" - s.dependency "sqlite3" install_modules_dependencies(s) end diff --git a/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/Info.plist b/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/Info.plist new file mode 100644 index 000000000..aaba93b39 --- /dev/null +++ b/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/Info.plist @@ -0,0 +1,43 @@ + + + + + AvailableLibraries + + + BinaryPath + ExecutorchLib.framework/ExecutorchLib + LibraryIdentifier + ios-arm64-simulator + LibraryPath + ExecutorchLib.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + BinaryPath + ExecutorchLib.framework/ExecutorchLib + LibraryIdentifier + ios-arm64 + LibraryPath + ExecutorchLib.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib b/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib new file mode 100755 index 000000000..e03be3998 Binary files /dev/null and b/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib differ diff --git a/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist b/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist new file mode 100644 index 000000000..e15a0c748 Binary files /dev/null and b/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist differ diff --git a/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/ExecutorchLib b/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/ExecutorchLib new file mode 100755 index 000000000..457a06d3b Binary files /dev/null and b/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/ExecutorchLib differ diff --git a/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Info.plist b/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Info.plist new file mode 100644 index 000000000..c32ed590c Binary files /dev/null and b/packages/react-native-executorch/third-party/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Info.plist differ diff --git a/packages/react-native-executorch/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.pbxproj b/packages/react-native-executorch/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.pbxproj new file mode 100644 index 000000000..82622f559 --- /dev/null +++ b/packages/react-native-executorch/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.pbxproj @@ -0,0 +1,487 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 0E4A7F472D67549100D8DCBA /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E4A7F442D67549100D8DCBA /* Metal.framework */; }; + 0E4A7F482D67549100D8DCBA /* MetalPerformanceShaders.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E4A7F452D67549100D8DCBA /* MetalPerformanceShaders.framework */; }; + 0E4A7F492D67549100D8DCBA /* MetalPerformanceShadersGraph.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E4A7F462D67549100D8DCBA /* MetalPerformanceShadersGraph.framework */; }; + 5576B4B92CEF970E005027B7 /* ETModel.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5576B4B82CEF970C005027B7 /* ETModel.mm */; }; + 55EA2C572CB90E7D004315B3 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EA2C562CB90E7D004315B3 /* Accelerate.framework */; }; + 55EA2C592CB90E80004315B3 /* CoreML.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EA2C582CB90E80004315B3 /* CoreML.framework */; }; + 55EA2C5B2CB90E85004315B3 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EA2C5A2CB90E85004315B3 /* libsqlite3.tbd */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0E4A7F442D67549100D8DCBA /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; }; + 0E4A7F452D67549100D8DCBA /* MetalPerformanceShaders.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalPerformanceShaders.framework; path = System/Library/Frameworks/MetalPerformanceShaders.framework; sourceTree = SDKROOT; }; + 0E4A7F462D67549100D8DCBA /* MetalPerformanceShadersGraph.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalPerformanceShadersGraph.framework; path = System/Library/Frameworks/MetalPerformanceShadersGraph.framework; sourceTree = SDKROOT; }; + 5576B4B62CEF9705005027B7 /* ETModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ETModel.h; sourceTree = ""; }; + 5576B4B82CEF970C005027B7 /* ETModel.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ETModel.mm; sourceTree = ""; }; + 55EA2C1C2CB90C22004315B3 /* ExecutorchLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ExecutorchLib.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 55EA2C562CB90E7D004315B3 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + 55EA2C582CB90E80004315B3 /* CoreML.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreML.framework; path = System/Library/Frameworks/CoreML.framework; sourceTree = SDKROOT; }; + 55EA2C5A2CB90E85004315B3 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 55EA2C192CB90C22004315B3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0E4A7F472D67549100D8DCBA /* Metal.framework in Frameworks */, + 0E4A7F482D67549100D8DCBA /* MetalPerformanceShaders.framework in Frameworks */, + 0E4A7F492D67549100D8DCBA /* MetalPerformanceShadersGraph.framework in Frameworks */, + 55EA2C5B2CB90E85004315B3 /* libsqlite3.tbd in Frameworks */, + 55EA2C592CB90E80004315B3 /* CoreML.framework in Frameworks */, + 55EA2C572CB90E7D004315B3 /* Accelerate.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 55EA2C122CB90C22004315B3 = { + isa = PBXGroup; + children = ( + 55EA2C1E2CB90C22004315B3 /* ExecutorchLib */, + 55EA2C1D2CB90C22004315B3 /* Products */, + 55EA2C552CB90E7D004315B3 /* Frameworks */, + ); + sourceTree = ""; + }; + 55EA2C1D2CB90C22004315B3 /* Products */ = { + isa = PBXGroup; + children = ( + 55EA2C1C2CB90C22004315B3 /* ExecutorchLib.framework */, + ); + name = Products; + sourceTree = ""; + }; + 55EA2C1E2CB90C22004315B3 /* ExecutorchLib */ = { + isa = PBXGroup; + children = ( + 55EA2C352CB90C7A004315B3 /* Exported */, + ); + path = ExecutorchLib; + sourceTree = ""; + }; + 55EA2C352CB90C7A004315B3 /* Exported */ = { + isa = PBXGroup; + children = ( + 5576B4B82CEF970C005027B7 /* ETModel.mm */, + 5576B4B62CEF9705005027B7 /* ETModel.h */, + ); + path = Exported; + sourceTree = ""; + }; + 55EA2C552CB90E7D004315B3 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 0E4A7F442D67549100D8DCBA /* Metal.framework */, + 0E4A7F452D67549100D8DCBA /* MetalPerformanceShaders.framework */, + 0E4A7F462D67549100D8DCBA /* MetalPerformanceShadersGraph.framework */, + 55EA2C5A2CB90E85004315B3 /* libsqlite3.tbd */, + 55EA2C582CB90E80004315B3 /* CoreML.framework */, + 55EA2C562CB90E7D004315B3 /* Accelerate.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 55EA2C1B2CB90C22004315B3 /* ExecutorchLib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 55EA2C232CB90C22004315B3 /* Build configuration list for PBXNativeTarget "ExecutorchLib" */; + buildPhases = ( + 55EA2C182CB90C22004315B3 /* Sources */, + 55EA2C192CB90C22004315B3 /* Frameworks */, + 55EA2C1A2CB90C22004315B3 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ExecutorchLib; + packageProductDependencies = ( + ); + productName = ExecutorchLib; + productReference = 55EA2C1C2CB90C22004315B3 /* ExecutorchLib.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 55EA2C132CB90C22004315B3 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 1540; + TargetAttributes = { + 55EA2C1B2CB90C22004315B3 = { + CreatedOnToolsVersion = 15.4; + }; + }; + }; + buildConfigurationList = 55EA2C162CB90C22004315B3 /* Build configuration list for PBXProject "ExecutorchLib" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 55EA2C122CB90C22004315B3; + packageReferences = ( + ); + productRefGroup = 55EA2C1D2CB90C22004315B3 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 55EA2C1B2CB90C22004315B3 /* ExecutorchLib */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 55EA2C1A2CB90C22004315B3 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 55EA2C182CB90C22004315B3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5576B4B92CEF970E005027B7 /* ETModel.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 55EA2C212CB90C22004315B3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 55EA2C222CB90C22004315B3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 55EA2C242CB90C22004315B3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALLOW_TARGET_PLATFORM_SPECIALIZATION = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = NO; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = B357MU264T; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + EXCLUDED_ARCHS = x86_64; + GENERATE_INFOPLIST_FILE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(TEMP_DIR)/cmake/include", + ); + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(TEMP_DIR)/cmake/lib", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + "OTHER_LDFLAGS[sdk=iphoneos*]" = ( + "$(inherited)", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libkernels_optimized_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libkernels_custom_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libkernels_quantized_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libbackend_xnnpack_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libbackend_coreml_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libbackend_mps_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libexecutorch_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libthreadpool_ios.a", + ); + "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( + "$(inherited)", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libkernels_optimized_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libkernels_custom_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libkernels_quantized_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libbackend_xnnpack_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libbackend_coreml_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libbackend_mps_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libexecutorch_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libthreadpool_simulator.a", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.swmansion.Executorch; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 55EA2C252CB90C22004315B3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALLOW_TARGET_PLATFORM_SPECIALIZATION = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = NO; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = B357MU264T; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + EXCLUDED_ARCHS = x86_64; + GENERATE_INFOPLIST_FILE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(TEMP_DIR)/cmake/include", + ); + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(TEMP_DIR)/cmake/lib", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + "OTHER_LDFLAGS[sdk=iphoneos*]" = ( + "$(inherited)", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libkernels_optimized_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libkernels_custom_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libkernels_quantized_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libbackend_xnnpack_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libbackend_coreml_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libbackend_mps_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libexecutorch_ios.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libthreadpool_ios.a", + ); + "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( + "$(inherited)", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libkernels_optimized_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libkernels_custom_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libkernels_quantized_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libbackend_xnnpack_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libbackend_coreml_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libbackend_mps_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libexecutorch_simulator.a", + "-force_load", + "$(PROJECT_DIR)/../../../ios/libs/executorch/libthreadpool_simulator.a", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.swmansion.Executorch; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 55EA2C162CB90C22004315B3 /* Build configuration list for PBXProject "ExecutorchLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 55EA2C212CB90C22004315B3 /* Debug */, + 55EA2C222CB90C22004315B3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 55EA2C232CB90C22004315B3 /* Build configuration list for PBXNativeTarget "ExecutorchLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 55EA2C242CB90C22004315B3 /* Debug */, + 55EA2C252CB90C22004315B3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 55EA2C132CB90C22004315B3 /* Project object */; +} diff --git a/packages/react-native-executorch/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.h b/packages/react-native-executorch/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.h new file mode 100644 index 000000000..79b547ad3 --- /dev/null +++ b/packages/react-native-executorch/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.h @@ -0,0 +1,27 @@ +#ifndef ETModel_hpp +#define ETModel_hpp + +#import + +@interface ETModel : NSObject + +- (NSNumber *)loadModel:(NSString *)filePath; +- (NSNumber *)loadMethod:(NSString *)methodName; +- (NSNumber *)loadForward; +- (NSArray *)execute:(NSString *)methodName + inputs:(NSArray *)inputs + shapes:(NSArray *)shapes + inputTypes:(NSArray *)inputTypes; +- (NSArray *)forward:(NSArray *)inputs + shapes:(NSArray *)shapes + inputTypes:(NSArray *)inputTypes; +- (NSNumber *)getNumberOfInputs; +- (NSNumber *)getInputType:(NSNumber *)index; +- (NSArray *)getInputShape:(NSNumber *)index; +- (NSNumber *)getNumberOfOutputs; +- (NSNumber *)getOutputType:(NSNumber *)index; +- (NSArray *)getOutputShape:(NSNumber *)index; + +@end + +#endif // ETModel_hpp diff --git a/packages/react-native-executorch/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.mm b/packages/react-native-executorch/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.mm new file mode 100644 index 000000000..905bb8b7c --- /dev/null +++ b/packages/react-native-executorch/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.mm @@ -0,0 +1,54 @@ +#import "ETModel.h" + +@implementation ETModel + +- (NSNumber *)loadModel:(NSString *)filePath { + return @(0); +} + +- (NSNumber *)loadMethod:(NSString *)methodName { + return @(0); +} + +- (NSNumber *)loadForward { + return @(0); +} + +- (NSNumber *)getNumberOfInputs { + return @(0); +} + +- (NSNumber *)getInputType:(NSNumber *)index { + return @(0); +} + +- (NSArray *)getInputShape:(NSNumber *)index { + return @[]; +} + +- (NSNumber *)getNumberOfOutputs { + return @(0); +} + +- (NSNumber *)getOutputType:(NSNumber *)index { + return @(0); +} + +- (NSArray *)getOutputShape:(NSNumber *)index { + return @[]; +} + +- (NSArray *)execute:(NSString *)methodName + inputs:(NSArray *)inputs + shapes:(NSArray *)shapes + inputTypes:(NSArray *)inputTypes { + return @[]; +} + +- (NSArray *)forward:(NSArray *)inputs + shapes:(NSArray *)shapes + inputTypes:(NSArray *)inputTypes { + return @[]; +} + +@end diff --git a/packages/react-native-executorch/third-party/ios/ExecutorchLib/build.sh b/packages/react-native-executorch/third-party/ios/ExecutorchLib/build.sh new file mode 100755 index 000000000..0a410e237 --- /dev/null +++ b/packages/react-native-executorch/third-party/ios/ExecutorchLib/build.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +# Builds ExecutorchLib.xcframework for iOS and iOS Simulator +# +# This script: +# 1. Cleans previous builds +# 2. Archives the framework for iOS device (arm64) +# 3. Archives the framework for iOS Simulator (arm64) +# 4. Combines both archives into a single .xcframework +# +# Output: ./output/ExecutorchLib.xcframework +# +# Usage: ./build.sh + +# --- Configuration --- +PROJECT_NAME="ExecutorchLib" # Replace with your Xcode project name +SCHEME_NAME="ExecutorchLib" # Replace with your scheme name +OUTPUT_FOLDER="output" # Choose your desired output folder + +# --- Derived Variables --- +BUILD_FOLDER="build" +ARCHIVE_PATH_IOS="$BUILD_FOLDER/$SCHEME_NAME-iOS" +ARCHIVE_PATH_SIMULATOR="$BUILD_FOLDER/$SCHEME_NAME-iOS_Simulator" +FRAMEWORK_NAME="$SCHEME_NAME.framework" +XCFRAMEWORK_NAME="$SCHEME_NAME.xcframework" +XCFRAMEWORK_PATH="$OUTPUT_FOLDER/$XCFRAMEWORK_NAME" + +# --- Script --- +rm -rf "$BUILD_FOLDER" "$OUTPUT_FOLDER" + +xcodebuild clean -project "$PROJECT_NAME.xcodeproj" -scheme "$SCHEME_NAME" + +xcodebuild archive \ + -project "$PROJECT_NAME.xcodeproj" \ + -scheme "$SCHEME_NAME" \ + -configuration Release \ + -destination "generic/platform=iOS" \ + -archivePath "$ARCHIVE_PATH_IOS" \ + SKIP_INSTALL=NO \ + BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ + CODE_SIGNING_ALLOWED=NO + +xcodebuild archive \ + -project "$PROJECT_NAME.xcodeproj" \ + -scheme "$SCHEME_NAME" \ + -configuration Release \ + -destination "generic/platform=iOS Simulator" \ + -archivePath "$ARCHIVE_PATH_SIMULATOR" \ + SKIP_INSTALL=NO \ + BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ + CODE_SIGNING_ALLOWED=NO + +xcodebuild -create-xcframework \ + -framework "$ARCHIVE_PATH_IOS.xcarchive/Products/Library/Frameworks/$FRAMEWORK_NAME" \ + -framework "$ARCHIVE_PATH_SIMULATOR.xcarchive/Products/Library/Frameworks/$FRAMEWORK_NAME" \ + -output "$XCFRAMEWORK_PATH"