Choose your SDK version

The Places SDK for iOS features that are available in your app are determined by a combination of the SDK version number (e.g. 9.0.0) that you specify in your package dependencies and the APIs enabled on your API key. This guide explains the differences between versions and how to select which versions are enabled in your app.

SDK version numbers

The version number of the SDK that you specify in your package dependencies determines whether your app has access to features that were added in a particular release. For example, Autocomplete (New) is only available in SDK version 9.0.0 or greater.

For more information on changes introduced in each SDK version, see the Places SDK for iOS release notes.

Places API versions for the Places SDK for iOS

In addition to specifying a SDK version number, you must also select the Places API service that the SDK calls in the Google Cloud Console: either Places API or Places API (New). Together with the SDK version number, the API service that you select determines which version of specific features are available in your app, such as Autocomplete or Autocomplete (New). While you can only specify one SDK version number, you can enable both the Places API and Places API (New) on your API key at the same time. However, in most cases, you will want to enable the Places API (New) and use the (New) versions of the SDK features in your app.

Select your SDK version and API services

To select which SDK features are available in your app, do the following:

  1. In your Google Cloud project, enable the Places API, Places API (New), or both. For more information, see Enable APIs
  2. In your API key restrictions, enable the Places API, Places API (New), or both. For more information, see Restricting API keys.
  3. When you install the SDK, specify the version number. For more information, see Set up an Xcode project.

For more information on selecting the Places API service, see Set up your Google Cloud project.

SDK features available in each version

The following table shows which SDK and API versions are required for each SDK feature:

Places SDK for iOS (New) Minimum SDK Version Places SDK for iOS Minimum SDK Version
Place Details (New) 9.0.0 Place Details 3.0.0
Place Photo (New) 9.0.0 Place Photo 3.0.0
Text Search (New) 8.5.0
Nearby Search (New) 9.0.0
Autocomplete (New) 9.0.0 Autocomplete 3.0.0
Current Place 3.0.0

Considerations for choosing which versions to enable

  • If you are a new customer just getting started with Places SDK for iOS, then start with Places API (New) and the new SDK.
  • If you are an existing customer, you can continue using the existing SDK. However, to take advantage of the performance improvements and feature enhancements of the Places SDK for iOS (New), you should enable Places API (New) and use the new SDK. There is no migration necessary when moving to the new SDK, just follow the steps in Select your SDK version and API services.
  • Places API (New) does not enable some existing features such as Current Place, GMSPlace.isOpen and GMSPlaceisOpenAtDate.

Use Places Swift SDK for iOS (Preview)

The following steps are required to use Places Swift SDK for iOS (Preview):

  1. Enable the Places API (New).
  2. Add the Places Swift SDK for iOS (Preview) to your dependencies.
  3. Initialize the Places client with PlacesClient.

To learn more about Places Swift SDK for iOS (Preview), review the overview or migration guide.

Migrate to the new APIs

If you are using an existing API and want to migrate to the new API, see the following migration guides for each API:

Enhancements in Places SDK for iOS (New)

This section covers key features added to Places SDK for iOS (New).

Implemented on the Google Cloud standard platform

Places SDK for iOS (New) is implemented on the service infrastructure on Google Cloud. This implementation brings a more secure and trusted platform. This standard design brings a level of consistency across the SDKs that improve the efficiency of development with Places SDK for iOS (New).

Improved performance

Places SDK for iOS (New) provides improved performance, making it worthwhile to replace apps that use the existing SDK.

New features

The Places SDK for iOS (New) includes the latest versions of all of the SDK features:

Simplified pricing

Pricing is simplified with Places SDK for iOS (New) so that you only pay for the data you use. Simplified pricing is implemented using field lists, also called field masks.

With Places SDK for iOS and Text Search you use field lists to control the list of fields to return in the response. You are then only billed for the data requested. Using a field list is a good design practice to ensure that you don't request unnecessary data, which helps to avoid unnecessary processing time and billing charges.

For detailed pricing information for both SDKs, see Usage and Billing.

Expanded place types

The new SDK adds the place types shown in the following table. These types are returned as part of the Place Details and Text Search response. You can also use these new types, and the existing types, in a search with Text Search. The new types are included in Table A.

Type
american_restaurant discount_store ice_cream_shop sandwich_shop
amusement_center dog_park indian_restaurant school_district
athletic_field electric_vehicle_charging_station indonesian_restaurant seafood_restaurant
auto_parts_store event_venue italian_restaurant ski_resort
banquet_hall extended_stay_hotel japanese_restaurant spanish_restaurant
barbecue_restaurant farm korean_restaurant sporting_goods_store
barber_shop farmstay lebanese_restaurant sports_club
bed_and_breakfast fast_food_restaurant marina sports_complex
brazilian_restaurant ferry_terminal market steak_house
breakfast_restaurant fitness_center medical_lab sushi_restaurant
brunch_restaurant french_restaurant mediterranean_restaurant swimming_pool
bus_stop gift_shop mexican_restaurant tailor
camping_cabin golf_course middle_eastern_restaurant telecommunications_service_provider
cell_phone_store greek_restaurant motel thai_restaurant
child_care_agency grocery_store national_park transit_depot
chinese_restaurant guest_house park_and_ride truck_stop
coffee_shop hair_salon performing_arts_theater turkish_restaurant
community_center hamburger_restaurant pizza_restaurant vegan_restaurant
consultant heliport playground vegetarian_restaurant
convention_center hiking_area preschool vietnamese_restaurant
cottage historical_landmark private_guest_room visitor_center
courier_service home_improvement_store ramen_restaurant wedding_venue
cultural_center hostel resort_hotel wholesaler
dental_clinic hotel rest_stop

Along with these new types, the Places API (New) moved the following types from Table 2 for the Places API to Table A for the Places API (New). That means you can now use these types as part of a search:

  • country
  • administrative_area_level_1
  • administrative_area_level_2
  • postal_code
  • locality