-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[google_maps_flutter] Define clang module for iOS, fix analyzer warnings #2182
Conversation
@@ -9,9 +9,11 @@ | |||
#import "GoogleMapPolygonController.h" | |||
#import "GoogleMapPolylineController.h" | |||
|
|||
NS_ASSUME_NONNULL_BEGIN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The id _Nullable
below had opted this entire header into nullability, but it wasn't specified anywhere, which caused the analyzer warnings.
Ideally all headers would declare nullability, but I wanted to limit the scope of this change.
@@ -65,7 +65,7 @@ - (instancetype)initWithFrame:(CGRect)frame | |||
viewIdentifier:(int64_t)viewId | |||
arguments:(id _Nullable)args | |||
registrar:(NSObject<FlutterPluginRegistrar>*)registrar { | |||
if ([super init]) { | |||
if (self = [super init]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😬
@@ -16,7 +16,7 @@ A new flutter plugin project. | |||
s.public_header_files = 'Classes/**/*.h' | |||
s.dependency 'Flutter' | |||
s.dependency 'GoogleMaps' | |||
s.compiler_flags = '-fno-modules' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this change I'm able to use module imports in a Swift and Objective-C app (building with libraries and frameworks). @iskakaushik I believe that's enough to prove I didn't regress #1734?
@import GoogleMapsBase;
@import google_maps_flutter;
2163b32
to
58a23f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@iskakaushik might want to chime in for the comment about using module imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* newCache/blackVideos: (105 commits) [connectivity] Fix reachability stream for iOS (flutter#2281) [google_sign_in] Port plugin to use the federated Platform Interface (flutter#2266) [webview_flutter] Add async NavigationDelegates (flutter#2257) Update cirrus to create IOS simulator on 13.2 an xCode 11 (flutter#2275) [battery] Update and migrate iOS example project (flutter#2089) [url_launcher] DartDoc and test improvements (flutter#2274) [google_maps_flutter] Define clang module for iOS, fix analyzer warnings (flutter#2182) [video_player] Add v2 embedding support (flutter#2226) [path_provider] Update and migrate iOS example project (flutter#2099) [sensors] Documentation and test improvements (flutter#2272) [image_picker] Lint for public DartDocs (flutter#2270) [connectivity] Lint for public DartDocs (flutter#2269) [shared_preferences] Update and migrate iOS example project (flutter#2103) [quick_actions] Update and migrate iOS example project (flutter#2100) [infra] Ignore analyzer issues in CI (flutter#2271) [android_intent] Add missing DartDocs (flutter#2268) Bump google_maps_flutter pubspec to match CHANGELOG (flutter#2267) [google_sign_in] Handle new style URLs in GoogleUserCircleAvatar (flutter#2252) [google_sign_in] Move plugin to its subdir to allow for federated implementations. Add platform interface. (flutter#2244) Make setMockInitialValues handle non-prefixed keys (flutter#2260) ... # Conflicts: # packages/video_player/CHANGELOG.md # packages/video_player/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java # packages/video_player/ios/video_player.podspec # packages/video_player/pubspec.yaml # packages/video_player/test/video_player_test.dart
Description
DEFINES_MODULE
in the podspec. See CocoaPod modular headers docs.VALID_ARCHS
to x86_64 for the simulator. See No way to add passing test_spec that doesn't cause build warning "Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform" CocoaPods/CocoaPods#9210.Related Issues
See flutter/flutter#41007.
Might fix flutter/flutter#34042 (though I can't reproduce it)
Tests
Checklist
///
).flutter analyze
) does not report any problems on my PR.Breaking Change