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

[Unity SDK 5.22.3 / iOS] How to read which "Category" button was pressed? #53

Open
yuryshumovsky opened this issue May 19, 2020 · 1 comment
Labels

Comments

@yuryshumovsky
Copy link

Hi,

I send push notifications with additional buttons, (iOS8+ Category).
2 Buttons, Button type, Id and label are set and configured of course.

Where to get information about pressed button?

In XCode I see that there is some response, but where to handle it in C# (button id + some other information about button)?
| Response: {"status_code":200,"status_message":"OK","response":{"iosCategories":[{"categoryId":8578,"buttons":[{"id":"888888","label":"Button 1 Label","type":"0","startApplication":1},{"id":"999999","label":"Button 2 Label","type":"1","startApplication":1}]}]}}

@wfhm wfhm added the 51354 label May 19, 2020
@wfhm
Copy link
Member

wfhm commented May 29, 2020

@yuryshumovsky,

To handle iOS categories, you should use the following method if UIApplicationDelegate:

- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)notification completionHandler:(void(^)())completionHandler

This method should be added in the UnityRuntime.m file of our plugin. We will add this functionality available out of the box in the future releases, however, you can do it manually on your own with the current plugin version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants