GMSServices.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // GMSServices.h
  3. // Google Maps SDK for iOS
  4. //
  5. // Copyright 2012 Google Inc.
  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. #if __has_feature(modules)
  11. @import GoogleMapsBase;
  12. #else
  13. #import <GoogleMapsBase/GoogleMapsBase.h>
  14. #endif
  15. GMS_ASSUME_NONNULL_BEGIN
  16. /** Service class for the Google Maps SDK for iOS. */
  17. @interface GMSServices : NSObject
  18. /**
  19. * Provides the shared instance of GMSServices for the Google Maps SDK for iOS,
  20. * creating it if necessary. Classes such as GMSMapView and GMSPanoramaView will
  21. * hold this instance to provide their connection to Google.
  22. *
  23. * This is an opaque object. If your application often creates and destroys view
  24. * or service classes provided by the Google Maps SDK for iOS, it may be useful
  25. * to hold onto this object directly, as otherwise your connection to Google
  26. * may be restarted on a regular basis. It also may be useful to take this
  27. * object in advance of the first map creation, to reduce initial map creation
  28. * performance cost.
  29. *
  30. * This method will throw an exception if provideAPIKey: has not been called.
  31. */
  32. + (id<NSObject>)sharedServices;
  33. /**
  34. * Provides your API key to the Google Maps SDK for iOS. This key is generated
  35. * for your application via the Google APIs Console, and is paired with your
  36. * application's bundle ID to identify it. This must be called exactly once
  37. * by your application before any iOS Maps SDK object is initialized.
  38. *
  39. * @return YES if the APIKey was successfully provided
  40. */
  41. + (BOOL)provideAPIKey:(NSString *)APIKey;
  42. /**
  43. * Returns the open source software license information for Google Maps SDK for
  44. * iOS. This information must be made available within your application.
  45. */
  46. + (NSString *)openSourceLicenseInfo;
  47. /**
  48. * Returns the version for this release of the Google Maps SDK for iOS.
  49. */
  50. + (NSString *)SDKVersion;
  51. @end
  52. GMS_ASSUME_NONNULL_END