Skip to content

Commit

Permalink
rm Podfile for firestore
Browse files Browse the repository at this point in the history
  • Loading branch information
russellwheatley committed Dec 5, 2024
1 parent f7f7c38 commit 414e23d
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions .github/workflows/scripts/swift-integration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,6 @@ void main() async {
await buildSwiftExampleApp('macos', 'firebase_messaging');
}

Future<void> deleteFirstLine(String filePath) async {
final file = File(filePath);

if (!file.existsSync()) {
print('File does not exist: $filePath');
return;
}

final lines = await file.readAsLines();
if (lines.isNotEmpty) {
final updatedContent = lines.skip(1).join('\n');
await file.writeAsString(updatedContent);
print('First line deleted from $filePath');
} else {
print('File is empty: $filePath');
}
}

Future<void> buildSwiftExampleApp(String platform, String plugin) async {
final initialDirectory = Directory.current;
final platformName = platform == 'ios' ? 'iOS' : 'macOS';
Expand All @@ -50,13 +32,13 @@ Future<void> buildSwiftExampleApp(String platform, String plugin) async {
exit(1);
}

if (platform == 'macos') {
await deleteFirstLine(
'packages/$plugin/$plugin/example/macos/Flutter/Flutter-Release.xcconfig');
}
// Change to the appropriate directory
Directory.current = directory;

if (plugin == 'cloud_firestore') {
// Need to remove Podfile for Firestore as it pulls in https://github.com/invertase/firestore-ios-sdk-frameworks.git
await _runCommand('rm', ['Podfile']);
}
// Determine the arguments for the flutter build command
final flutterArgs = ['build', platform];
if (platform == 'ios') {
Expand Down

0 comments on commit 414e23d

Please sign in to comment.