Skip to content
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

[google_maps_flutter_ios]: Add swift package manager compatibility #8288

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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,5 +1,6 @@
## NEXT
## 2.14.0

* Adds Swift Package Manager compatibility.
* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.

## 2.13.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,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 @@ -3,12 +3,13 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 60;
objects = {

/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
5276B9112D0C699A009C4BA0 /* OCMock in Frameworks */ = {isa = PBXBuildFile; productRef = 5276B9102D0C699A009C4BA0 /* OCMock */; };
5B5EF9A6C72A03092BDA553E /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28D4666EF03E57DB7D03E916 /* Pods_RunnerTests.framework */; };
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
Expand Down Expand Up @@ -88,6 +89,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5276B9112D0C699A009C4BA0 /* OCMock in Frameworks */,
5B5EF9A6C72A03092BDA553E /* Pods_RunnerTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -198,6 +200,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
BB6BD9A1101E970BEF85B6D2 /* [CP] Copy Pods Resources */,
A89AF444D8C8FFBE1C95B3BF /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand All @@ -219,7 +222,6 @@
F7151F0C265D7ED70028CB91 /* Sources */,
F7151F0D265D7ED70028CB91 /* Frameworks */,
F7151F0E265D7ED70028CB91 /* Resources */,
7862D82E36C37F9B7558DA5E /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -260,7 +262,8 @@
);
mainGroup = 97C146E51CF9000F007C117D;
packageReferences = (
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
5276B90F2D0C699A009C4BA0 /* XCRemoteSwiftPackageReference "ocmock" */,
);
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -329,38 +332,38 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
7862D82E36C37F9B7558DA5E /* [CP] Embed Pods Frameworks */ = {
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework",
);
name = "[CP] Embed Pods Frameworks";
name = "Run Script";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
A89AF444D8C8FFBE1C95B3BF /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/integration_test/integration_test.framework",
);
name = "Run Script";
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/integration_test.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
BB6BD9A1101E970BEF85B6D2 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -685,13 +688,29 @@
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCRemoteSwiftPackageReference section */
5276B90F2D0C699A009C4BA0 /* XCRemoteSwiftPackageReference "ocmock" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "http://github.com/erikdoe/ocmock";
requirement = {
kind = revision;
revision = fe1661a3efed11831a6452f4b1a0c5e6ddc08c3d;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
5276B9102D0C699A009C4BA0 /* OCMock */ = {
isa = XCSwiftPackageProductDependency;
package = 5276B90F2D0C699A009C4BA0 /* XCRemoteSwiftPackageReference "ocmock" */;
productName = OCMock;
};
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
isa = XCSwiftPackageProductDependency;
productName = FlutterGeneratedPluginSwiftPackage;
Expand Down
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 @@ -36,6 +36,7 @@ Downloaded by pub (not CocoaPods).
s.xcconfig = {
'LIBRARY_SEARCH_PATHS' => '$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)/ $(SDKROOT)/usr/lib/swift',
'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) /usr/lib/swift',
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) FGM_USING_COCOAPODS=1'
}
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,44 @@
// 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", .upToNextMajor(from: "9.0.0")),
.package(url: "https://github.com/googlemaps/google-maps-ios-utils", .upToNextMajor(from: "6.1.0")),
],
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")
]
)
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@

#import "FLTGoogleMapHeatmapController.h"
#import "FLTGoogleMapJSONConversions.h"

/// If Swift Package Manager is in use, Objective-C headers are available under the
/// GoogleMapsUtilsObjC package. When using CocoaPods, the headers are provided by the
/// GoogleMapsUtils package.
#ifdef FGM_USING_COCOAPODS
@import GoogleMapsUtils;
#else
@import GoogleMapsUtilsObjC;
#endif

@interface FLTGoogleMapHeatmapController ()

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

/// If Swift Package Manager is in use, Objective-C headers are available under the
/// GoogleMapsUtilsObjC package. When using CocoaPods, the headers are provided by the
/// GoogleMapsUtils package.
#ifdef FGM_USING_COCOAPODS
@import GoogleMapsUtils;
#else
@import GoogleMapsUtilsObjC;
#endif

#import "GoogleMapController.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@

#import <Flutter/Flutter.h>
#import <GoogleMaps/GoogleMaps.h>

/// If Swift Package Manager is in use, Objective-C headers are available under the
/// GoogleMapsUtilsObjC package. When using CocoaPods, the headers are provided by the
/// GoogleMapsUtils package.
#ifdef FGM_USING_COCOAPODS
@import GoogleMapsUtils;
#else
@import GoogleMapsUtilsObjC;
#endif

#import "messages.g.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@

#import <Flutter/Flutter.h>
#import <GoogleMaps/GoogleMaps.h>

/// If Swift Package Manager is in use, Objective-C headers are available under the
/// GoogleMapsUtilsObjC package. When using CocoaPods, the headers are provided by the
/// GoogleMapsUtils package.
#ifdef FGM_USING_COCOAPODS
@import GoogleMapsUtils;
#else
@import GoogleMapsUtilsObjC;
#endif

#import "messages.g.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
#import <Flutter/Flutter.h>
#import <Foundation/Foundation.h>
#import <GoogleMaps/GoogleMaps.h>

/// If Swift Package Manager is in use, Objective-C headers are available under the
/// GoogleMapsUtilsObjC package. When using CocoaPods, the headers are provided by the
/// GoogleMapsUtils package.
#ifdef FGM_USING_COCOAPODS
@import GoogleMapsUtils;
#else
@import GoogleMapsUtilsObjC;
#endif

#import "messages.g.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import 'package:pigeon/pigeon.dart';

@ConfigurePigeon(PigeonOptions(
dartOut: 'lib/src/messages.g.dart',
objcHeaderOut: 'ios/Classes/messages.g.h',
objcSourceOut: 'ios/Classes/messages.g.m',
objcHeaderOut:
'ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/messages.g.h',
objcSourceOut:
'ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/messages.g.m',
objcOptions: ObjcOptions(prefix: 'FGM'),
copyrightHeader: 'pigeons/copyright.txt',
))
Expand Down
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.13.2
version: 2.14.0

environment:
sdk: ^3.4.0
Expand Down
Loading