Commit 63b034f
committed
API for adding triggers has string values
* addTrigger and addTriggers public API will only accept string values, not types string/bool/number, etc.
* No logic changes are needed as the SDK already supports string-only trigger values and evaluates booleans and numerics correctly.
Tested scenarios with these triggers set via the dashboard on IAMs:
🟢 myTrigger is true
🟡 myTrigger is 1.58 (must pass in "1.58" and not "1.580" for example, the "is" operator does not support numeric equivalence, it arrives to the SDK as value "1.58")
🟢 myTrigger > 5
🟢 myTrigger > 7.689
🟡 myTrigger >= 7.689 (note margin of error due to rounding, this value actually came to the SDK as 7.689000129699707, so adding a trigger value of "7.689" does not trigger the IAM to display)1 parent 37ad22a commit 63b034f
File tree
2 files changed
+7
-4
lines changed- iOS_SDK/OneSignalSDK/Source
2 files changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
93 | 96 | | |
94 | 97 | | |
95 | | - | |
96 | | - | |
| 98 | + | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments