(data: any)
| 17 | const onNotificationTapCallbacks: Set<(message: any, remoteMessage?: any) => void> = new Set(); |
| 18 | |
| 19 | function deserialize(data: any): any { |
| 20 | if (data instanceof NSNull) { |
| 21 | return null; |
| 22 | } |
| 23 | |
| 24 | if (data instanceof NSArray) { |
| 25 | let array = []; |
| 26 | for (let i = 0, n = data.count; i < n; i++) { |
| 27 | array[i] = deserialize(data.objectAtIndex(i)); |
| 28 | } |
| 29 | return array; |
| 30 | } |
| 31 | |
| 32 | if (data instanceof NSDictionary) { |
| 33 | let dict = {}; |
| 34 | for (let i = 0, n = data.allKeys.count; i < n; i++) { |
| 35 | let key = data.allKeys.objectAtIndex(i); |
| 36 | dict[key] = deserialize(data.objectForKey(key)); |
| 37 | } |
| 38 | return dict; |
| 39 | } |
| 40 | |
| 41 | return data; |
| 42 | } |
| 43 | |
| 44 | export class MessagingCore implements IMessagingCore { |
| 45 | _APNSToken; |
no outgoing calls
no test coverage detected