Commit b90e4ec
authored
Added callback to set external user id (#633)
* Added callback to set external user id
* WIP - Working on unit testing now
* New public method exists now into OneSignal.h, so updates to the wrappers that require a header file will need to be made
* Fixed caching of the external user id to now use OneSignalUserDefaults instead of NSUSerDefaults
* WIP - Working on unit tests for set external id with callback
* Added a completion block for the external user id update
* Instead of success and failure, now it is simply overall completion because we have a push and email channel that needs to be updated
* The param sent back is a NSDictionary with a channel @"push" or @"email" with a @"success" of 1 or 0
* Built a new OneSignalClient method for using the OSMultipleCompletionHandler now
Updated demo app UI a bit for setting email, removing email, setting external user id, removing external user id
* Change to response of external user id completion handler
* true and false instead of 0 and 1 for the success key :value
* Fixed and added unit tests for external id and email
* Removed a not (!) check on accident for pending registering user with external id and is not already set to the same thing it is trying to update to
* Placed the duplicate results generation into a sep method
* Now when dup ext user id is being set we have a method for creating the response and including email or push when necessary
* Addressing comment son previous commits
* OSMultipleCompletionBlock to now return a NSDictionary
* Added a TODO addressing the new executeSimultaneousRequests method and how we should use this in the future1 parent c3ab33f commit b90e4ec
File tree
11 files changed
+565
-189
lines changed- iOS_SDK
- OneSignalDevApp/OneSignalDevApp
- Base.lproj
- OneSignalSDK
- Source
- UnitTests
11 files changed
+565
-189
lines changedLines changed: 130 additions & 49 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
40 | 51 | | |
41 | 52 | | |
42 | | - | |
43 | | - | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
48 | 57 | | |
49 | 58 | | |
50 | | - | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
| |||
Lines changed: 39 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
87 | 114 | | |
88 | 115 | | |
89 | 116 | | |
| |||
95 | 122 | | |
96 | 123 | | |
97 | 124 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 125 | | |
103 | 126 | | |
104 | 127 | | |
| |||
113 | 136 | | |
114 | 137 | | |
115 | 138 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 139 | | |
121 | 140 | | |
122 | 141 | | |
| |||
152 | 171 | | |
153 | 172 | | |
154 | 173 | | |
155 | | - | |
| 174 | + | |
156 | 175 | | |
157 | 176 | | |
158 | 177 | | |
159 | | - | |
160 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
161 | 189 | | |
162 | 190 | | |
163 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
510 | 513 | | |
| 514 | + | |
511 | 515 | | |
| 516 | + | |
512 | 517 | | |
513 | 518 | | |
514 | 519 | | |
| |||
0 commit comments