diff --git a/packages/flutter_tools/lib/src/macos/cocoapods.dart b/packages/flutter_tools/lib/src/macos/cocoapods.dart index 26365b6a46425..98c4602efd1ca 100644 --- a/packages/flutter_tools/lib/src/macos/cocoapods.dart +++ b/packages/flutter_tools/lib/src/macos/cocoapods.dart @@ -371,7 +371,7 @@ class CocoaPods { ).send(); _logger.printError( 'Error: To set up CocoaPods for ARM macOS, run:\n' - ' arch -x86_64 sudo gem install ffi\n', + ' sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc\n', emphasis: true, ); } diff --git a/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart b/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart index 81139a64730c0..cfdeadb3df35e 100644 --- a/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart +++ b/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart @@ -536,6 +536,10 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by logger.errorText, contains('set up CocoaPods for ARM macOS'), ); + expect( + logger.errorText, + contains('enable-libffi-alloc'), + ); expect(usage.events, contains(const TestUsageEvent('pod-install-failure', 'arm-ffi'))); }); });