Skip to content

Commit 2add0c2

Browse files
feat(ios): Migrate executorch to prebuilt XCFramework (#629)
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. 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 - Eliminates sqlite3 version conflicts - Cleaner dependency management - Better isolation of executorch dependencies - [x] Yes - [ ] No - [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.) - [x] iOS - [ ] Android <!-- Provide step-by-step instructions on how to test your changes. Include setup details if necessary. --> <!-- Add screenshots here, if applicable --> <!-- Link related issues here using #issue-number --> - [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 <!-- Include any additional information, assumptions, or context that reviewers might need to understand this PR. -->
1 parent ec435ed commit 2add0c2

File tree

14 files changed

+744
-82
lines changed

14 files changed

+744
-82
lines changed

apps/llm/ios/Podfile.lock

Lines changed: 8 additions & 4 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,12 @@ PODS:
21512150
- ReactCommon/turbomodule/core
21522151
- Yoga
21532152
- SocketRocket (0.7.1)
2153+
<<<<<<< HEAD
21542154
- sqlite3 (3.50.3):
21552155
- sqlite3/common (= 3.50.3)
21562156
- sqlite3/common (3.50.3)
2157+
=======
2158+
>>>>>>> e204ff30 (feat(ios): Migrate executorch to prebuilt XCFramework (#629))
21572159
- Yoga (0.0.0)
21582160

21592161
DEPENDENCIES:
@@ -2253,7 +2255,6 @@ SPEC REPOS:
22532255
trunk:
22542256
- opencv-rne
22552257
- SocketRocket
2256-
- sqlite3
22572258

22582259
EXTERNAL SOURCES:
22592260
boost:
@@ -2487,7 +2488,11 @@ SPEC CHECKSUMS:
24872488
React-logger: 8edfcedc100544791cd82692ca5a574240a16219
24882489
React-Mapbuffer: c3f4b608e4a59dd2f6a416ef4d47a14400194468
24892490
React-microtasksnativemodule: 054f34e9b82f02bd40f09cebd4083828b5b2beb6
2491+
<<<<<<< HEAD
24902492
react-native-executorch: 170728e566bd9fc4f9bc7a2f73a3c6b31fdd69ad
2493+
=======
2494+
react-native-executorch: 2e91894f47ec0f8a31160a90b95ffed6e2414b00
2495+
>>>>>>> e204ff30 (feat(ios): Migrate executorch to prebuilt XCFramework (#629))
24912496
react-native-safe-area-context: 562163222d999b79a51577eda2ea8ad2c32b4d06
24922497
React-NativeModulesApple: 2c4377e139522c3d73f5df582e4f051a838ff25e
24932498
React-oscompat: ef5df1c734f19b8003e149317d041b8ce1f7d29c
@@ -2520,14 +2525,13 @@ SPEC CHECKSUMS:
25202525
ReactAppDependencyProvider: 04d5eb15eb46be6720e17a4a7fa92940a776e584
25212526
ReactCodegen: 7ea266ccd94436294f516247db7402b57b1214af
25222527
ReactCommon: 76d2dc87136d0a667678668b86f0fca0c16fdeb0
2523-
RNAudioAPI: 3e398c4e9d44bb6b0c0b00e902057613224fc024
2528+
RNAudioAPI: c52fc76df51a60ee7324ac2e86b6fcc23a8c4d08
25242529
RNDeviceInfo: d863506092aef7e7af3a1c350c913d867d795047
25252530
RNGestureHandler: 7d0931a61d7ba0259f32db0ba7d0963c3ed15d2b
25262531
RNReanimated: afd6a269a47d6f13ba295c46c6c0e14e3cbd0d8a
25272532
RNScreens: 482e9707f9826230810c92e765751af53826d509
25282533
RNSVG: 794f269526df9ddc1f79b3d1a202b619df0368e3
25292534
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
2530-
sqlite3: 1d85290c3321153511f6e900ede7a1608718bbd5
25312535
Yoga: c758bfb934100bb4bf9cbaccb52557cee35e8bdf
25322536

25332537
PODFILE CHECKSUM: bba19a069e673f2259009e9d2caab44374fdebcf

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

Lines changed: 61 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
0064517258769CC2AD16763F /* libPods-llm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FCA4A9AE0011869427989B32 /* libPods-llm.a */; };
1111
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
12+
17A36B91F59AA249EC3CBA5B /* libPods-llm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B3B9A534BAF75106A33CD15 /* libPods-llm.a */; };
1213
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
1314
5BF945B85D1D224F6EA71C77 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = B79E360E00239D910BF9B38D /* PrivacyInfo.xcprivacy */; };
1415
9A387428F0214E9D9C1DC3F5 /* Aeonik-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = F866B7979FB94C8797EE2E3D /* Aeonik-Regular.otf */; };
@@ -22,7 +23,13 @@
2223
13B07F961A680F5B00A75B9A /* llm.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = llm.app; sourceTree = BUILT_PRODUCTS_DIR; };
2324
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = llm/Images.xcassets; sourceTree = "<group>"; };
2425
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = llm/Info.plist; sourceTree = "<group>"; };
26+
<<<<<<< HEAD
2527
56D7DF5DF56EAD2FAE3ADDBF /* 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>"; };
28+
=======
29+
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>"; };
30+
5B3B9A534BAF75106A33CD15 /* libPods-llm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-llm.a"; sourceTree = BUILT_PRODUCTS_DIR; };
31+
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>"; };
32+
>>>>>>> e204ff30 (feat(ios): Migrate executorch to prebuilt XCFramework (#629))
2633
8CD8BF58A368F789F1E7DF50 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-llm/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
2734
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = llm/SplashScreen.storyboard; sourceTree = "<group>"; };
2835
B79E360E00239D910BF9B38D /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = llm/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
@@ -31,7 +38,6 @@
3138
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
3239
F11748412D0307B40044C1D9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = llm/AppDelegate.swift; sourceTree = "<group>"; };
3340
F11748442D0722820044C1D9 /* llm-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "llm-Bridging-Header.h"; path = "llm/llm-Bridging-Header.h"; sourceTree = "<group>"; };
34-
F5CE0775ADE5923FA417B603 /* libPods-llm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-llm.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3541
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>"; };
3642
/* End PBXFileReference section */
3743

@@ -40,7 +46,11 @@
4046
isa = PBXFrameworksBuildPhase;
4147
buildActionMask = 2147483647;
4248
files = (
49+
<<<<<<< HEAD
4350
0064517258769CC2AD16763F /* libPods-llm.a in Frameworks */,
51+
=======
52+
17A36B91F59AA249EC3CBA5B /* libPods-llm.a in Frameworks */,
53+
>>>>>>> e204ff30 (feat(ios): Migrate executorch to prebuilt XCFramework (#629))
4454
);
4555
runOnlyForDeploymentPostprocessing = 0;
4656
};
@@ -90,16 +100,20 @@
90100
isa = PBXGroup;
91101
children = (
92102
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
103+
<<<<<<< HEAD
93104
FCA4A9AE0011869427989B32 /* libPods-llm.a */,
105+
=======
106+
5B3B9A534BAF75106A33CD15 /* libPods-llm.a */,
107+
>>>>>>> e204ff30 (feat(ios): Migrate executorch to prebuilt XCFramework (#629))
94108
);
95109
name = Frameworks;
96110
sourceTree = "<group>";
97111
};
98112
3014A6CAF64EC97E4003A2A3 /* Pods */ = {
99113
isa = PBXGroup;
100114
children = (
101-
4F489A14802F01369BFDDEFD /* Pods-llm.debug.xcconfig */,
102-
63C842393C3838DA2ECEFC7C /* Pods-llm.release.xcconfig */,
115+
88496D8737DE09B515354EED /* Pods-llm.debug.xcconfig */,
116+
1C13F4C8CCA7B641EDCEA802 /* Pods-llm.release.xcconfig */,
103117
);
104118
path = Pods;
105119
sourceTree = "<group>";
@@ -160,14 +174,23 @@
160174
isa = PBXNativeTarget;
161175
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "llm" */;
162176
buildPhases = (
177+
<<<<<<< HEAD
163178
DE51561DFA0B7F5BB664350B /* [CP] Check Pods Manifest.lock */,
179+
=======
180+
D84A76355ECD908C8FB22A4F /* [CP] Check Pods Manifest.lock */,
181+
>>>>>>> e204ff30 (feat(ios): Migrate executorch to prebuilt XCFramework (#629))
164182
281D8603161F8B331E2BA335 /* [Expo] Configure project */,
165183
13B07F871A680F5B00A75B9A /* Sources */,
166184
13B07F8C1A680F5B00A75B9A /* Frameworks */,
167185
13B07F8E1A680F5B00A75B9A /* Resources */,
168186
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
187+
<<<<<<< HEAD
169188
96ABF7A87CEE57D5C4479DBC /* [CP] Embed Pods Frameworks */,
170189
E0CDBD4D0993974173A0E9FD /* [CP] Copy Pods Resources */,
190+
=======
191+
A2B57F542CA8F59AACC145C9 /* [CP] Embed Pods Frameworks */,
192+
DDB198386A53904071F2DCB8 /* [CP] Copy Pods Resources */,
193+
>>>>>>> e204ff30 (feat(ios): Migrate executorch to prebuilt XCFramework (#629))
171194
);
172195
buildRules = (
173196
);
@@ -260,25 +283,51 @@
260283
shellPath = /bin/sh;
261284
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";
262285
};
286+
<<<<<<< HEAD
263287
96ABF7A87CEE57D5C4479DBC /* [CP] Embed Pods Frameworks */ = {
288+
=======
289+
A2B57F542CA8F59AACC145C9 /* [CP] Embed Pods Frameworks */ = {
290+
>>>>>>> e204ff30 (feat(ios): Migrate executorch to prebuilt XCFramework (#629))
264291
isa = PBXShellScriptBuildPhase;
265292
buildActionMask = 2147483647;
266293
files = (
267294
);
268295
inputPaths = (
269296
"${PODS_ROOT}/Target Support Files/Pods-llm/Pods-llm-frameworks.sh",
297+
<<<<<<< HEAD
270298
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
271299
);
272300
name = "[CP] Embed Pods Frameworks";
273301
outputPaths = (
274302
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
303+
=======
304+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/RNAudioAPI/libavcodec.framework/libavcodec",
305+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/RNAudioAPI/libavformat.framework/libavformat",
306+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/RNAudioAPI/libavutil.framework/libavutil",
307+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/RNAudioAPI/libswresample.framework/libswresample",
308+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
309+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/react-native-executorch/ExecutorchLib.framework/ExecutorchLib",
310+
);
311+
name = "[CP] Embed Pods Frameworks";
312+
outputPaths = (
313+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libavcodec.framework",
314+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libavformat.framework",
315+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libavutil.framework",
316+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libswresample.framework",
317+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
318+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ExecutorchLib.framework",
319+
>>>>>>> e204ff30 (feat(ios): Migrate executorch to prebuilt XCFramework (#629))
275320
);
276321
runOnlyForDeploymentPostprocessing = 0;
277322
shellPath = /bin/sh;
278323
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-llm/Pods-llm-frameworks.sh\"\n";
279324
showEnvVarsInLog = 0;
280325
};
326+
<<<<<<< HEAD
281327
DE51561DFA0B7F5BB664350B /* [CP] Check Pods Manifest.lock */ = {
328+
=======
329+
D84A76355ECD908C8FB22A4F /* [CP] Check Pods Manifest.lock */ = {
330+
>>>>>>> e204ff30 (feat(ios): Migrate executorch to prebuilt XCFramework (#629))
282331
isa = PBXShellScriptBuildPhase;
283332
buildActionMask = 2147483647;
284333
files = (
@@ -300,52 +349,7 @@
300349
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";
301350
showEnvVarsInLog = 0;
302351
};
303-
281D8603161F8B331E2BA335 /* [Expo] Configure project */ = {
304-
isa = PBXShellScriptBuildPhase;
305-
alwaysOutOfDate = 1;
306-
buildActionMask = 2147483647;
307-
files = (
308-
);
309-
inputFileListPaths = (
310-
);
311-
inputPaths = (
312-
);
313-
name = "[Expo] Configure project";
314-
outputFileListPaths = (
315-
);
316-
outputPaths = (
317-
);
318-
runOnlyForDeploymentPostprocessing = 0;
319-
shellPath = /bin/sh;
320-
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";
321-
};
322-
62055444ECB4CA2743E68CDC /* [CP] Embed Pods Frameworks */ = {
323-
isa = PBXShellScriptBuildPhase;
324-
buildActionMask = 2147483647;
325-
files = (
326-
);
327-
inputPaths = (
328-
"${PODS_ROOT}/Target Support Files/Pods-llm/Pods-llm-frameworks.sh",
329-
"${PODS_XCFRAMEWORKS_BUILD_DIR}/RNAudioAPI/libavcodec.framework/libavcodec",
330-
"${PODS_XCFRAMEWORKS_BUILD_DIR}/RNAudioAPI/libavformat.framework/libavformat",
331-
"${PODS_XCFRAMEWORKS_BUILD_DIR}/RNAudioAPI/libavutil.framework/libavutil",
332-
"${PODS_XCFRAMEWORKS_BUILD_DIR}/RNAudioAPI/libswresample.framework/libswresample",
333-
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
334-
);
335-
name = "[CP] Embed Pods Frameworks";
336-
outputPaths = (
337-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libavcodec.framework",
338-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libavformat.framework",
339-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libavutil.framework",
340-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libswresample.framework",
341-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
342-
);
343-
runOnlyForDeploymentPostprocessing = 0;
344-
shellPath = /bin/sh;
345-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-llm/Pods-llm-frameworks.sh\"\n";
346-
showEnvVarsInLog = 0;
347-
};
348-
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = {
352+
DDB198386A53904071F2DCB8 /* [CP] Copy Pods Resources */ = {
349353
isa = PBXShellScriptBuildPhase;
350354
buildActionMask = 2147483647;
351355
files = (
@@ -398,7 +402,11 @@
398402
/* Begin XCBuildConfiguration section */
399403
13B07F941A680F5B00A75B9A /* Debug */ = {
400404
isa = XCBuildConfiguration;
405+
<<<<<<< HEAD
401406
baseConfigurationReference = 56D7DF5DF56EAD2FAE3ADDBF /* Pods-llm.debug.xcconfig */;
407+
=======
408+
baseConfigurationReference = 88496D8737DE09B515354EED /* Pods-llm.debug.xcconfig */;
409+
>>>>>>> e204ff30 (feat(ios): Migrate executorch to prebuilt XCFramework (#629))
402410
buildSettings = {
403411
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
404412
CLANG_ENABLE_MODULES = YES;
@@ -435,7 +443,11 @@
435443
};
436444
13B07F951A680F5B00A75B9A /* Release */ = {
437445
isa = XCBuildConfiguration;
446+
<<<<<<< HEAD
438447
baseConfigurationReference = EA4529BE680FEB0AB7539557 /* Pods-llm.release.xcconfig */;
448+
=======
449+
baseConfigurationReference = 1C13F4C8CCA7B641EDCEA802 /* Pods-llm.release.xcconfig */;
450+
>>>>>>> e204ff30 (feat(ios): Migrate executorch to prebuilt XCFramework (#629))
439451
buildSettings = {
440452
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
441453
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: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,14 @@ 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

3022
s.user_target_xcconfig = {
3123
"HEADER_SEARCH_PATHS" => "$(PODS_TARGET_SRCROOT)/third-party/include",
3224

3325
"OTHER_LDFLAGS[sdk=iphoneos*]" => [
34-
'$(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-
"\"#{et_binaries_path}\"/libkernels_portable_ios.a",
26+
'$(inherited)',
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\"",
@@ -48,15 +32,7 @@ Pod::Spec.new do |s|
4832
].join(' '),
4933

5034
"OTHER_LDFLAGS[sdk=iphonesimulator*]" => [
51-
'$(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-
"\"#{et_binaries_path}\"/libkernels_portable_simulator.a",
35+
'$(inherited)',
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

0 commit comments

Comments
 (0)