Skip to content

Commit e204ff3

Browse files
feat(ios): Migrate executorch to prebuilt XCFramework (#629)
## Description ## Overview This PR refactors the iOS executorch integration from Swift Package Manager (SPM) to a prebuilt XCFramework approach, resolving dependency conflicts and simplifying the build process. ## Key Changes 1. XCFramework Integration - Added ExecutorchLib.xcframework with support for both iOS device (arm64) and simulator (arm64) - Created dedicated Xcode project for building the framework - Includes stub implementation of ETModel interface 2. Podspec Simplification - Removed system frameworks dependencies (CoreML, Accelerate, Metal, etc.) from podspec - Removed sqlite3 dependency - Removed force-load flags for executorch libraries from podspec - Added vendored XCFramework reference 3. Build Configuration - Updated ExecutorchLib project to reference binaries in ios/libs/executorch - Added build script for creating XCFramework 4. Package Management - Updated .gitignore to exclude build output - Updated package.json to include XCFramework in distribution - Removed SPM package references from ExecutorchLib project ## Benefits - Eliminates sqlite3 version conflicts - Cleaner dependency management - Better isolation of executorch dependencies ### Introduces a breaking change? - [x] Yes - [ ] No ### Type of change - [x] Bug fix (change which fixes an issue) - [ ] New feature (change which adds functionality) - [ ] Documentation update (improves or adds clarity to existing documentation) - [ ] Other (chores, tests, code style improvements etc.) ### Tested on - [x] iOS - [ ] Android ### Testing instructions <!-- Provide step-by-step instructions on how to test your changes. Include setup details if necessary. --> ### Screenshots <!-- Add screenshots here, if applicable --> ### Related issues <!-- Link related issues here using #issue-number --> ### Checklist - [x] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [x] My changes generate no new warnings ### Additional notes <!-- Include any additional information, assumptions, or context that reviewers might need to understand this PR. -->
1 parent f80168a commit e204ff3

File tree

14 files changed

+714
-72
lines changed

14 files changed

+714
-72
lines changed

apps/llm/ios/Podfile.lock

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,6 @@ PODS:
14271427
- ReactCodegen
14281428
- ReactCommon/turbomodule/bridging
14291429
- ReactCommon/turbomodule/core
1430-
- sqlite3
14311430
- Yoga
14321431
- react-native-safe-area-context (5.4.0):
14331432
- DoubleConversion
@@ -2151,9 +2150,6 @@ PODS:
21512150
- ReactCommon/turbomodule/core
21522151
- Yoga
21532152
- SocketRocket (0.7.1)
2154-
- sqlite3 (3.50.1):
2155-
- sqlite3/common (= 3.50.1)
2156-
- sqlite3/common (3.50.1)
21572153
- Yoga (0.0.0)
21582154

21592155
DEPENDENCIES:
@@ -2253,7 +2249,6 @@ SPEC REPOS:
22532249
trunk:
22542250
- opencv-rne
22552251
- SocketRocket
2256-
- sqlite3
22572252

22582253
EXTERNAL SOURCES:
22592254
boost:
@@ -2487,7 +2482,7 @@ SPEC CHECKSUMS:
24872482
React-logger: 8edfcedc100544791cd82692ca5a574240a16219
24882483
React-Mapbuffer: c3f4b608e4a59dd2f6a416ef4d47a14400194468
24892484
React-microtasksnativemodule: 054f34e9b82f02bd40f09cebd4083828b5b2beb6
2490-
react-native-executorch: 3c871f7ed2e2b0ff92519ce38f06f0904784dbdb
2485+
react-native-executorch: 2e91894f47ec0f8a31160a90b95ffed6e2414b00
24912486
react-native-safe-area-context: 562163222d999b79a51577eda2ea8ad2c32b4d06
24922487
React-NativeModulesApple: 2c4377e139522c3d73f5df582e4f051a838ff25e
24932488
React-oscompat: ef5df1c734f19b8003e149317d041b8ce1f7d29c
@@ -2520,14 +2515,13 @@ SPEC CHECKSUMS:
25202515
ReactAppDependencyProvider: 04d5eb15eb46be6720e17a4a7fa92940a776e584
25212516
ReactCodegen: 7ea266ccd94436294f516247db7402b57b1214af
25222517
ReactCommon: 76d2dc87136d0a667678668b86f0fca0c16fdeb0
2523-
RNAudioAPI: 3e398c4e9d44bb6b0c0b00e902057613224fc024
2518+
RNAudioAPI: c52fc76df51a60ee7324ac2e86b6fcc23a8c4d08
25242519
RNDeviceInfo: d863506092aef7e7af3a1c350c913d867d795047
25252520
RNGestureHandler: 7d0931a61d7ba0259f32db0ba7d0963c3ed15d2b
25262521
RNReanimated: afd6a269a47d6f13ba295c46c6c0e14e3cbd0d8a
25272522
RNScreens: 482e9707f9826230810c92e765751af53826d509
25282523
RNSVG: 794f269526df9ddc1f79b3d1a202b619df0368e3
25292524
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
2530-
sqlite3: 1d85290c3321153511f6e900ede7a1608718bbd5
25312525
Yoga: c758bfb934100bb4bf9cbaccb52557cee35e8bdf
25322526

25332527
PODFILE CHECKSUM: bba19a069e673f2259009e9d2caab44374fdebcf

apps/llm/ios/llm.xcodeproj/project.pbxproj

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
/* Begin PBXBuildFile section */
1010
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
11+
17A36B91F59AA249EC3CBA5B /* libPods-llm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B3B9A534BAF75106A33CD15 /* libPods-llm.a */; };
1112
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
12-
43F68E6573C0341F9AABF14F /* libPods-llm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F5CE0775ADE5923FA417B603 /* libPods-llm.a */; };
1313
5BF945B85D1D224F6EA71C77 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = B79E360E00239D910BF9B38D /* PrivacyInfo.xcprivacy */; };
1414
9A387428F0214E9D9C1DC3F5 /* Aeonik-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = F866B7979FB94C8797EE2E3D /* Aeonik-Regular.otf */; };
1515
A9775F3A313447B197B057ED /* Aeonik-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = E8C01EF33FCE4105BBBC9DF6 /* Aeonik-Medium.otf */; };
@@ -22,8 +22,9 @@
2222
13B07F961A680F5B00A75B9A /* llm.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = llm.app; sourceTree = BUILT_PRODUCTS_DIR; };
2323
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = llm/Images.xcassets; sourceTree = "<group>"; };
2424
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = llm/Info.plist; sourceTree = "<group>"; };
25-
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 = "<group>"; };
26-
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 = "<group>"; };
25+
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 = "<group>"; };
26+
5B3B9A534BAF75106A33CD15 /* libPods-llm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-llm.a"; sourceTree = BUILT_PRODUCTS_DIR; };
27+
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 = "<group>"; };
2728
8CD8BF58A368F789F1E7DF50 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-llm/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
2829
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = llm/SplashScreen.storyboard; sourceTree = "<group>"; };
2930
B79E360E00239D910BF9B38D /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = llm/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
@@ -32,7 +33,6 @@
3233
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
3334
F11748412D0307B40044C1D9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = llm/AppDelegate.swift; sourceTree = "<group>"; };
3435
F11748442D0722820044C1D9 /* llm-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "llm-Bridging-Header.h"; path = "llm/llm-Bridging-Header.h"; sourceTree = "<group>"; };
35-
F5CE0775ADE5923FA417B603 /* libPods-llm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-llm.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3636
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 = "<group>"; };
3737
/* End PBXFileReference section */
3838

