-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add callback support #22
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
feat: Add callback support #22
Conversation
mpRoktEventCallback?.onUnload( | ||
when (reason) { | ||
Rokt.UnloadReasons.NO_OFFERS -> MParticle.UnloadReasons.NO_OFFERS | ||
Rokt.UnloadReasons.FINISHED -> MParticle.UnloadReasons.FINISHED | ||
Rokt.UnloadReasons.TIMEOUT -> MParticle.UnloadReasons.TIMEOUT | ||
Rokt.UnloadReasons.NETWORK_ERROR -> MParticle.UnloadReasons.NETWORK_ERROR | ||
Rokt.UnloadReasons.NO_WIDGET -> MParticle.UnloadReasons.NO_WIDGET | ||
Rokt.UnloadReasons.INIT_FAILED -> MParticle.UnloadReasons.INIT_FAILED | ||
Rokt.UnloadReasons.UNKNOWN_PLACEHOLDER -> MParticle.UnloadReasons.UNKNOWN_PLACEHOLDER | ||
Rokt.UnloadReasons.UNKNOWN -> MParticle.UnloadReasons.UNKNOWN | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it's missing from the iOS callback PR. Should we discuss? Looks like this code was added to android pr here, and I don't see an equivalent on iOS.
onLoadCallback = onLoad | ||
onShouldHideLoadingIndicatorCallback = onShouldHideLoadingIndicator | ||
onShouldShowLoadingIndicatorCallback = onShouldShowLoadingIndicator | ||
this.mpRoktEventCallback = mpRoktEventCallback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I guess in Android you can't just pass in the code blocks like I do here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We talked about this on a call. Android seems to implement this callbacks in a protocol/delegate way while iOS passes around code blocks to achieve the same thing. Interesting difference on the Rokt side to note but we're doing things correctly for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Instructions
development
Summary
Testing Plan
Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)