Google Maps Platform
Reduce Deprecation Stress: Understand SDK Dependencies in Google Maps Platform
To improve Google Maps Platform for developers and end users, sometimes we need to deprecate existing functionality. For example, last year when many establishments closed temporarily to limit the spread of COVID-19, we introduced the
business_status field to describe a place's status in a non-binary way and deprecated the
permanently_closed field because it cannot accurately describe a place that is temporarily closed.
We try to minimize deprecations because we recognize that changing your production code can be stressful. When you receive a communication about a deprecation that may affect your project, understanding how Google Maps Platform deprecations work can help you decide when to take action.
Deprecation vs decommissioning
First, let's take a look at definitions for two terms that are often confused in software discussions.
- deprecated: It is recommended to stop using this. Reasons to stop may include a better alternative or a planned decommissioning.
- decommissioned: Something that was once available is no longer available or supported. Calling decommissioned software can result in unpredictable behavior or invalid responses.
Deprecations in SDKs: how they're different from API deprecations
In SDKs, there are two levels of deprecation: version deprecation and feature deprecation. When a version of the SDK is deprecated, it will soon be decommissioned. Building with a dependency on a decommissioned SDK version may cause errors or crashes, so when you see a notice that an SDK version is deprecated, please make time to migrate to a newer version—ideally, the latest available version.
The two diagrams below illustrate two stages of feature deprecation. First, a new major version is introduced that does not include the deprecated feature. You can still use the deprecated feature by specifying an older version in your dependencies. However, you will not be able to use any features that are exclusively available in the newer version until you remove use of the deprecated feature from your code and update your dependency to the new version.
Once the last version that supports the deprecated feature is itself decommissioned, there are no more versions that support the feature and any continued use of the feature is not guaranteed to work.
Learn more about the nuances of deprecations in APIs and SDKs in our deprecations documentation, which also lists all active deprecations.
How to manage SDK dependencies
For developers using Google Maps Platform mobile SDKs (Maps and Places SDKs for Android, Maps and Places SDKs for iOS), managing your dependency versions can help you schedule deprecation migration changes according to your app development cycle instead of as a rushed fix before a deadline.
For mobile SDKs, it's best to specify an exact version number in your app's dependencies. We've added documentation for how to manage your SDK dependencies for Maps SDK for Android, Places SDK for Android, Maps SDK for iOS, and Places SDK for iOS.
You choose when to update code
The final step is to schedule code maintenance regularly in your development cycle, so that you can minimize technical debt and enjoy the latest improvements in the SDKs. The release notes and mandatory service announcements point to migration guides or provide workarounds for deprecated features in order to minimize the effort needed to update your code.
For more information on Google Maps Platform, visit our website.