I would say that your problem is the ExtendedMarker type for the second parameter. Having adopted the protocol, your promises class, which, if it implements the optional mapView:didTapMarker: method, the second parameter can be GMSMarker or any subclass of it.
Your method does not satisfy the interface contract because it only accepts ExtendedMarker instances - which I consider to be a subclass of GMSMarker .
I would define a method something like this. You should be prepared to deal with the Extended ExtendedMarker instances that are being transferred because the contract says you can receive them. Just trying to force a throw can throw an exception.
func mapView(mapView: GMSMapView!, didTapMarker marker: GMSMarker!) -> Bool { // Non specific ExtendedMarker processing if let marker = marker as? ExtendedMarker { // ExtendedMarker specific processing } // More non specific ExtendedMarker processing }
source share