Skip to content

IOS SDK Bridge#2

Merged
pi0trpietruszewski merged 24 commits intoandroid-integrationfrom
ios-integration
Jun 2, 2021
Merged

IOS SDK Bridge#2
pi0trpietruszewski merged 24 commits intoandroid-integrationfrom
ios-integration

Conversation

@pi0trpietruszewski
Copy link
Contributor

@pi0trpietruszewski pi0trpietruszewski commented May 26, 2021

  • added method bridge
  • created event listeners handlers
  • push notifications
  • deep links
  • android module name change

- added method bridge
- created event listeners handlers
Token upload can be handled by [Intercom.sendTokenToIntercom(token)](#intercomsendtokentointercomtoken)
with token obtained
from [react-native-notifications](https://wix.github.io/react-native-notifications/api/general-events#registerremotenotificationsregistered)
___
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be worth adding an example of where in the application lifecycle you might call this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can setup react-native-notifications in example app, and link to example, what do you think?
Also react-native-notifications might change

src/index.tsx Outdated
IntercomEventEmitter.removeEventListener();
event === IntercomEvents.IntercomUnreadCountDidChange &&
Platform.OS === 'android' &&
IntercomEventEmitter.removeEventListener();
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it would be better to have a addEventListener and removeEventListener functions. There may be apps that don't want to use effects and would prefer to explicitly remove event listeners

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is problem with removeEventListener in React Native that listener is not removed, remove method should be used on obtained subscription.

@pi0trpietruszewski pi0trpietruszewski merged commit 318a707 into android-integration Jun 2, 2021
@pi0trpietruszewski pi0trpietruszewski changed the title IOS SDK Bridge [WIP!] IOS SDK Bridge Jun 2, 2021
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.

2 participants