@@ -80,7 +80,29 @@ class PreyNotification {
8080 PreyLogger ( " Did register device token " )
8181 let tokenAsString = deviceToken. reduce ( " " ) { $0 + String( format: " %02x " , $1) }
8282 PreyLogger ( tokenAsString)
83- let params : [ String : String ] = [ " notification_id " : tokenAsString, " name " : UIDevice . current. name]
83+ let preyDevice = PreyDevice ( )
84+ let firmwareInfo : [ String : String ] = [
85+ " model_name " : preyDevice. model!,
86+ " vendor_name " : preyDevice. vendor!,
87+ ]
88+ let processorInfo : [ String : String ] = [
89+ " speed " : preyDevice. cpuSpeed!,
90+ " cores " : preyDevice. cpuCores!,
91+ " model " : preyDevice. cpuModel!,
92+ ]
93+ let specs : [ String : Any ] = [
94+ " processor_info " : processorInfo,
95+ " firmware_info " : firmwareInfo,
96+ ]
97+ let hardwareAttributes : [ String : String ] = [
98+ " ram_size " : preyDevice. ramSize!
99+ ]
100+ let params : [ String : Any ] = [
101+ " notification_id " : tokenAsString,
102+ " name " : UIDevice . current. name,
103+ " specs " : specs,
104+ " hardware_attributes " : hardwareAttributes
105+ ]
84106
85107 // Check userApiKey isn't empty
86108 if let username = PreyConfig . sharedInstance. userApiKey {
0 commit comments