Skip to content

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

Merged
MacKentoch merged 10 commits into
MacKentoch:masterfrom
ashemah:master
Sep 22, 2017
Merged

Send events through NativeEventEmitter rather than the bridge on iOS.#46
MacKentoch merged 10 commits into
MacKentoch:masterfrom
ashemah:master

Conversation

@ashemah

@ashemah ashemah commented Sep 22, 2017

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

ashemah commented Sep 22, 2017 via email

Copy link
Copy Markdown
Contributor Author

@MacKentoch

Copy link
Copy Markdown
Owner

I will fix it soon.

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

@MacKentoch

Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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.

3 participants