Skip to content

Commit e75258a

Browse files
authored
chore: adds Swift Package Manager compatibility (#208)
1 parent 1b6c72e commit e75258a

35 files changed

+74
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Pods/
4545
**/Flutter/flutter_assets/
4646
ServiceDefinitions.json
4747
xcuserdata/
48+
.swiftpm/
4849
.last_build_id
4950

5051
# Android

example/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related

ios/Assets/.gitkeep

Whitespace-only changes.

ios/google_navigation_flutter.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A Google Maps Navigation Flutter plugin.
1313
s.license = { :file => '../LICENSE' }
1414
s.author = { 'Google Maps' => '[email protected]' }
1515
s.source = { :path => '.' }
16-
s.source_files = 'Classes/**/*'
16+
s.source_files = 'google_navigation_flutter/Sources/google_navigation_flutter/**/*.swift'
1717
s.dependency 'Flutter'
1818
s.dependency 'GoogleNavigation', '9.1.2'
1919
s.platform = :ios, '15.0'
@@ -22,5 +22,5 @@ A Google Maps Navigation Flutter plugin.
2222
# Flutter.framework does not contain a i386 slice.
2323
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
2424
s.swift_version = '5.0'
25-
s.resource_bundles = {'google_navigation_flutter_privacy_info' => ['Resources/PrivacyInfo.xcprivacy']}
25+
s.resource_bundles = {'google_navigation_flutter_privacy_info' => ['google_navigation_flutter/Sources/google_navigation_flutter/PrivacyInfo.xcprivacy']}
2626
end
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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 2024 Google LLC
5+
//
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// https://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
18+
import PackageDescription
19+
20+
let package = Package(
21+
name: "google_navigation_flutter",
22+
platforms: [
23+
.iOS("15.0"),
24+
],
25+
products: [
26+
.library(name: "google-navigation-flutter", targets: ["google_navigation_flutter"]),
27+
],
28+
dependencies: [
29+
.package(
30+
url: "https://github.com/googlemaps/ios-navigation-sdk",
31+
exact: "9.1.2"
32+
),
33+
.package(
34+
url: "https://github.com/googlemaps/ios-maps-sdk",
35+
exact: "9.1.1"
36+
),
37+
],
38+
targets: [
39+
.target(
40+
name: "google_navigation_flutter",
41+
dependencies: [
42+
.product(
43+
name: "GoogleNavigation",
44+
package: "ios-navigation-sdk"
45+
),
46+
.product(
47+
name: "GoogleMaps",
48+
package: "ios-maps-sdk"
49+
),
50+
],
51+
resources: [
52+
.process("PrivacyInfo.xcprivacy"),
53+
]
54+
),
55+
]
56+
)

ios/Classes/BaseCarSceneDelegate.swift renamed to ios/google_navigation_flutter/Sources/google_navigation_flutter/BaseCarSceneDelegate.swift

File renamed without changes.

ios/Classes/Convert+MapConfiguration.swift renamed to ios/google_navigation_flutter/Sources/google_navigation_flutter/Convert+MapConfiguration.swift

File renamed without changes.

ios/Classes/Convert.swift renamed to ios/google_navigation_flutter/Sources/google_navigation_flutter/Convert.swift

File renamed without changes.

ios/Classes/GMSCircle+Util.swift renamed to ios/google_navigation_flutter/Sources/google_navigation_flutter/GMSCircle+Util.swift

File renamed without changes.

ios/Classes/GMSPath+Util.swift renamed to ios/google_navigation_flutter/Sources/google_navigation_flutter/GMSPath+Util.swift

File renamed without changes.

0 commit comments

Comments
 (0)