Steps to reproduce
I am trying to generate iOS frameworks from a Flutter module using the flutter build ios-framework command. The build fails during the plugin compilation stage when the google_maps_flutter plugin is included.
This issue occurs only for iOS builds. The Android build works correctly with the same configuration.
The failure happens during the FlutterPluginRegistrant build step with a ScanDependencies error referencing GeneratedPluginRegistrant.m.
Dependency
google_maps_flutter: ^2.14.2
Command Used
flutter build ios-framework --output=../FlutterFrameworks
Steps to Reproduce
- Create a Flutter module.
- Add the following dependency:
google_maps_flutter: ^2.14.2
- Run the command:
flutter build ios-framework --output=../FlutterFrameworks
- Observe the build failure during plugin compilation.
Environment
Flutter version: 3.41.4
Dart version: 3.11.1
DevTools version: 2.54.1
Xcode version: 26.3
macOS version: 15.7.3 (M1)
CocoaPods version: 1.16.2
Additional Notes
- The issue occurs only when generating iOS frameworks.
- Android builds successfully with the same dependency.
- The error occurs during the FlutterPluginRegistrant compilation phase.
Any guidance or suggested workaround would be appreciated.
Expected results
The command should successfully generate the Flutter iOS frameworks and compile all plugin frameworks, including google_maps_flutter.
Actual results
The build fails while compiling plugin frameworks.
Error output:
Unable to build plugin frameworks: ** BUILD FAILED **
The following build commands failed:
ScanDependencies
/Users/.../FlutterFrameworks/Debug/iphoneos/Pods.build/Debug-iphoneos/FlutterPluginRegistrant.build/Objects-normal/arm64/GeneratedPluginRegistrant.o
/Users/.../google_map_demo/.ios/Flutter/FlutterPluginRegistrant/Classes/GeneratedPluginRegistrant.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(in target 'FlutterPluginRegistrant' from project 'Pods')
(1 failure)
Code sample
pubspec.yaml
name: googlemapapp
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ^3.11.0
dependencies:
flutter:
sdk: flutter
google_maps_flutter: ^2.14.2
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^6.0.0
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
Code sample
main.dart
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(primarySwatch: Colors.blue),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
bool _showMap = false;
static const LatLng _initialTarget = LatLng(21.9974, 79.0011);
static final Set<Marker> _markers = {
Marker(
markerId: MarkerId('initial'),
position: LatLng(21.9974, 79.0011),
infoWindow: InfoWindow(title: 'Initial Location'),
),
Marker(
markerId: MarkerId('marker_2'),
position: LatLng(22.0574, 79.0511),
infoWindow: InfoWindow(title: 'Marker 2'),
icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen),
),
Marker(
markerId: MarkerId('marker_3'),
position: LatLng(21.9474, 78.9511),
infoWindow: InfoWindow(title: 'Marker 3'),
icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueBlue),
),
};
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(widget.title)),
body: Center(
child: Column(
mainAxisAlignment: .center,
children: [
const Text('You have pushed the button this many times:'),
ElevatedButton(
onPressed: () => setState(() => _showMap = !_showMap),
child: Text(_showMap ? 'Hide Map' : 'Show Map'),
),
if (_showMap)
SizedBox(
height: 300,
width: double.infinity,
child: GoogleMap(
initialCameraPosition: const CameraPosition(
target: _initialTarget,
zoom: 12,
),
markers: _markers,
),
),
],
),
),
);
}
}
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
sunilverma@Sunils-MacBook-Pro-8304 google_map_demo % flutter build ios-framework --output=build/ios/framework
Building frameworks for com.example.googleMapDemo in debug mode...
├─Copying Flutter.xcframework... 144ms
├─Building App.xcframework... 5.5s
Running pod install... 1,865ms
├─Building plugins... 10.6s
Unable to build plugin frameworks: ** BUILD FAILED **
The following build commands failed:
ScanDependencies /Users/sunilverma/Desktop/untitled\ folder\
3/google_map_demo/build/ios/framework/Debug/iphoneos/Pods.build/Debug-iphoneos/FlutterPluginRegistrant.build/Object
s-normal/arm64/GeneratedPluginRegistrant.o /Users/sunilverma/Desktop/untitled\ folder\
3/google_map_demo/.ios/Flutter/FlutterPluginRegistrant/Classes/GeneratedPluginRegistrant.m normal arm64 objective-c
com.apple.compilers.llvm.clang.1_0.compiler (in target 'FlutterPluginRegistrant' from project 'Pods')
(1 failure)
sunilverma@Sunils-MacBook-Pro-8304 google_map_demo %
Flutter Doctor output
Doctor output
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.41.4, on macOS 15.7.4 24G517 darwin-arm64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 26.3)
[✓] Chrome - develop for the web
[✓] Connected device (3 available)
! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a
cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for iPhone 11. Ensure the device is unlocked and attached with a
cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for SDiPhone14. Ensure the device is unlocked and attached with a
cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for Iphone SE. Ensure the device is unlocked and attached with a
cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for Hardik’s iPhone. Ensure the device is unlocked and attached
with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources
• No issues found!
Steps to reproduce
I am trying to generate iOS frameworks from a Flutter module using the flutter build ios-framework command. The build fails during the plugin compilation stage when the google_maps_flutter plugin is included.
This issue occurs only for iOS builds. The Android build works correctly with the same configuration.
The failure happens during the FlutterPluginRegistrant build step with a ScanDependencies error referencing GeneratedPluginRegistrant.m.
Dependency
google_maps_flutter: ^2.14.2
Command Used
flutter build ios-framework --output=../FlutterFrameworks
Steps to Reproduce
Environment
Flutter version: 3.41.4 Dart version: 3.11.1 DevTools version: 2.54.1 Xcode version: 26.3 macOS version: 15.7.3 (M1) CocoaPods version: 1.16.2
Additional Notes
Any guidance or suggested workaround would be appreciated.
Expected results
The command should successfully generate the Flutter iOS frameworks and compile all plugin frameworks, including google_maps_flutter.
Actual results
The build fails while compiling plugin frameworks.
Error output:
Unable to build plugin frameworks: ** BUILD FAILED **
The following build commands failed:
ScanDependencies
/Users/.../FlutterFrameworks/Debug/iphoneos/Pods.build/Debug-iphoneos/FlutterPluginRegistrant.build/Objects-normal/arm64/GeneratedPluginRegistrant.o
/Users/.../google_map_demo/.ios/Flutter/FlutterPluginRegistrant/Classes/GeneratedPluginRegistrant.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(in target 'FlutterPluginRegistrant' from project 'Pods')
(1 failure)
Code sample
pubspec.yaml
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
Flutter Doctor output
Doctor output