Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send events through NativeEventEmitter rather than the bridge on iOS. #46

Merged
merged 10 commits into from
Sep 22, 2017

Conversation

ashemah
Copy link
Contributor

@ashemah ashemah commented Sep 22, 2017

This is based off the latest RN native modules docs.

I have also updated the ranging.ios.js example.

Note: I am getting an error when running this:

this._nativeModule.addListener is not a function.

I have no idea where this is coming from exactly.

@ashemah ashemah changed the title Send events through NativeEventEmitter rather than the bridge. Send events through NativeEventEmitter rather than the bridge on iOS. Sep 22, 2017
@MacKentoch MacKentoch merged commit a95368e into MacKentoch:master Sep 22, 2017
@MacKentoch
Copy link
Owner

Thank you @ashemah

Reviewing was straight forward, nice job!

  • I will have to update documentation and example samples to reflect this new version.
  • push it to npm (within this day)

@ashemah
Copy link
Contributor Author

ashemah commented Sep 22, 2017 via email

@MacKentoch
Copy link
Owner

I will fix it soon.

Right now I can't dedicate time.
It is ok no worry.

@MacKentoch
Copy link
Owner

@ashemah you did a good job 👍

I fixed BeaconsDemo project.

DeviceEventEmitter.addListener()
// simply becomes (for android and iOS)
Beacons.BeaconsEventEmitter.addListener()

I have now another really interesting PR( #45 from @stoneman1) to review and merge (for android this time).

So it stays in master and maybe I may create a v1.1.0 because of breaking changes introduced (for the good!).

@dlindahl
Copy link

You know... now that the event emitter is on the Beacons object instead of DeviceEventEmitter, it makes it easier to provide a "mock" beacon event emitter for use in the simulator... 🤔

@MacKentoch
Copy link
Owner

Yes @dlindahl .

This is now mockable (not sure this word exists... You know French people love inventing words 😄).

I just wonder what use case apart from simulating you ranged a beacon or left a region after a timeout?

I would be pleased to read your suggestions

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.

None yet

3 participants