declaresNativeIos function
bool
declaresNativeIos(
- IosResolution resolution,
- PackageInfo? resolvedInfo,
- List<
String> archiveEntryPaths
Whether the resolved package (resolution) ships native iOS code at all
(SPEC e2-s1 rework): true when it declares pluginClass or
ffiPlugin: true for IosResolution.platform itself, or its archive has
a .podspec under ios/, macos/ or darwin/. False when it's
Dart-only (dartPluginClass) with no podspec — nothing to migrate off
CocoaPods, so the CocoaPods deadline can't block it.
Implementation
bool declaresNativeIos(
IosResolution resolution,
PackageInfo? resolvedInfo,
List<String> archiveEntryPaths,
) {
final platformInfo = resolvedInfo?.platformInfo(resolution.platform);
if (platformInfo?.declaresNativeImplementation ?? false) return true;
return _podspecDirs.any(
(dir) =>
archiveEntryPaths.contains('$dir/${resolution.checkedPackage}.podspec'),
);
}