Skip to content

[google_maps_flutter_ios] Adds Swift Package Manager compatibility #6639

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

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.6.1

* Adds Swift Package Manager compatibility.

## 2.6.0

* Updates the minimum allowed verison of the Google Maps SDK to 8.4, for privacy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths

pod 'OCMock', '~> 3.9.1'
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
4510D964F3B1259FEDD3ABA6 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7755F8F4BABC3D6A0BD4048B /* libPods-Runner.a */; };
6851F3562835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6851F3552835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m */; };
68E4726A2836FF0C00BDDDAC /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68E472692836FF0C00BDDDAC /* MapKit.framework */; };
78521A5F2BE43055004D1DC1 /* OCMock in Frameworks */ = {isa = PBXBuildFile; productRef = 78521A5E2BE43055004D1DC1 /* OCMock */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
F269303B2BB389BF00BF17C4 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = F269303A2BB389BF00BF17C4 /* assets */; };
982F2A6C27BADE17003C81F4 /* PartiallyMockedMapView.m in Sources */ = {isa = PBXBuildFile; fileRef = 982F2A6B27BADE17003C81F4 /* PartiallyMockedMapView.m */; };
F269303B2BB389BF00BF17C4 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = F269303A2BB389BF00BF17C4 /* assets */; };
F7151F13265D7ED70028CB91 /* GoogleMapsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F7151F12265D7ED70028CB91 /* GoogleMapsTests.m */; };
F7151F21265D7EE50028CB91 /* GoogleMapsUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F7151F20265D7EE50028CB91 /* GoogleMapsUITests.m */; };
FC8F35FC8CD533B128950487 /* libPods-RunnerTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F267F68029D1A4E2E4C572A7 /* libPods-RunnerTests.a */; };
Expand Down Expand Up @@ -103,6 +104,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
78521A5F2BE43055004D1DC1 /* OCMock in Frameworks */,
68E4726A2836FF0C00BDDDAC /* MapKit.framework in Frameworks */,
FC8F35FC8CD533B128950487 /* libPods-RunnerTests.a in Frameworks */,
);
Expand Down Expand Up @@ -260,6 +262,9 @@
F7151F16265D7ED70028CB91 /* PBXTargetDependency */,
);
name = RunnerTests;
packageProductDependencies = (
78521A5E2BE43055004D1DC1 /* OCMock */,
);
productName = RunnerTests;
productReference = F7151F10265D7ED70028CB91 /* RunnerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
Expand Down Expand Up @@ -315,6 +320,9 @@
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
packageReferences = (
78521A5D2BE43055004D1DC1 /* XCRemoteSwiftPackageReference "ocmock" */,
);
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -784,6 +792,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
78521A5D2BE43055004D1DC1 /* XCRemoteSwiftPackageReference "ocmock" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/erikdoe/ocmock";
requirement = {
kind = revision;
revision = afd2c6924e8a36cb872bc475248b978f743c6050;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
78521A5E2BE43055004D1DC1 /* OCMock */ = {
isa = XCSwiftPackageProductDependency;
package = 78521A5D2BE43055004D1DC1 /* XCRemoteSwiftPackageReference "ocmock" */;
productName = OCMock;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Downloaded by pub (not CocoaPods).
s.author = { 'Flutter Dev Team' => '[email protected]' }
s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter/ios' }
s.documentation_url = 'https://pub.dev/packages/google_maps_flutter_ios'
s.source_files = 'Classes/**/*.{h,m}'
s.public_header_files = 'Classes/**/*.h'
s.module_map = 'Classes/google_maps_flutter_ios.modulemap'
s.source_files = 'google_maps_flutter_ios/Sources/google_maps_flutter_ios/**/*.{h,m}'
s.public_header_files = 'google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/**/*.h'
s.module_map = 'google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios.modulemap'
s.dependency 'Flutter'
# Allow any version up to the next breaking change after the latest version that
# has been confirmed to be compatible via an example in examples/. See discussion
Expand All @@ -28,5 +28,5 @@ Downloaded by pub (not CocoaPods).
s.static_framework = true
s.platform = :ios, '14.0'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.resource_bundles = {'google_maps_flutter_ios_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
s.resource_bundles = {'google_maps_flutter_ios_privacy' => ['google_maps_flutter_ios/Sources/google_maps_flutter_ios/Resources/PrivacyInfo.xcprivacy']}
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// swift-tools-version: 5.9

// 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("14.0"),
.macOS("10.14"),
],
products: [
.library(name: "google-maps-flutter-ios", type: .static, targets: ["google_maps_flutter_ios"])
],
dependencies: [
// Allow any version up to the next breaking change after the latest version that
// has been confirmed to be compatible via an example in examples/. See discussion
// in https://github.com/flutter/flutter/issues/86820 for why this should be as
// broad as possible.
// Versions earlier than 8.4 can't be supported because that's the first version
// that supports privacy manifests.
// .package(url: "https://github.com/googlemaps/ios-maps-sdk", "8.4.0"..<"9.0.0")
.package(url: "https://github.com/vashworth/DogaheMaps", revision: "7cb209f67da64d11e128949ed3d7a356867a2c6c")
],
targets: [
.target(
name: "google_maps_flutter_ios",
dependencies: [
.product(name: "GoogleMaps", package: "DogaheMaps")
// .product(name: "GoogleMaps", package: "ios-maps-sdk"),
// .product(name: "GoogleMapsBase", package: "ios-maps-sdk"),
// .product(name: "GoogleMapsCore", package: "ios-maps-sdk"),
],
exclude: ["include/google_maps_flutter_ios.modulemap"],
resources: [
.process("Resources")
],
cSettings: [
.headerSearchPath("include/google_maps_flutter_ios")
]
)
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import "FLTGoogleMapJSONConversions.h"
#import "./include/google_maps_flutter_ios/FLTGoogleMapJSONConversions.h"

@implementation FLTGoogleMapJSONConversions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import "FLTGoogleMapTileOverlayController.h"
#import "FLTGoogleMapJSONConversions.h"
#import "./include/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.h"
#import "./include/google_maps_flutter_ios/FLTGoogleMapJSONConversions.h"

@interface FLTGoogleMapTileOverlayController ()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import "FLTGoogleMapsPlugin.h"
#import "./include/google_maps_flutter_ios/FLTGoogleMapsPlugin.h"

#pragma mark - GoogleMaps plugin implementation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import "GoogleMapCircleController.h"
#import "FLTGoogleMapJSONConversions.h"
#import "./include/google_maps_flutter_ios/GoogleMapCircleController.h"
#import "./include/google_maps_flutter_ios/FLTGoogleMapJSONConversions.h"

@interface FLTGoogleMapCircleController ()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import "GoogleMapController.h"
#import "FLTGoogleMapJSONConversions.h"
#import "FLTGoogleMapTileOverlayController.h"
#import "./include/google_maps_flutter_ios/GoogleMapController.h"
#import "./include/google_maps_flutter_ios/FLTGoogleMapJSONConversions.h"
#import "./include/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.h"

#pragma mark - Conversion of JSON-like values sent via platform channels. Forward declarations.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import "GoogleMapMarkerController.h"
#import "FLTGoogleMapJSONConversions.h"
#import "./include/google_maps_flutter_ios/GoogleMapMarkerController.h"
#import "./include/google_maps_flutter_ios/FLTGoogleMapJSONConversions.h"

@interface FLTGoogleMapMarkerController ()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import "GoogleMapPolygonController.h"
#import "FLTGoogleMapJSONConversions.h"
#import "./include/google_maps_flutter_ios/GoogleMapPolygonController.h"
#import "./include/google_maps_flutter_ios/FLTGoogleMapJSONConversions.h"

@interface FLTGoogleMapPolygonController ()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import "GoogleMapPolylineController.h"
#import "FLTGoogleMapJSONConversions.h"
#import "./include/google_maps_flutter_ios/GoogleMapPolylineController.h"
#import "./include/google_maps_flutter_ios/FLTGoogleMapJSONConversions.h"

@interface FLTGoogleMapPolylineController ()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module google_maps_flutter_ios {
umbrella header "google_maps_flutter_ios-umbrella.h"

export *
module * { export * }

explicit module Test {
header "./google_maps_flutter_ios/GoogleMapController_Test.h"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_ios
description: iOS implementation of the google_maps_flutter plugin.
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
version: 2.6.0
version: 2.6.1

environment:
sdk: ^3.2.3
Expand Down
2 changes: 1 addition & 1 deletion script/tool/lib/src/build_examples_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class BuildExamplesCommand extends PackageLoopingCommand {
'iOS',
pluginPlatform: platformIOS,
flutterBuildType: _flutterBuildTypeIOS,
extraBuildFlags: <String>['--no-codesign'],
extraBuildFlags: <String>['--no-codesign', '-v'],
),
platformLinux: const _PlatformDetails(
'Linux',
Expand Down
2 changes: 1 addition & 1 deletion script/tool/lib/src/drive_examples_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class DriveExamplesCommand extends PackageLoopingCommand {
_targetDeviceFlags = <String, List<String>>{
if (getBoolArg(platformAndroid))
platformAndroid: <String>['-d', androidDevice!],
if (getBoolArg(platformIOS)) platformIOS: <String>['-d', iOSDevice!],
if (getBoolArg(platformIOS)) platformIOS: <String>['-d', iOSDevice!, '-v'],
if (getBoolArg(platformLinux)) platformLinux: <String>['-d', 'linux'],
if (getBoolArg(platformMacOS)) platformMacOS: <String>['-d', 'macos'],
if (getBoolArg(platformWeb))
Expand Down