Stay organized with collections
Save and categorize content based on your preferences.
Combine is a
framework for handling asynchronous events by combining event-processing operators.
Combine makes your code easier to read and maintain by centralizing your event-processing code.
The GoogleMapsPlatformCombine library
is a Swift library that returns
Publishers
for the Maps SDK for iOS and Places SDK for iOS so that you can take advantage
of the rich set of Combine features.
[[["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-08-28 UTC."],[[["\u003cp\u003eThe GoogleMapsPlatformCombine library provides a way to use the Maps SDK for iOS and Places SDK for iOS with Apple's Combine framework for asynchronous event handling.\u003c/p\u003e\n"],["\u003cp\u003eThis library offers extensions, like \u003ccode\u003efetchPlace\u003c/code\u003e, to classes such as \u003ccode\u003eGMSPlacesClient\u003c/code\u003e, returning \u003ccode\u003eFuture\u003c/code\u003e publishers for streamlined Places API calls.\u003c/p\u003e\n"],["\u003cp\u003eUsing Combine's features with the Google Maps Platform can significantly enhance code readability and maintainability by centralizing event processing.\u003c/p\u003e\n"],["\u003cp\u003eInstallation instructions and the latest system requirements for the GoogleMapsPlatformCombine library are available on its GitHub page.\u003c/p\u003e\n"]]],[],null,["# Combine Library\n\n[Combine](https://developer.apple.com/documentation/combine) is a\nframework for handling asynchronous events by combining event-processing operators.\nCombine makes your code easier to read and maintain by centralizing your event-processing code.\n\nThe [GoogleMapsPlatformCombine library](https://github.com/googlemaps/ios-combine)\nis a Swift library that returns\n[`Publishers`](https://developer.apple.com/documentation/combine/publisher)\nfor the Maps SDK for iOS and Places SDK for iOS so that you can take advantage\nof the rich set of Combine features.\n\nInstallation\n------------\n\nSee the [GoogleMapsPlatformCombine library](https://github.com/googlemaps/ios-combine) documentation on GitHub for the latest system requirements and installation instructions.\n\n\u003cbr /\u003e\n\nExample Usage\n-------------\n\nThe GoogleMapsPlatformCombine library provides extensions to the\n[`GMSPlacesClient`](https://github.com/googlemaps/ios-combine/blob/main/Sources/Places/GMSPlacesClient%2BCombine.swift) class which return\n[`Future`](https://developer.apple.com/documentation/combine/future)\npublishers for Places API calls.\n\nThe following example uses the `fetchPlace(id:, fields:, sessionToken:) -\u003e Future\u003cGMSPlace, Error\u003e`\nextension to fetch place details: \n\n```yaml\nGMSPlacesClient.shared()\n .fetchPlace(\n id: \"placeId\",\n fields: [.placeID, .name, .phoneNumber]\n )\n .sink { completion in\n print(\"Completion \\(completion)\")\n } receiveValue: { place in\n print(\"Got place \\(place.name ?? \"\")\")\n }\n```\n\nWhat's next\n-----------\n\n- View the [Combine library](https://github.com/googlemaps/ios-combine) GitHub project page."]]