Skip to content

Commit

Permalink
Updates tags in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Feb 3, 2024
1 parent 9d5adb3 commit 80874d1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
26 changes: 18 additions & 8 deletions src/content/docs/client/push/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,28 +126,38 @@ public class PushDelegate : IPushDelegate
}
```

## Additional Features
## Tags
Like other modules in Shiny, there are certain providers that support additional feature sets. Push really only has 1 extra, tagging.

The following providers, support tagging
* Azure Notification Hubs
* Firebase
* Android Firebase (Native)

In order to safely support tagging without the need for constantly feature flag or type checking, the following extension methods exist to make life easy

```csharp
var push = Host.GetService<IPushManager>();

var supported = push.IsTagsSupport();
if (push.Tags == null) {
// tags are not supported
}
else {
// current tags
var tags = push.Tags.RegisteredTags;

// clears all tags
await push.Tags.ClearTags();

// tries to set a params list of tags if available
await push.TrySetTags("tag1", "tag2");
// replace all tags with new set
await push.Tags.SetTags("tag1", "tag2");

// gets a list of currently set tags
var tags = push.TryGetTags();
// remove a tag
await push.Tags.RemoveTag("tag3");

// requests permission from the user and sets tags if available
var permissionResult = await push.TryRequestAccessWithTags("tag1", "tag2");
// add a new tag
await push.Tags.AddTag("tag4");
}
```

## Android
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/release-notes/client/v30.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import Aside from '../../../../components/Alert.tsx';
import RN from '../../../../components/ReleaseNote.astro';
import GitHubIssue from '../../../../components/GitHubIssue.tsx';

# 3.2.4 - TBD

## Push
* <RN type="enhancement" platform="iOS">IPushManager.RequestAccess now return AccessState.Unsupported on the simulator instead of letting an exception be thrown</RN>
* <RN type="enhancement">Old extensions for tags added back to IPushManager</RN>

# 3.2.3 - January 18, 2024

## HTTP Transfers
Expand Down

0 comments on commit 80874d1

Please sign in to comment.