Skip to content

Commit 14375bf

Browse files
iOS example: remove dangling RunAnywhereMetalRT product reference
PR #476 added RunAnywhereMetalRT to examples/ios/RunAnywhereAI's project.pbxproj as a required package product, but root Package.swift exposes that product only when either useLocalBinaries=true (and a local RABackendMetalRT.xcframework is present) or metalrtRemoteBinaryAvailable=true (and a published checksum is wired in). Neither is currently true, so SPM resolution failed with 'Missing package product RunAnywhereMetalRT'. Removed the dangling product reference. All code that uses MetalRTRuntime is guarded with #if canImport(MetalRTRuntime) already, so the app continues to build and run without MetalRT. When the binary is published, re-add the product reference and flip the flag. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1152dcc commit 14375bf

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

examples/flutter/RunAnywhereAI/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ public static void registerWith(@NonNull FlutterEngine flutterEngine) {
3030
} catch (Exception e) {
3131
Log.e(TAG, "Error registering plugin device_info_plus, dev.fluttercommunity.plus.device_info.DeviceInfoPlusPlugin", e);
3232
}
33+
try {
34+
flutterEngine.getPlugins().add(new com.mr.flutter.plugin.filepicker.FilePickerPlugin());
35+
} catch (Exception e) {
36+
Log.e(TAG, "Error registering plugin file_picker, com.mr.flutter.plugin.filepicker.FilePickerPlugin", e);
37+
}
3338
try {
3439
flutterEngine.getPlugins().add(new io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin());
3540
} catch (Exception e) {
@@ -75,6 +80,11 @@ public static void registerWith(@NonNull FlutterEngine flutterEngine) {
7580
} catch (Exception e) {
7681
Log.e(TAG, "Error registering plugin runanywhere, ai.runanywhere.sdk.RunAnywherePlugin", e);
7782
}
83+
try {
84+
flutterEngine.getPlugins().add(new ai.runanywhere.sdk.genie.GeniePlugin());
85+
} catch (Exception e) {
86+
Log.e(TAG, "Error registering plugin runanywhere_genie, ai.runanywhere.sdk.genie.GeniePlugin", e);
87+
}
7888
try {
7989
flutterEngine.getPlugins().add(new ai.runanywhere.sdk.llamacpp.LlamaCppPlugin());
8090
} catch (Exception e) {

examples/flutter/RunAnywhereAI/ios/Runner/GeneratedPluginRegistrant.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@
9090
@import runanywhere_llamacpp;
9191
#endif
9292

93+
#if __has_include(<runanywhere_onnx/OnnxPlugin.h>)
94+
#import <runanywhere_onnx/OnnxPlugin.h>
95+
#else
96+
@import runanywhere_onnx;
97+
#endif
98+
9399
#if __has_include(<shared_preferences_foundation/SharedPreferencesPlugin.h>)
94100
#import <shared_preferences_foundation/SharedPreferencesPlugin.h>
95101
#else
@@ -125,6 +131,7 @@ + (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
125131
[RunAnywherePlugin registerWithRegistrar:[registry registrarForPlugin:@"RunAnywherePlugin"]];
126132
[GeniePlugin registerWithRegistrar:[registry registrarForPlugin:@"GeniePlugin"]];
127133
[LlamaCppPlugin registerWithRegistrar:[registry registrarForPlugin:@"LlamaCppPlugin"]];
134+
[OnnxPlugin registerWithRegistrar:[registry registrarForPlugin:@"OnnxPlugin"]];
128135
[SharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"SharedPreferencesPlugin"]];
129136
[SqflitePlugin registerWithRegistrar:[registry registrarForPlugin:@"SqflitePlugin"]];
130137
[URLLauncherPlugin registerWithRegistrar:[registry registrarForPlugin:@"URLLauncherPlugin"]];

examples/ios/RunAnywhereAI/RunAnywhereAI.xcodeproj/project.pbxproj

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
58ABEDD22ED16DA40058D033 /* RunAnywhereONNX in Frameworks */ = {isa = PBXBuildFile; productRef = 58ABEDD12ED16DA40058D033 /* RunAnywhereONNX */; };
1616
58LLAMACPP12ED16DA40058D0 /* RunAnywhereLlamaCPP in Frameworks */ = {isa = PBXBuildFile; productRef = 58LLAMACPP02ED16DA40058D0 /* RunAnywhereLlamaCPP */; };
1717
58WHISPERKIT1ED16DA40058D0 /* RunAnywhereWhisperKit in Frameworks */ = {isa = PBXBuildFile; productRef = 58WHISPERKIT0ED16DA40058D0 /* RunAnywhereWhisperKit */; };
18-
58METALRT12ED16DA40058D0 /* RunAnywhereMetalRT in Frameworks */ = {isa = PBXBuildFile; productRef = 58METALRT02ED16DA40058D0 /* RunAnywhereMetalRT */; };
1918
RACACTIVITY01ACTIVITY01RAC /* DictationActivityAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = RACACTIVITY02ACTIVITY02RAC /* DictationActivityAttributes.swift */; };
2019
RACSHARED01RACSHARED01RACS /* SharedConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = RACSHARED02RACSHARED02RACS /* SharedConstants.swift */; };
2120
RACSHARED03RACSHARED03RACS /* SharedDataBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = RACSHARED04RACSHARED04RACS /* SharedDataBridge.swift */; };
@@ -170,7 +169,6 @@
170169
541C59DA2E63772A00DD7839 /* RunAnywhere in Frameworks */,
171170
58LLAMACPP12ED16DA40058D0 /* RunAnywhereLlamaCPP in Frameworks */,
172171
58WHISPERKIT1ED16DA40058D0 /* RunAnywhereWhisperKit in Frameworks */,
173-
58METALRT12ED16DA40058D0 /* RunAnywhereMetalRT in Frameworks */,
174172
);
175173
runOnlyForDeploymentPostprocessing = 0;
176174
};
@@ -311,7 +309,6 @@
311309
58ABEDD12ED16DA40058D033 /* RunAnywhereONNX */,
312310
58LLAMACPP02ED16DA40058D0 /* RunAnywhereLlamaCPP */,
313311
58WHISPERKIT0ED16DA40058D0 /* RunAnywhereWhisperKit */,
314-
58METALRT02ED16DA40058D0 /* RunAnywhereMetalRT */,
315312
);
316313
productName = RunAnywhereAI;
317314
productReference = 5480A1F02E2F250200337F2F /* RunAnywhereAI.app */;
@@ -1083,11 +1080,6 @@
10831080
package = 58E021172E52A86000B722EF /* XCLocalSwiftPackageReference "../../.." */;
10841081
productName = RunAnywhereWhisperKit;
10851082
};
1086-
58METALRT02ED16DA40058D0 /* RunAnywhereMetalRT */ = {
1087-
isa = XCSwiftPackageProductDependency;
1088-
package = 58E021172E52A86000B722EF /* XCLocalSwiftPackageReference "../../.." */;
1089-
productName = RunAnywhereMetalRT;
1090-
};
10911083
/* End XCSwiftPackageProductDependency section */
10921084
};
10931085
rootObject = 5480A1E82E2F250200337F2F /* Project object */;

0 commit comments

Comments
 (0)