also looking at this
iOS: the Bluetooth scan pair — ratchet 35 → 33
#97
10 files
+679
-3
| @@ -50,6 +50,13 @@ pub const enc = struct { | ||
| 50 | 50 | /// did-finish-picking pair and `userContentController:didReceiveScriptMessage:` |
| 51 | 51 | /// are both this shape. |
| 52 | 52 | pub const void_two_objects: [:0]const u8 = "v@:@@"; |
| 53 | /// `- (void)m:(id)a :(id)b :(id)c :(id)d` — four object arguments. | |
| 54 | /// `centralManager:didDiscoverPeripheral:advertisementData:RSSI:` is this | |
| 55 | /// shape, and it is the widest one any delegate here uses. `RSSI:` is an | |
| 56 | /// `NSNumber *`, not a primitive, so it counts as an object like the rest — | |
| 57 | /// getting that wrong would read the signal strength from the wrong | |
| 58 | /// register and report a plausible number. | |
| 59 | pub const void_four_objects: [:0]const u8 = "v@:@@@@"; | |
| 53 | 60 | /// `- (BOOL)m:(id)a :(id)b` — `application:didFinishLaunchingWithOptions:`. |
| 54 | 61 | /// |
| 55 | 62 | /// `B` is C99 `_Bool`: on 64-bit Apple platforms `__OBJC_BOOL_IS_BOOL` is |
| @@ -189,5 +196,6 @@ test "the encodings name the shapes these delegates actually use" { | ||
| 189 | 196 | // them is the only defence available, so the names are pinned. |
| 190 | 197 | try testing.expectEqualStrings("v@:@", enc.void_one_object); |
| 191 | 198 | try testing.expectEqualStrings("v@:@@", enc.void_two_objects); |
| 199 | try testing.expectEqualStrings("v@:@@@@", enc.void_four_objects); | |
| 192 | 200 | try testing.expectEqualStrings("B@:@@", enc.bool_two_objects); |
| 193 | 201 | } |