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

Added jsonRepresentation method to OSInAppMessageAction class #704

Merged
merged 3 commits into from
Jun 30, 2020

Conversation

mikechoch
Copy link
Contributor

@mikechoch mikechoch commented Jun 29, 2020

  • OSJSONEncodable now opens up possibility to have the jsonRepresentation method
    • Modified how we construct the json for the OSInAppMessageAction class
  • Fixed demo app example IAM click block and now print out the constructed json rep

Major difference noticed between Android click event and iOS... Below is a screenshot showing the Android payload when tags or outcomes are included in the click action
Screen Shot 2020-06-30 at 11 52 02 AM

Now iOS payload example witch shows consistency between both SDKs
Example 1:
Screen Shot 2020-06-30 at 1 39 23 PM
Example 2:
Screen Shot 2020-06-30 at 2 17 29 PM
Example 3:
Screen Shot 2020-06-30 at 2 17 37 PM


This change is Reviewable

* `OSJSONEncodable` now opens up possibility to have the `jsonRepresentation` method
  * Modified how we construct the json for the `OSInAppMessageAction` class
* Fixed demo app example IAM click block and now print out the constructed json rep
* Fixed comment format to `//` instead of `/* */`
* Changed how jsonRepresentation method internals work
  * Added `null` check for `clickUrl` because we have to call `absoluteString` method `NSURL` class
Copy link
Contributor

@Jeasmine Jeasmine left a comment

Choose a reason for hiding this comment

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

LGTM

* `OSInAppMessageTag` now has `jsonRepresentation`
  * Made `tagsToAdd` and `tagsToRemove` public access
* `OSInAppMessageOutcome` now has `jsonRepresentation`
  * Made `name`, `weight`, and `unique` public access
* Wihtin `OSInAppMessageAction` now, the `tags` and `outcomes` are also public access
  * This is now consistently with Android IAM click action class and what is given to the developers from the IAM click handler
@mikechoch mikechoch merged commit efb2e2b into master Jun 30, 2020
@mikechoch mikechoch deleted the fix/in_app_message_click_json_rep_method_and_format branch June 30, 2020 18:32
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