GooglePlacesSwift Framework Reference

  • PlacesError is an enum representing various error types that can occur when using the Google Places SDK for iOS.

  • Errors can range from API key issues (expired, invalid, incorrect bundle ID), to rate limiting and network problems.

  • Location errors indicate the SDK couldn't find the user's location, possibly due to missing permissions.

  • Internal, invalid request, and server errors may indicate bugs and should be reported to Google.

  • Usage and rate limit errors suggest exceeding allowed API usage, requiring review of usage limits and potential quota increases.

PlacesError

enumPlacesError
extensionPlacesError:Equatable,Error,Hashable,Sendable

Places error types.

  • Returns a Boolean value indicating whether two values are equal.

    Equality is the inverse of inequality. For any valuesa andb,a == b implies thata != b isfalse.

    Declaration

    Swift

    staticfunc==(a:PlacesError,b:PlacesError)->Bool
  • The Places API service for iOS is not enabled.

    See thedeveloper’s guideto learn how to set up the Places SDK for iOS or themigration guideif you are migrating from an earlier version.

    Declaration

    Swift

    caseaccessNotConfigured(String)
  • Operation failed due to exceeding the per-device usage rate limit.

    This status code shouldn’t be returned during normal usage of the API. It relates to usage ofthe API that far exceeds normal request levels. See theusage limits guide for moreinformation.

    Declaration

    Swift

    casedeviceRateLimitExceeded(String)
  • Hashes the essential components of this value by feeding them into thegiven hasher.

    Implement this method to conform to theHashable protocol. Thecomponents used for hashing must be the same as the components comparedin your type’s== operator implementation. Callhasher.combine(_:)with each of these components.

    Important

    In your implementation ofhash(into:),don’t callfinalize() on thehasher instance provided,or replace it with a different instance.Doing so may become a compile-time error in the future.

    Declaration

    Swift

    funchash(intohasher:inoutHasher)
  • The hash value.

    Hash values are not guaranteed to be equal across different executions ofyour program. Do not save hash values to use during a future execution.

    Important

    hashValue is deprecated as aHashable requirement. Toconform toHashable, implement thehash(into:) requirement instead.The compiler provides an implementation forhashValue for you.

    Declaration

    Swift

    varhashValue:Int{get}
  • The application’s bundle identifier does not match one of the allowed iOS applications for theAPI key.

    See thedeveloper’s guidefor how to configure bundle restrictions on API keys.

    Declaration

    Swift

    caseincorrectBundleIdentifier(String)
  • An internal error occurred in the Places SDK library.

    If you believe this error represents a bug, please file a report using the instructions on ourcommunity and support page.

    Declaration

    Swift

    case`internal`(String)
  • The Places SDK could not process the invalid request.

    If you believe this error represents a bug, please file a report using the instructions on ourcommunity and support page.

    Declaration

    Swift

    caseinvalidRequest(String)
  • Operation failed due to an expired API key.

    See thedeveloper’s guidefor information on creating and using an API key.

    Declaration

    Swift

    casekeyExpired(String)
  • Operation failed due to an invalid (malformed or missing) API key.

    See thedeveloper’s guidefor information on creating and using an API key.

    Declaration

    Swift

    casekeyInvalid(String)
  • Retrieve the localized description for this error.

    Declaration

    Swift

    varlocalizedDescription:String{get}
  • The Places SDK could not find the user’s location. This may be because the user has notallowed the application to access location information.

    Declaration

    Swift

    caselocation(String)
  • Something went wrong with the connection to the Places API server.

    Declaration

    Swift

    casenetwork(String)
  • Operation failed due to exceeding the usage rate limit for the API key.

    This status code shouldn’t be returned during normal usage of the API. It relates to usage ofthe API that far exceeds normal request levels. See theusage limits guide for moreinformation.

    Declaration

    Swift

    caserateLimitExceeded(String)
  • The Places API server returned a response that we couldn’t understand.

    If you believe this error represents a bug, please file a report using the instructions on ourcommunity and support page.

    Declaration

    Swift

    caseserver(String)
  • Operation failed due to exceeding the quota usage limit.

    See theusage limits guidefor information on usage limits and how to request a higher limit.

    Declaration

    Swift

    caseusageLimitExceeded(String)

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-27 UTC.