isIosSwiftModule function

bool isIosSwiftModule(
  1. File specFile
)

Returns true when the module has a Swift implementation on iOS and so needs a Registry.register() call in the iOS Plugin.swift. Not the inverse of isIosCppModule: a module that targets no Apple platform is neither. A spec that is not found, or declares nothing, keeps the Swift default.

Implementation

bool isIosSwiftModule(File specFile) {
  final a = PlatformTargetAnalyzer.fromSpec(specFile);
  return a.declaresNothing || a.swiftOnIos;
}