karhm
(Karim)
1
If you are looking to adopt Swift Package Manager and Google Maps iOS SDK is holding you back. Then there is a solution now.
1 Like
fassko
(Kristaps Grinbergs)
2
You can add it to this nice SwiftPM index site https://swiftpackageindex.com/ 
3 Likes
gallaugher
(John Gallaugher)
3
It's unclear how to use this. The package doesn't seem to install with the simple File > New Package > paste in the git URL. It also says it needs Carthage. Does anyone have instructions for this? I want to use GooglePlaces Autocomplete with my students & in each class there are ALWAYS students that have issues with Cocoapods, so I'm hoping package manager works.
millman
(Tim Miller)
4
Select the project in Xcode and the Select Swift Packages or navigate to File > Swift Packages > Add Package Dependency...
Enter the URL: GitHub - YAtechnologies/GoogleMaps-SP: Swift Package for Google Maps iOS SDK
Click Next and then use the default options.
karhm
(Karim)
5
Carthage is needed to create your private version of the package and not to use it.
mickeyl
(Dr. Mickey Lauer)
6
Awesome. Any chance for Google Places and Google Maps Utilities getting the same treatment?
bdrelling
(Brian Drelling)
7
Did you check the package listing in the repo? It may already include what you're looking for.
The Utilities library is also already in SPM, officially it seems: GitHub - googlemaps/google-maps-ios-utils: Google Maps SDK for iOS Utility Library
iosdevben
(Ben Thomas)
8
Sadly this solution is not workable as the maintainer has not updated it in over 6 months. It integrates Google Maps 6.0.0, but Google have released 6.2.1.
eimantas
(Eimantas)
9
It's quite easy to create your own wrapper package that contains google's xcframeworks and update it whenever google releases new versions.
iosdevben
(Ben Thomas)
10
Unless I'm mistaken, Google Maps is only released as a binary, not xcframework. Can you create a wrapper package with a binary?
eimantas
(Eimantas)
11
Google Maps are distributed as xcframeworks alongside Carthage and Cocoapods for manual installation.
iosdevben
(Ben Thomas)
12
Thanks @eimantas. Today I learned. 
1 Like
weird why googlt hasnt done anything to make it accessible in spm. while google maps util does
karhm
(Karim)
14
Good news everybody the library is up to date now 
karhm
(Karim)
15
Google Places has been always supported. Is Google Maps SDK for iOS Utility Library what you meant with Google Maps Utilities?
Ade
(Ade Adegoke)
17
@karhm Hi karhm, How asre you? I am really trying to learn how to Create a Swift Package Manager that wraps an XCFramework like what you have done for Google Maps iOS SDK. I would really appreciate it if you can show me, please. thanks
It seems Google has heard our requests and created an SPM version of their SDKs: https://cloud.google.com/blog/products/maps-platform/google-maps-platform-sdks-for-ios-now-available-through-swift-package-manager
It does not compile in my project, though... Hopefully they will fix it soon.
1 Like