Skip to content

Commit

Permalink
Add public getTags
Browse files Browse the repository at this point in the history
  • Loading branch information
jinliu9508 committed Jan 11, 2024
1 parent 4285c63 commit bd2c14b
Show file tree
Hide file tree
Showing 18 changed files with 291 additions and 191 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
2 changes: 2 additions & 0 deletions OneSignalExample/Assets/OneSignal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ 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
### 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 bd2c14b

Please sign in to comment.