@@ -41,7 +41,7 @@
4141
isa = PBXFrameworksBuildPhase;
4242
buildActionMask = 2147483647;
4343
files = (
44-
43F68E6573C0341F9AABF14F /* libPods-llm.a in Frameworks */,
44+
17A36B91F59AA249EC3CBA5B /* libPods-llm.a in Frameworks */,
4545
);
4646
runOnlyForDeploymentPostprocessing = 0;
4747
};
@@ -82,16 +82,16 @@
8282
isa = PBXGroup;
8383
children = (
8484
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
85-
F5CE0775ADE5923FA417B603 /* libPods-llm.a */,
85+
5B3B9A534BAF75106A33CD15 /* libPods-llm.a */,
8686
);
8787
name = Frameworks;
8888
sourceTree = "<group>";
8989
};
9090
3014A6CAF64EC97E4003A2A3 /* Pods */ = {
9191
isa = PBXGroup;
9292
children = (
93-
4F489A14802F01369BFDDEFD /* Pods-llm.debug.xcconfig */,
94-
63C842393C3838DA2ECEFC7C /* Pods-llm.release.xcconfig */,
93+
88496D8737DE09B515354EED /* Pods-llm.debug.xcconfig */,
94+
1C13F4C8CCA7B641EDCEA802 /* Pods-llm.release.xcconfig */,
9595
);
9696
path = Pods;
9797
sourceTree = "<group>";
@@ -152,14 +152,14 @@
152152
isa = PBXNativeTarget;
153153
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "llm" */;
154154
buildPhases = (
155-
08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */,
155+
D84A76355ECD908C8FB22A4F /* [CP] Check Pods Manifest.lock */,
156156
281D8603161F8B331E2BA335 /* [Expo] Configure project */,
157157
13B07F871A680F5B00A75B9A /* Sources */,
158158
13B07F8C1A680F5B00A75B9A /* Frameworks */,
159159
13B07F8E1A680F5B00A75B9A /* Resources */,
160160
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
161-
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */,
162-
62055444ECB4CA2743E68CDC /* [CP] Embed Pods Frameworks */,
161+
A2B57F542CA8F59AACC145C9 /* [CP] Embed Pods Frameworks */,
162+
DDB198386A53904071F2DCB8 /* [CP] Copy Pods Resources */,
163163
);
164164
buildRules = (
165165
);
@@ -233,28 +233,6 @@
233233
shellPath = /bin/sh;
234234
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";
235235
};
236-
08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */ = {
237-
isa = PBXShellScriptBuildPhase;
238-
buildActionMask = 2147483647;
239-
files = (
240-
);
241-
inputFileListPaths = (
242-
);
243-
inputPaths = (
244-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
245-
"${PODS_ROOT}/Manifest.lock",
246-
);
247-
name = "[CP] Check Pods Manifest.lock";
248-
outputFileListPaths = (
249-
);
250-
outputPaths = (
251-
"$(DERIVED_FILE_DIR)/Pods-llm-checkManifestLockResult.txt",
252-
);
253-
runOnlyForDeploymentPostprocessing = 0;
254-
shellPath = /bin/sh;
255-
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";
256-
showEnvVarsInLog = 0;
257-
};
258236
281D8603161F8B331E2BA335 /* [Expo] Configure project */ = {
259237
isa = PBXShellScriptBuildPhase;
260238
alwaysOutOfDate = 1;
@@ -274,7 +252,7 @@
274252
shellPath = /bin/sh;
275253
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";
276254
};
277-
62055444ECB4CA2743E68CDC /* [CP] Embed Pods Frameworks */ = {
255+
A2B57F542CA8F59AACC145C9 /* [CP] Embed Pods Frameworks */ = {
278256
isa = PBXShellScriptBuildPhase;
279257
buildActionMask = 2147483647;
280258
files = (
@@ -286,6 +264,7 @@
286264
"${PODS_XCFRAMEWORKS_BUILD_DIR}/RNAudioAPI/libavutil.framework/libavutil",
287265
"${PODS_XCFRAMEWORKS_BUILD_DIR}/RNAudioAPI/libswresample.framework/libswresample",
288266
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
267+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/react-native-executorch/ExecutorchLib.framework/ExecutorchLib",
289268
);
290269
name = "[CP] Embed Pods Frameworks";
291270
outputPaths = (
@@ -294,13 +273,36 @@
294273
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libavutil.framework",
295274
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libswresample.framework",
296275
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
276+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ExecutorchLib.framework",
297277
);
298278
runOnlyForDeploymentPostprocessing = 0;
299279
shellPath = /bin/sh;
300280
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-llm/Pods-llm-frameworks.sh\"\n";
301281
showEnvVarsInLog = 0;
302282
};
303-
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = {
283+
D84A76355ECD908C8FB22A4F /* [CP] Check Pods Manifest.lock */ = {
284+
isa = PBXShellScriptBuildPhase;
285+
buildActionMask = 2147483647;
286+
files = (
287+
);
288+
inputFileListPaths = (
289+
);
290+
inputPaths = (
291+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
292+
"${PODS_ROOT}/Manifest.lock",
293+
);
294+
name = "[CP] Check Pods Manifest.lock";
295+
outputFileListPaths = (
296+
);
297+
outputPaths = (
298+
"$(DERIVED_FILE_DIR)/Pods-llm-checkManifestLockResult.txt",
299+
);
300+
runOnlyForDeploymentPostprocessing = 0;
301+
shellPath = /bin/sh;
302+
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";
303+
showEnvVarsInLog = 0;
304+
};
305+
DDB198386A53904071F2DCB8 /* [CP] Copy Pods Resources */ = {
304306
isa = PBXShellScriptBuildPhase;
305307
buildActionMask = 2147483647;
306308
files = (
@@ -353,7 +355,7 @@
353355
/* Begin XCBuildConfiguration section */
354356
13B07F941A680F5B00A75B9A /* Debug */ = {
355357
isa = XCBuildConfiguration;
356-
baseConfigurationReference = 4F489A14802F01369BFDDEFD /* Pods-llm.debug.xcconfig */;
358+
baseConfigurationReference = 88496D8737DE09B515354EED /* Pods-llm.debug.xcconfig */;
357359
buildSettings = {
358360
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
359361
CLANG_ENABLE_MODULES = YES;
@@ -389,7 +391,7 @@
389391
};
390392
13B07F951A680F5B00A75B9A /* Release */ = {
391393
isa = XCBuildConfiguration;
392-
baseConfigurationReference = 63C842393C3838DA2ECEFC7C /* Pods-llm.release.xcconfig */;
394+
baseConfigurationReference = 1C13F4C8CCA7B641EDCEA802 /* Pods-llm.release.xcconfig */;
393395
buildSettings = {
394396
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
395397
CLANG_ENABLE_MODULES = YES;
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
*.tsbuildinfo
1+
*.tsbuildinfo
2+
3+
third-party/ios/ExecutorchLib/output

packages/react-native-executorch/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
"*.podspec",
1818
"third-party/include",
1919
"third-party",
20+
"!third-party/ios/ExecutorchLib",
21+
"!ios/libs/executorch",
2022
"!ios/build",
2123
"!android/build",
2224
"!android/gradle",

packages/react-native-executorch/react-native-executorch.podspec

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ Pod::Spec.new do |s|
1616
et_binaries_path = File.expand_path('$(PODS_TARGET_SRCROOT)/ios/libs/executorch', __dir__)
1717
tokenizers_binaries_path = File.expand_path('$(PODS_TARGET_SRCROOT)/ios/libs/tokenizers-cpp', __dir__)
1818

19-
s.frameworks = [
20-
'CoreML',
21-
'Accelerate',
22-
'Metal',
23-
'MetalPerformanceShaders',
24-
'MetalPerformanceShadersGraph'
25-
]
26-
2719
pthreadpool_binaries_path = File.expand_path('$(PODS_TARGET_SRCROOT)/ios/libs/pthreadpool', __dir__)
2820
cpuinfo_binaries_path = File.expand_path('$(PODS_TARGET_SRCROOT)/ios/libs/cpuinfo', __dir__)
2921

@@ -32,14 +24,6 @@ Pod::Spec.new do |s|
3224

3325
"OTHER_LDFLAGS[sdk=iphoneos*]" => [
3426
'$(inherited)',
35-
"-force_load \"#{et_binaries_path}\"/libbackend_coreml_ios.a",
36-
"-force_load \"#{et_binaries_path}\"/libbackend_mps_ios.a",
37-
"-force_load \"#{et_binaries_path}\"/libbackend_xnnpack_ios.a",
38-
"-force_load \"#{et_binaries_path}\"/libexecutorch_ios.a",
39-
"-force_load \"#{et_binaries_path}\"/libkernels_custom_ios.a",
40-
"-force_load \"#{et_binaries_path}\"/libkernels_optimized_ios.a",
41-
"-force_load \"#{et_binaries_path}\"/libkernels_quantized_ios.a",
42-
"-force_load \"#{et_binaries_path}\"/libthreadpool_ios.a",
4327
"\"#{tokenizers_binaries_path}/physical-arm64-release/libtokenizers_cpp.a\"",
4428
"\"#{tokenizers_binaries_path}/physical-arm64-release/libsentencepiece.a\"",
4529
"\"#{tokenizers_binaries_path}/physical-arm64-release/libtokenizers_c.a\"",
@@ -49,14 +33,6 @@ Pod::Spec.new do |s|
4933

5034
"OTHER_LDFLAGS[sdk=iphonesimulator*]" => [
5135
'$(inherited)',
52-
"-force_load \"#{et_binaries_path}\"/libbackend_coreml_simulator.a",
53-
"-force_load \"#{et_binaries_path}\"/libbackend_mps_simulator.a",
54-
"-force_load \"#{et_binaries_path}\"/libbackend_xnnpack_simulator.a",
55-
"-force_load \"#{et_binaries_path}\"/libexecutorch_simulator.a",
56-
"-force_load \"#{et_binaries_path}\"/libkernels_custom_simulator.a",
57-
"-force_load \"#{et_binaries_path}\"/libkernels_optimized_simulator.a",
58-
"-force_load \"#{et_binaries_path}\"/libkernels_quantized_simulator.a",
59-
"-force_load \"#{et_binaries_path}\"/libthreadpool_simulator.a",
6036
"\"#{tokenizers_binaries_path}/simulator-arm64-debug/libtokenizers_cpp.a\"",
6137
"\"#{tokenizers_binaries_path}/simulator-arm64-debug/libsentencepiece.a\"",
6238
"\"#{tokenizers_binaries_path}/simulator-arm64-debug/libtokenizers_c.a\"",
@@ -83,7 +59,7 @@ Pod::Spec.new do |s|
8359
]
8460

8561
s.libraries = "z"
86-
62+
s.ios.vendored_frameworks = "third-party/ios/ExecutorchLib.xcframework"
8763
# Exclude file with tests to not introduce gtest dependency.
8864
# Do not include the headers from common/rnexecutorch/jsi/ as source files.
8965
# Xcode/Cocoapods leaks them to other pods that an app also depends on, so if
@@ -100,7 +76,6 @@ Pod::Spec.new do |s|
10076
s.preserve_paths = "common/rnexecutorch/jsi/*.{h,hpp}"
10177

10278
s.dependency "opencv-rne", "~> 4.11.0"
103-
s.dependency "sqlite3"
10479

10580
install_modules_dependencies(s)
10681
end
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>BinaryPath</key>
9+
<string>ExecutorchLib.framework/ExecutorchLib</string>
10+
<key>LibraryIdentifier</key>
11+
<string>ios-arm64-simulator</string>
12+
<key>LibraryPath</key>
13+
<string>ExecutorchLib.framework</string>
14+
<key>SupportedArchitectures</key>
15+
<array>
16+
<string>arm64</string>
17+
</array>
18+
<key>SupportedPlatform</key>
19+
<string>ios</string>
20+
<key>SupportedPlatformVariant</key>
21+
<string>simulator</string>
22+
</dict>
23+
<dict>
24+
<key>BinaryPath</key>
25+
<string>ExecutorchLib.framework/ExecutorchLib</string>
26+
<key>LibraryIdentifier</key>
27+
<string>ios-arm64</string>
28+
<key>LibraryPath</key>
29+
<string>ExecutorchLib.framework</string>
30+
<key>SupportedArchitectures</key>
31+
<array>
32+
<string>arm64</string>
33+
</array>
34+
<key>SupportedPlatform</key>
35+
<string>ios</string>
36+
</dict>
37+
</array>
38+
<key>CFBundlePackageType</key>
39+
<string>XFWK</string>
40+
<key>XCFrameworkFormatVersion</key>
41+
<string>1.0</string>
42+
</dict>
43+
</plist>

0 commit comments

Comments
 (0)