Skip to main content

Google announces version 6.0 of the Maps and Places SDKs for iOS

By December 14, 2021Blog, Google Maps

Last week, Google team released new versions of the Maps and Places SDKs for iOS. Version 6.0 helps to accelerate developer work by expanding supported iOS versions to iOS 12. Additionally, it provides preview support for XCFrameworks containing the binaries for developing on iOS 14+ simulators on Apple M1 chips. The new version also adds a new feature related to the way the markers animate when added to the map.

Fade in marker animation

Google introduces the new GMSMarkerAnimation type called kGMSMarkerAnimationFadeIn. It’s used for animating the appearance of a marker when you add it to the map.

MarkersViewController presented in the sample app

To use this new animation type, set the appearAnimation property before adding it to the map.

In the Swift programming language:

let position = CLLocationCoordinate2D(latitude: -33.86, longitude: 151.2)
let marker = GMSMarker(position: position)
marker.appearAnimation = .fadeIn

In the Objective-C programming language:

CLLocationCoordinate2D position = CLLocationCoordinate2DMake(-33.86, 151.2);
GMSMarker *marker = [GMSMarker markerwithPosition:position];
marker.appearAnimation = kGMSMarkerAnimationFadeIn;

XCFramework support

Before, the Maps and Places SDKs for iOS shipped as a single .framework file that would contain architectures needed for developing and releasing your app. With the new Apple M1 chips there’s been a need for repackaging the SDKs into the new XCFramework format.

If you’ve tried to use previous versions of Google’s SDK on Apple M1 machines, you might recognize this error:

ld: building for iOS Simulator, but linking in object file built for iOS, 
file '[...]/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps for 
architecture arm64

Google now shares beta support for XCFrameworks solving the error above. To learn how to use this, refer to Google’s Getting Started guides for Maps and Places.

Google recommends using XCFrameworks versions of the Maps and Places SDKs only for development purposes since they are still in beta phase. Rely on the .framework version when you release your app. Google announced that a future version of the SDKs will make XCFramework support generally available.

Install version 6.0 today!

You can install the new version of Maps and Places SDKs for iOS through CocoaPods or Carthage. To install the preview XCFrameworks versions of the SDKs, see the “Installing the XCFramework” tab in the links above. Developing with version 6.0 requires using Xcode 12 or above as the minimum supported iOS version is iOS 12. Google has frozen support for iOS 11 and it’s only available through specifying older supported versions of the Maps and Places SDKs for iOS.

If you need more info or support using the new version, contact us! Our Google team will be happy to assist you.