Skip to content

Commit 40de5eb

Browse files
committed
Fix GoogleMapsUtils imports for both SPM and CocoaPods
1 parent ca97a73 commit 40de5eb

File tree

6 files changed

+40
-0
lines changed

6 files changed

+40
-0
lines changed

packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Downloaded by pub (not CocoaPods).
3636
s.xcconfig = {
3737
'LIBRARY_SEARCH_PATHS' => '$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)/ $(SDKROOT)/usr/lib/swift',
3838
'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) /usr/lib/swift',
39+
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) FGM_USING_COCOAPODS=1'
3940
}
4041
s.resource_bundles = {'google_maps_flutter_ios_privacy' => ['google_maps_flutter_ios/Sources/google_maps_flutter_ios/Resources/PrivacyInfo.xcprivacy']}
4142
end

packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FLTGoogleMapHeatmapController.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
// found in the LICENSE file.
44

55
#import "FLTGoogleMapHeatmapController.h"
6+
7+
/// If Swift Package Manager is in use, Objective-C headers are available under the
8+
/// GoogleMapsUtilsObjC package. When using CocoaPods, the headers are provided by the
9+
/// GoogleMapsUtils package.
10+
#ifdef FGM_USING_COCOAPODS
11+
@import GoogleMapsUtils;
12+
#else
613
@import GoogleMapsUtilsObjC;
14+
#endif
715
#import "FLTGoogleMapJSONConversions.h"
816

917
@interface FLTGoogleMapHeatmapController ()

packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// If Swift Package Manager is in use, Objective-C headers are available under the
6+
/// GoogleMapsUtilsObjC package. When using CocoaPods, the headers are provided by the
7+
/// GoogleMapsUtils package.
8+
#ifdef FGM_USING_COCOAPODS
9+
@import GoogleMapsUtils;
10+
#else
511
@import GoogleMapsUtilsObjC;
12+
#endif
613

714
#import "GoogleMapController.h"
815

packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMClusterManagersController.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44

55
#import <Flutter/Flutter.h>
66
#import <GoogleMaps/GoogleMaps.h>
7+
8+
/// If Swift Package Manager is in use, Objective-C headers are available under the
9+
/// GoogleMapsUtilsObjC package. When using CocoaPods, the headers are provided by the
10+
/// GoogleMapsUtils package.
11+
#ifdef FGM_USING_COCOAPODS
12+
@import GoogleMapsUtils;
13+
#else
714
@import GoogleMapsUtilsObjC;
15+
#endif
816

917
#import "messages.g.h"
1018

packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapHeatmapController.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44

55
#import <Flutter/Flutter.h>
66
#import <GoogleMaps/GoogleMaps.h>
7+
8+
/// If Swift Package Manager is in use, Objective-C headers are available under the
9+
/// GoogleMapsUtilsObjC package. When using CocoaPods, the headers are provided by the
10+
/// GoogleMapsUtils package.
11+
#ifdef FGM_USING_COCOAPODS
12+
@import GoogleMapsUtils;
13+
#else
714
@import GoogleMapsUtilsObjC;
15+
#endif
816

917
#import "messages.g.h"
1018

packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapJSONConversions.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55
#import <Flutter/Flutter.h>
66
#import <Foundation/Foundation.h>
77
#import <GoogleMaps/GoogleMaps.h>
8+
9+
/// If Swift Package Manager is in use, Objective-C headers are available under the
10+
/// GoogleMapsUtilsObjC package. When using CocoaPods, the headers are provided by the
11+
/// GoogleMapsUtils package.
12+
#ifdef FGM_USING_COCOAPODS
13+
@import GoogleMapsUtils;
14+
#else
815
@import GoogleMapsUtilsObjC;
16+
#endif
917

1018
#import "messages.g.h"
1119

0 commit comments

Comments
 (0)