If you are looking to adopt Swift Package Manager and Google Maps iOS SDK is holding you back. Then there is a solution now.
You can add it to this nice SwiftPM index site https://swiftpackageindex.com/
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.
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.
Carthage is needed to create your private version of the package and not to use it.
Awesome. Any chance for Google Places and Google Maps Utilities getting the same treatment?
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
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.
It's quite easy to create your own wrapper package that contains google's xcframeworks and update it whenever google releases new versions.
Unless I'm mistaken, Google Maps is only released as a binary, not xcframework. Can you create a wrapper package with a binary?
Google Maps are distributed as xcframeworks alongside Carthage and Cocoapods for manual installation.
Thanks @eimantas. Today I learned.
weird why googlt hasnt done anything to make it accessible in spm. while google maps util does
Good news everybody the library is up to date now
Google Places has been always supported. Is Google Maps SDK for iOS Utility Library what you meant with Google Maps Utilities?
Check release 6.2.1.
@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.