-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[google_maps_flutter_ios]: Add swift package manager compatibility #8288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
619baed
ca97a73
40de5eb
110295a
ae8d82a
3114ab9
7a5472c
b59a827
6997d4c
45e9116
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// swift-tools-version: 5.9 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "google_maps_flutter_ios", | ||
platforms: [ | ||
.iOS(.v15) | ||
], | ||
products: [ | ||
.library(name: "google-maps-flutter-ios", type: .static, targets: ["google_maps_flutter_ios"]) | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/googlemaps/ios-maps-sdk", "9.0.0"..<"10.0.0"), | ||
.package(url: "https://github.com/googlemaps/google-maps-ios-utils", "6.1.0"..<"7.0.0"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jokerttu Can you explain why the SwiftPM implementation can only be used in iOS 15+? Why can't it include There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See discussion here; apparently the SDK's SPM configuration was broken in the version of the SDK that still supported iOS 14 :( |
||
], | ||
targets: [ | ||
.target( | ||
name: "google_maps_flutter_ios", | ||
dependencies: [ | ||
.product( | ||
name: "GoogleMapsUtils", | ||
package: "google-maps-ios-utils" | ||
), | ||
.product( | ||
name: "GoogleMaps", | ||
package: "ios-maps-sdk" | ||
), | ||
], | ||
exclude: [ | ||
"include/google_maps_flutter_ios-umbrella.h", "include/google_maps_flutter_ios.modulemap", | ||
], | ||
resources: [ | ||
.process("Resources") | ||
], | ||
cSettings: [ | ||
.headerSearchPath("include/google_maps_flutter_ios") | ||
] | ||
) | ||
] | ||
) |
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.
Note this
FGM_USING_COCOAPODS
preprocessor definition used to detect if cocoapods are used or not.This is used for example at: https://github.com/flutter/packages/pull/8288/files#diff-dcc8100c7e606a3918ac1f3f2cd0aa16c2c6e551e09b9ff717f724a671ce5323R8