Commit 28c9ba1
authored
Add user id and PusherEvent (#227)
* WIP user-id implementation
* Add tests for event object
* Add tests for data passed to callback
* Add test for events without channel name
* Simplify global callback code
* Add tests for unbinding event callbacks
* Consistent documentation
* Tidy up code and comments
* Refactor jsonize variable
* Add documentation to PusherEvent
* Use conditional cast rather than forced
* Refactor event name
* Documentation changes
* Documentation fixes
* Remove check for presence of data
* Don't parse the event data multiple times
* Rename channel and name properties in PusherEvent
* Minor refactoring
* Add test for non-string value in websocket JSON
* Change PusherEvent to Class from Struct for ObjC compatibility
* Add Objective-C tests
* Remove unnecessary event name variable
* Use PusherEvent throughout library and provide jsonData
* Tidy up
* An array is valid json too
* Correct check for data encoding. Fix comments
* Update tests
* Ensure jsonData is read only
* Ensure parsing is only attempted once
* Fix comment
* Stop reference cycle
* Stop reference cycle
* Refactor PusherEvent tests and add new tests
* Add Objective-C tests for global binds
* Start readme changes
* Change 'jsonData' to 'dataAsJSON'
* Begin documentation
* Fix docs
* Fix docs
* Update labels
* Try adding a table
* Fix tables
* Clarify table
* Clarify table
* Clarify documentation
* Clarify legacy dropdown
* Clarify table
* Remove parser
* Remove parsing helper. Return errors to delegate
* Update readme
* Add new section about parsing
* Update Swift example
* Update Objective-C example
* Add objc initializer without 'attemptToReturnJSONObject'
* Refactor function name
* Remove xcscheme file
* Reset activity count when error is received to match previous behaviour
* Update README.md
Co-Authored-By: Will Sewell <me@willsewell.com>
* Add newline
Co-Authored-By: Will Sewell <me@willsewell.com>
* Fix the error message
* Rename QueuedEvent to QueueClientEvent
* Fix inconsistent spaces around brackets
* Rename shouldParseJSON to shouldParseJSONForLegacyCallbacks
* Use consistent test names
* Update comment to match example
* Add extra comment
* Change class methods to static
* Update comments
* getProperty -> property
* Change PusherParser to a struct
* Update readme
* Style updates
* Remove convenience constructor and replace with function
* Restructure documentation comments
* Make parameter of legacy callback optional to match passed callback
* dataToJSONObject etc should not be accessible in ObjC1 parent c30c6c7 commit 28c9ba1
File tree
23 files changed
+1158
-245
lines changed- PusherSwift.xcodeproj
- Sources
- Tests
- iOS Example Obj-C/iOS Example Obj-C
- iOS Example Swift/iOS Example Swift
23 files changed
+1158
-245
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
77 | 87 | | |
78 | 88 | | |
79 | 89 | | |
| |||
120 | 130 | | |
121 | 131 | | |
122 | 132 | | |
| 133 | + | |
123 | 134 | | |
124 | 135 | | |
125 | 136 | | |
| 137 | + | |
126 | 138 | | |
127 | 139 | | |
128 | 140 | | |
129 | | - | |
130 | 141 | | |
131 | 142 | | |
132 | 143 | | |
| 144 | + | |
| 145 | + | |
133 | 146 | | |
134 | 147 | | |
135 | 148 | | |
| |||
157 | 170 | | |
158 | 171 | | |
159 | 172 | | |
| 173 | + | |
160 | 174 | | |
| 175 | + | |
161 | 176 | | |
162 | 177 | | |
163 | 178 | | |
| |||
311 | 326 | | |
312 | 327 | | |
313 | 328 | | |
| 329 | + | |
| 330 | + | |
314 | 331 | | |
315 | 332 | | |
316 | 333 | | |
317 | 334 | | |
| 335 | + | |
318 | 336 | | |
319 | 337 | | |
320 | 338 | | |
| |||
337 | 355 | | |
338 | 356 | | |
339 | 357 | | |
| 358 | + | |
340 | 359 | | |
341 | 360 | | |
| 361 | + | |
342 | 362 | | |
343 | 363 | | |
344 | 364 | | |
| |||
0 commit comments