Skip to content

Commit 619baed

Browse files
committed
[google_maps_flutter_ios] Add Swift Package manager support
1 parent 8542af3 commit 619baed

34 files changed

+52
-6
lines changed

packages/google_maps_flutter/google_maps_flutter_ios/ios/Assets/.gitkeep

Whitespace-only changes.

packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios.podspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Downloaded by pub (not CocoaPods).
1414
s.author = { 'Flutter Dev Team' => '[email protected]' }
1515
s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter/ios' }
1616
s.documentation_url = 'https://pub.dev/packages/google_maps_flutter_ios'
17-
s.source_files = 'Classes/**/*.{h,m}'
18-
s.public_header_files = 'Classes/**/*.h'
19-
s.module_map = 'Classes/google_maps_flutter_ios.modulemap'
17+
s.source_files = 'google_maps_flutter_ios/Sources/google_maps_flutter_ios/**/*.{h,m}'
18+
s.public_header_files = 'google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/**/*.h'
19+
s.module_map = 'google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios.modulemap'
2020
s.dependency 'Flutter'
2121
# Allow any version up to the next breaking change after the latest version that
2222
# has been confirmed to be compatible via an example in examples/. See discussion
@@ -37,5 +37,5 @@ Downloaded by pub (not CocoaPods).
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',
3939
}
40-
s.resource_bundles = {'google_maps_flutter_ios_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
40+
s.resource_bundles = {'google_maps_flutter_ios_privacy' => ['google_maps_flutter_ios/Sources/google_maps_flutter_ios/Resources/PrivacyInfo.xcprivacy']}
4141
end
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// swift-tools-version: 5.9
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
// Copyright 2013 The Flutter Authors. All rights reserved.
5+
// Use of this source code is governed by a BSD-style license that can be
6+
// found in the LICENSE file.
7+
8+
import PackageDescription
9+
10+
let package = Package(
11+
name: "google_maps_flutter_ios",
12+
platforms: [
13+
.iOS(.v15),
14+
],
15+
products: [
16+
.library(name: "google-maps-flutter-ios", type: .static, targets: ["google_maps_flutter_ios"])
17+
],
18+
dependencies: [
19+
.package(url: "https://github.com/googlemaps/ios-maps-sdk", .upToNextMajor(from: "9.0.0")),
20+
.package(url: "https://github.com/googlemaps/google-maps-ios-utils", .upToNextMajor(from: "6.1.0")),
21+
],
22+
targets: [
23+
.target(
24+
name: "google_maps_flutter_ios",
25+
dependencies: [
26+
.product(
27+
name: "GoogleMapsUtils",
28+
package: "google-maps-ios-utils"
29+
),
30+
.product(
31+
name: "GoogleMaps",
32+
package: "ios-maps-sdk"
33+
),
34+
],
35+
exclude: ["include/google_maps_flutter_ios-umbrella.h", "include/google_maps_flutter_ios.modulemap"],
36+
resources: [
37+
.process("Resources")
38+
],
39+
cSettings: [
40+
.headerSearchPath("include/google_maps_flutter_ios")
41+
]
42+
)
43+
]
44+
)

0 commit comments

Comments
 (0)