GMSPlacesErrors.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. //
  2. // GMSPlacesErrors.h
  3. // Google Places SDK for iOS
  4. //
  5. // Copyright 2016 Google LLC
  6. //
  7. // Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of
  8. // Service: https://developers.google.com/maps/terms
  9. //
  10. /**
  11. * \defgroup PlacesErrors GMSPlacesErrors
  12. * @{
  13. */
  14. #import <Foundation/Foundation.h>
  15. NS_ASSUME_NONNULL_BEGIN
  16. /**
  17. * Error domain used for Places SDK errors.
  18. */
  19. extern NSString *const kGMSPlacesErrorDomain;
  20. /**
  21. * Error codes for |kGMSPlacesErrorDomain|.
  22. */
  23. typedef NS_ENUM(NSInteger, GMSPlacesErrorCode) {
  24. /**
  25. * Something went wrong with the connection to the Places API server.
  26. */
  27. kGMSPlacesNetworkError = -1,
  28. /**
  29. * The Places API server returned a response that we couldn't understand.
  30. * <p>
  31. * If you believe this error represents a bug, please file a report using the instructions on our
  32. * <a href="https://developers.google.com/places/ios-sdk/support">community and support page</a>.
  33. */
  34. kGMSPlacesServerError = -2,
  35. /**
  36. * An internal error occurred in the Places SDK library.
  37. * <p>
  38. * If you believe this error represents a bug, please file a report using the instructions on our
  39. * <a href="https://developers.google.com/places/ios-sdk/support">community and support page</a>.
  40. */
  41. kGMSPlacesInternalError = -3,
  42. /**
  43. * Operation failed due to an invalid (malformed or missing) API key.
  44. * <p>
  45. * See the <a href="https://developers.google.com/places/ios-sdk/start">developer's guide</a>
  46. * for information on creating and using an API key.
  47. */
  48. kGMSPlacesKeyInvalid = -4,
  49. /**
  50. * Operation failed due to an expired API key.
  51. * <p>
  52. * See the <a href="https://developers.google.com/places/ios-sdk/start">developer's guide</a>
  53. * for information on creating and using an API key.
  54. */
  55. kGMSPlacesKeyExpired = -5,
  56. /**
  57. * Operation failed due to exceeding the quota usage limit.
  58. * <p>
  59. * See the <a href="https://developers.google.com/places/ios-sdk/usage">usage limits guide</a>
  60. * for information on usage limits and how to request a higher limit.
  61. */
  62. kGMSPlacesUsageLimitExceeded = -6,
  63. /**
  64. * Operation failed due to exceeding the usage rate limit for the API key.
  65. * <p>
  66. * This status code shouldn't be returned during normal usage of the API. It relates to usage of
  67. * the API that far exceeds normal request levels. See the <a
  68. * href="https://developers.google.com/places/ios-sdk/usage">usage limits guide</a> for more
  69. * information.
  70. */
  71. kGMSPlacesRateLimitExceeded = -7,
  72. /**
  73. * Operation failed due to exceeding the per-device usage rate limit.
  74. * <p>
  75. * This status code shouldn't be returned during normal usage of the API. It relates to usage of
  76. * the API that far exceeds normal request levels. See the <a
  77. * href="https://developers.google.com/places/ios-sdk/usage">usage limits guide</a> for more
  78. * information.
  79. */
  80. kGMSPlacesDeviceRateLimitExceeded = -8,
  81. /**
  82. * The Places API service for iOS is not enabled.
  83. * <p>
  84. * See the <a href="https://developers.google.com/places/ios-sdk/start">developer's guide</a>
  85. * to learn how to set up the Places SDK for iOS or the
  86. * <a href="https://developers.google.com/places/ios-sdk/client-migration">migration guide</a>
  87. * if you are migrating from an earlier version.
  88. */
  89. kGMSPlacesAccessNotConfigured = -9,
  90. /**
  91. * The application's bundle identifier does not match one of the allowed iOS applications for the
  92. * API key.
  93. * <p>
  94. * See the <a href="https://developers.google.com/places/ios-sdk/start">developer's guide</a>
  95. * for how to configure bundle restrictions on API keys.
  96. */
  97. kGMSPlacesIncorrectBundleIdentifier = -10,
  98. /**
  99. * The Places SDK could not find the user's location. This may be because the user has not allowed
  100. * the application to access location information.
  101. */
  102. kGMSPlacesLocationError = -11,
  103. /**
  104. * The Places SDK could not process the invalid request.
  105. * <p>
  106. * If you believe this error represents a bug, please file a report using the instructions on our
  107. * <a href="https://developers.google.com/places/ios-sdk/support">community and support page</a>.
  108. */
  109. kGMSPlacesInvalidRequest = -12
  110. };
  111. NS_ASSUME_NONNULL_END
  112. /**@}*/