Skip to content

googlemaps/ios-combine

Run unit tests pod Apache-2.0

GoogleMapsPlatformCombine

Description

A Swift ilbrary containing Combine support, via Publisher and Future, for Google Maps Platform iOS SDKs.

Example

Example Usage

// Create a GMSMapViewPublisher
let publisher = GMSMapViewPublisher(mapView: mapView)

// Subscribe to events
publisher.didChangeCameraPosition.sink { cameraPosition in
  print("Camera position at \(cameraPosition.target)")
}

Example Project

To run the example project:

  1. Run pod install from the Example/ directory.
  2. Open the GoogleMapsPlatformCombine.xcworkspace file in Xcode

Requirements

  • Deployment Target of iOS 13.0+

Installation

In your Podfile:

pod 'GoogleMapsPlatformCombine', '0.3.1'

Subspecs are also available if you only need Combine support for a specific SDK:

# For Combine support for the Maps SDK for iOS only
pod 'GoogleMapsPlatformCombine/Maps', '0.3.1'

# For Combine support for the Places SDK for iOS only
pod 'GoogleMapsPlatformCombine/Places', '0.3.1'

Since the Maps/Places SDKs for iOS are not yet supported in SPM, if you install this library via SPM you will need to also install Maps/Places using one of the supported package managers. See installation options for Maps and Places for more information.

Support

Encounter an issue while using this library?

If you find a bug or have a feature request, please file an issue. Or, if you'd like to contribute, please refer to our contributing guide and our code of conduct.

You can also reach us on our Discord channel.

For more information, check out the detailed guide on the Google Developers site.