exponea / exponea-ios-sdk

MIT License
19 stars 27 forks source link

Manual tracking push notification token missing methods from documentation #22

Closed rowwingman closed 3 years ago

rowwingman commented 3 years ago

Documentation says, that you can manually track push notification token:

Manual tracking You can completely disable notification tracking and use methods Exponea.shared.trackPushToken and Exponea.shared.trackPushOpened to track push notification events. trackPushOpened expects the notification has Exponea format. You can always track campaign event manually with any payload you need.

However trackPushToken method is not visible, because it's for internal usage.

How is it possible to track push notification token manually?

wassil commented 3 years ago

Hi, we have an object called Exponea that has a shared reference to ExponeaInternal object. It doesn't mean that ExponeaInternal is only for internal use. It is the object that you should not use directly, but access using Exponea.shared.

I've just tried it in version 2.9.2 and trackPushToken is public within ExponeaInternal so you can just call Exponea.shared.trackPushToken.

rowwingman commented 3 years ago

Thank you, updated to the newest version.

wassil commented 3 years ago

Just to save you potential headache: If you're using push notifications, we no longer do delegate swizzling. Please review this document about new push notification setup https://github.com/exponea/exponea-ios-sdk/blob/develop/Documentation/Guide/PUSH_QUICKSTART.md#3-application-delegate-methods