Skip to content

Fix CLLocationManager extension example#1208

Merged
kzaher merged 2 commits intoReactiveX:developfrom
phlippieb:fix/location_extension_example
Apr 21, 2017
Merged

Fix CLLocationManager extension example#1208
kzaher merged 2 commits intoReactiveX:developfrom
phlippieb:fix/location_extension_example

Conversation

@phlippieb
Copy link
Copy Markdown
Contributor

Replaces PR 1027, which targeted master instead of develop.
Should fix #1136. This uses a similar method as RxScrollViewDelegateProxy.swift.

Copy link
Copy Markdown
Member

@kzaher kzaher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
didUpdateLocationsSubject.onNext(locations)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to forward call to _forwardToDelegate?.locationManager(manager, didUpdateLocations: locations)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kzaher Should it do that in addition to publishing to the subject, or instead of, or should it only publish to the subject if _forwardToDelegate is nil?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phlippieb it should do both.

  • publish to publish subject -> for observing
  • forward it to forwarding delegate -> because of forwarding delegate definition

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kzaher Roger that. Updated.

}

public func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
didFailWithErrorSubject.onNext(error)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same for this part.

@RxPullRequestBot
Copy link
Copy Markdown

1 Warning
⚠️ No CHANGELOG changes made

Generated by 🚫 Danger

@kzaher kzaher merged commit 7a9c773 into ReactiveX:develop Apr 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants