Skip to content

Commit

Permalink
Merge pull request #671 from OneSignal/add-getTags
Browse files Browse the repository at this point in the history
Add public getTags() method that returns tags from the local user
  • Loading branch information
jinliu9508 committed Feb 27, 2024
2 parents 9990ff3 + f89cc6b commit d3f305c
Show file tree
Hide file tree
Showing 18 changed files with 294 additions and 186 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"versionDefines": [
{
"name": "com.onesignal.unity.core",
"expression": "5.0.0",
"expression": "5.0.5",
"define": "ONE_SIGNAL_INSTALLED"
}
],
Expand Down
4 changes: 4 additions & 0 deletions OneSignalExample/Assets/OneSignal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated included iOS SDK to [5.0.4](https://github.com/OneSignal/OneSignal-iOS-SDK/releases/tag/5.0.4)

## [5.0.5]
### Changed
- Add public get tags method
- Updated included Android SDK to [5.0.5](https://github.com/OneSignal/OneSignal-Android-SDK/releases/tag/5.0.5)
- Updated included iOS SDK to [5.0.5](https://github.com/OneSignal/OneSignal-iOS-SDK/releases/tag/5.0.5)
### Fixed
- Included meta files in OneSignalConfig.androidlib to prevent asset from being ignored
- Package download url in the "Sync example code bundle package" step from the OneSignal SDK Setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"versionDefines": [
{
"name": "com.onesignal.unity.core",
"expression": "5.0.0",
"expression": "5.0.5",
"define": "ONE_SIGNAL_INSTALLED"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"versionDefines": [
{
"name": "com.onesignal.unity.core",
"expression": "5.0.0",
"expression": "5.0.5",
"define": "ONE_SIGNAL_INSTALLED"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,16 @@ public void AddTag() {
public void RemoveTag() {
_log($"Removing tag for key <b>{tagKey}</b>");
OneSignal.User.RemoveTag(tagKey);

}

public void GetTags() {
Dictionary<string, string> dict = OneSignal.User.GetTags();
string dictionaryString = "{";
foreach(KeyValuePair <string, string> keyValues in dict) {
dictionaryString += keyValues.Key + " : " + keyValues.Value + ", ";
}
_log($"Get all user tags " + dictionaryString.TrimEnd(',', ' ') + "}");
}

/*
Expand Down
Loading

0 comments on commit d3f305c

Please sign in to comment.