How to add tags in UrbanAirship in Xamarin.Forms?

We have following code to add tags in urbanairship for portal user. But I am not getting any tags. Can anybody please suggest me if I am doing wrongly. I want to add tags for registered user.

Project.iOS(Native)
Code to register identifier
UAirship.NamedUser.Identifier = "ssccr-cr529-dv689-1558e-6265d";
UAirship.NamedUser.ForceUpdate();

Project(Portalable)
Add Tags
Airship.Instance.EditDeviceTags().AddTags(tags).Apply();

Remove Tags
Airship.Instance.EditDeviceTags().RemoveTags(tags).Apply();

Didn't find what you were looking for?

New post

Comments

1 comment

  • Prakash,

    Your code looks to be correct.

    Where in your Urban Airship project are you checking for tags?

    Tags are used for sending push to segments of your audience. 

    The first way I would check if the tags are added is by using the Tags getter method:

    List<string> tags = Airship.Instance.Tags;

    Next, when sending a push in the dashboard, use the Target Specific Devices option to create a segment composed of one or more tags. These tags would be the ones you set in the app.

    0

Please sign in to leave a comment.