extractSdkVersion static method
Extract SDK version if specified
Implementation
static String? extractSdkVersion(File podfile) {
try {
final content = podfile.readAsStringSync();
// Match patterns like: pod 'ULinkSDK', '~> 1.0.0'
// Escape quotes properly in raw string
final versionPattern =
RegExp(r"pod\s+['" "]ULinkSDK['" "],\s*['" "]([^'" "]+)['" "]");
final versionMatch = versionPattern.firstMatch(content);
return versionMatch?.group(1);
} catch (e) {
return null;
}
}