Provides the shared instance of GMSServices for the Google Maps SDK for iOS, creating it if
necessary. Classes such as GMSMapView and GMSPanoramaView will hold this instance to provide
their connection to Google.
This is an opaque object. If your application often creates and destroys view or service classes
provided by the Google Maps SDK for iOS, it may be useful to hold onto this object directly, as
otherwise your connection to Google may be restarted on a regular basis. It also may be useful to
take this object in advance of the first map creation, to reduce initial map creation performance
cost.
This method will throw an exception if +provideAPIKey: has not been called.
Provides your API key to the Google Maps SDK for iOS. This key is generated for your application
via the Google Cloud Platform Console, and is paired with your application’s bundle ID to
identify it. This must be called exactly once by your application before any iOS Maps SDK
object is initialized.
Enables reporting of abnormal SDK terminations such as the app crashes while the SDK is still
running. This allows Google to improve SDK stability when applicable. The default is YES and
value must be updated before the services instance is initialized.
Adds a usage attribution ID to the initializer, which helps Google understand which libraries and
samples are helpful to developers, such as usage of a marker clustering library.
To opt out of sending the usage attribution ID, it is safe to delete this function call or
replace the value with an empty string.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSServices\u003c/code\u003e is a service class for the Google Maps SDK for iOS, responsible for providing a connection to Google for map-related classes.\u003c/p\u003e\n"],["\u003cp\u003eIt's crucial to provide your API key using \u003ccode\u003eprovideAPIKey:\u003c/code\u003e before initializing any iOS Maps SDK objects.\u003c/p\u003e\n"],["\u003cp\u003eYou can optionally provide API options and enable abnormal termination reporting using dedicated methods.\u003c/p\u003e\n"],["\u003cp\u003eAccess open source license information and SDK version details through the provided methods.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esetMetalRendererEnabled:\u003c/code\u003e is deprecated as Metal is now the default renderer.\u003c/p\u003e\n"]]],[],null,["GMSServices \n\n @interface GMSServices : NSObject\n\nService class for the Google Maps SDK for iOS.\n\nThis class is not thread safe. All methods should only be invoked on the main thread.\n- `\n ``\n ``\n `\n\n [+sharedServices](#/c:objc(cs)GMSServices(cm)sharedServices)`\n ` \n Provides the shared instance of `GMSServices` for the Google Maps SDK for iOS, creating it if\n necessary. Classes such as [GMSMapView](../Classes/GMSMapView.html) and [GMSPanoramaView](../Classes/GMSPanoramaView.html) will hold this instance to provide\n their connection to Google.\n\n This is an opaque object. If your application often creates and destroys view or service classes\n provided by the Google Maps SDK for iOS, it may be useful to hold onto this object directly, as\n otherwise your connection to Google may be restarted on a regular basis. It also may be useful to\n take this object in advance of the first map creation, to reduce initial map creation performance\n cost.\n\n This method will throw an exception if [+provideAPIKey:](../Classes/GMSServices.html#/c:objc(cs)GMSServices(cm)provideAPIKey:) has not been called. \n\n Declaration \n Swift \n\n class func sharedServices() -\u003e any NSObjectProtocol\n\n Objective-C \n\n + (nonnull id\u003cNSObject\u003e)sharedServices;\n\n- `\n ``\n ``\n `\n\n [+provideAPIKey:](#/c:objc(cs)GMSServices(cm)provideAPIKey:)`\n ` \n Provides your API key to the Google Maps SDK for iOS. This key is generated for your application\n via the Google Cloud Platform Console, and is paired with your application's bundle ID to\n identify it. This must be called exactly once by your application before any iOS Maps SDK\n object is initialized. \n\n Declaration \n Swift \n\n class func provideAPIKey(_ APIKey: String) -\u003e Bool\n\n Objective-C \n\n + (BOOL)provideAPIKey:(nonnull NSString *)APIKey;\n\n Return Value\n\n `YES` if the APIKey was successfully provided.\n- `\n ``\n ``\n `\n\n [+provideAPIOptions:](#/c:objc(cs)GMSServices(cm)provideAPIOptions:)`\n ` \n Provides your API options to the Google Maps SDK for iOS. Pass an array containing an NSString\n for each option. These options apply to all maps.\n\n This may be called exactly once by your application and must be called before any iOS Maps SDK\n object is initialized. \n\n Declaration \n Swift \n\n class func provideAPIOptions(_ APIOptions: [String]) -\u003e Bool\n\n Objective-C \n\n + (BOOL)provideAPIOptions:(nonnull NSArray\u003cNSString *\u003e *)APIOptions;\n\n Return Value\n\n `YES` if all the APIOptions were successfully provided.\n- `\n ``\n ``\n `\n\n [+setAbnormalTerminationReportingEnabled:](#/c:objc(cs)GMSServices(cm)setAbnormalTerminationReportingEnabled:)`\n ` \n Enables reporting of abnormal SDK terminations such as the app crashes while the SDK is still\n running. This allows Google to improve SDK stability when applicable. The default is `YES` and\n value must be updated before the services instance is initialized.\n\n This property must be set from the main thread. \n\n Declaration \n Swift \n\n class func setAbnormalTerminationReportingEnabled(_ enabled: Bool)\n\n Objective-C \n\n + (void)setAbnormalTerminationReportingEnabled:(BOOL)enabled;\n\n- `\n ``\n ``\n `\n\n [+openSourceLicenseInfo](#/c:objc(cs)GMSServices(cm)openSourceLicenseInfo)`\n ` \n Returns the open source software license information for Google Maps SDK for iOS. This\n information must be made available within your application. \n\n Declaration \n Swift \n\n class func openSourceLicenseInfo() -\u003e String\n\n Objective-C \n\n + (nonnull NSString *)openSourceLicenseInfo;\n\n- `\n ``\n ``\n `\n\n [+SDKVersion](#/c:objc(cs)GMSServices(cm)SDKVersion)`\n ` \n Returns the version for this release of the Google Maps SDK for iOS. For example, \"1.0.0\". \n\n Declaration \n Swift \n\n class func sdkVersion() -\u003e String\n\n Objective-C \n\n + (nonnull NSString *)SDKVersion;\n\n- `\n ``\n ``\n `\n\n [+SDKLongVersion](#/c:objc(cs)GMSServices(cm)SDKLongVersion)`\n ` \n Returns the long version for this release of the Google Maps SDK for iOS. For example, \"1.0.0\n (102.1)\". \n\n Declaration \n Swift \n\n class func sdkLongVersion() -\u003e String\n\n Objective-C \n\n + (nonnull NSString *)SDKLongVersion;\n\n- `\n ``\n ``\n `\n\n [+addInternalUsageAttributionID:](#/c:objc(cs)GMSServices(cm)addInternalUsageAttributionID:)`\n ` \n Adds a usage attribution ID to the initializer, which helps Google understand which libraries and\n samples are helpful to developers, such as usage of a marker clustering library.\n To opt out of sending the usage attribution ID, it is safe to delete this function call or\n replace the value with an empty string. \n\n Declaration \n Swift \n\n class func addInternalUsageAttributionID(_ internalUsageAttributionID: String)\n\n Objective-C \n\n + (void)addInternalUsageAttributionID:\n (nonnull NSString *)internalUsageAttributionID;\n\n Parameters\n\n |------------------------------------|---------------------------------|\n | ` `*internalUsageAttributionID*` ` | The usage attribution ID to add |"]]