Skip to content

Commit 2e1c146

Browse files
authored
Update ffi gem installation instructions (#103008)
1 parent c3ab24e commit 2e1c146

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/flutter_tools/lib/src/macos/cocoapods.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ class CocoaPods {
371371
).send();
372372
_logger.printError(
373373
'Error: To set up CocoaPods for ARM macOS, run:\n'
374-
' arch -x86_64 sudo gem install ffi\n',
374+
' sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc\n',
375375
emphasis: true,
376376
);
377377
}

packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,10 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by
536536
logger.errorText,
537537
contains('set up CocoaPods for ARM macOS'),
538538
);
539+
expect(
540+
logger.errorText,
541+
contains('enable-libffi-alloc'),
542+
);
539543
expect(usage.events, contains(const TestUsageEvent('pod-install-failure', 'arm-ffi')));
540544
});
541545
});

0 commit comments

Comments
 (0)