forked from Shmoopi/iOS-System-Services
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSystemServices.m
executable file
·1267 lines (1069 loc) · 45.7 KB
/
SystemServices.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// SystemServices.m
// SystemServicesDemo
//
// Created by Shmoopi LLC on 9/15/12.
// Copyright (c) 2012 Shmoopi LLC. All rights reserved.
//
#import "SystemServices.h"
@interface SystemServices () {
// Private
/* All System Information in Dictionary Format */
NSDictionary *allSystemInformation;
/* Hardware Information */
// System Uptime (dd hh mm)
NSString *systemsUptime;
// Model of Device
NSString *deviceModel;
// Device Name
NSString *deviceName;
// System Name
NSString *systemName;
// System Version
NSString *systemsVersion;
// System Device Type (Not Formatted = iPhone1,0)
NSString *systemDeviceTypeNotFormatted;
// System Device Type (Formatted = iPhone 1)
NSString *systemDeviceTypeFormatted;
// Get the Screen Width (X)
NSInteger screenWidth;
// Get the Screen Height (Y)
NSInteger screenHeight;
// Get the Screen Brightness
float screenBrightness;
// Multitasking enabled?
BOOL multitaskingEnabled;
// Proximity sensor enabled?
BOOL proximitySensorEnabled;
// Debugger Attached?
BOOL debuggerAttached;
// Plugged In?
BOOL pluggedIn;
/* Jailbreak Check */
// Jailbroken?
int jailbroken;
/* Processor Information */
// Number of processors
NSInteger numberProcessors;
// Number of Active Processors
NSInteger numberActiveProcessors;
// Processor Speed in MHz
NSInteger processorSpeed;
// Processor Bus Speed in MHz
NSInteger processorBusSpeed;
/* Accessory Information */
// Are any accessories attached?
BOOL accessoriesAttached;
// Are headphone attached?
BOOL headphonesAttached;
// Number of attached accessories
NSInteger numberAttachedAccessories;
// Name of attached accessory/accessories (seperated by , comma's)
NSString *nameAttachedAccessories;
/* Carrier Information */
// Carrier Name
NSString *carrierName;
// Carrier Country
NSString *carrierCountry;
// Carrier Mobile Country Code
NSString *carrierMobileCountryCode;
// Carrier ISO Country Code
NSString *carrierISOCountryCode;
// Carrier Mobile Network Code
NSString *carrierMobileNetworkCode;
// Carrier Allows VOIP
BOOL carrierAllowsVOIP;
/* Battery Information */
// Battery Level
float batteryLevel;
// Charging?
BOOL charging;
// Fully Charged?
BOOL fullyCharged;
/* Network Information */
// Get Current IP Address
NSString *currentIPAddress;
// Get Current MAC Address
NSString *currentMACAddress;
// Get External IP Address
NSString *externalIPAddress;
// Get Cell IP Address
NSString *cellIPAddress;
// Get Cell MAC Address
NSString *cellMACAddress;
// Get Cell Netmask Address
NSString *cellNetmaskAddress;
// Get Cell Broadcast Address
NSString *cellBroadcastAddress;
// Get WiFi IP Address
NSString *wiFiIPAddress;
// Get WiFi MAC Address
NSString *wiFiMACAddress;
// Get WiFi Netmask Address
NSString *wiFiNetmaskAddress;
// Get WiFi Broadcast Address
NSString *wiFiBroadcastAddress;
// Get WiFi Router Address
NSString *wiFiRouterAddress;
// Connected to WiFi?
BOOL connectedToWiFi;
// Connected to Cellular Network?
BOOL connectedToCellNetwork;
/* Process Information */
// Process ID
int processID;
// Process Name
NSString *processName;
// Process Status
int processStatus;
// Parent Process ID
int parentPID;
// List of process information including PID's, Names, PPID's, and Status'
NSMutableArray *processesInformation;
/* Disk Information */
// Total Disk Space
NSString *diskSpace;
// Total Free Disk Space (Raw)
NSString *freeDiskSpaceinRaw;
// Total Free Disk Space (Percentage)
NSString *freeDiskSpaceinPercent;
// Total Used Disk Space (Raw)
NSString *usedDiskSpaceinRaw;
// Total Used Disk Space (Percentage)
NSString *usedDiskSpaceinPercent;
// Get the total disk space in long format
long long longDiskSpace;
// Get the total free disk space in long format
long long longFreeDiskSpace;
/* Memory Information */
// Total Memory
double totalMemory;
// Free Memory (Raw)
double freeMemoryinRaw;
// Free Memory (Percent)
double freeMemoryinPercent;
// Used Memory (Raw)
double usedMemoryinRaw;
// Used Memory (Percent)
double usedMemoryinPercent;
// Active Memory (Raw)
double activeMemoryinRaw;
// Active Memory (Percent)
double activeMemoryinPercent;
// Inactive Memory (Raw)
double inactiveMemoryinRaw;
// Inactive Memory (Percent)
double inactiveMemoryinPercent;
// Wired Memory (Raw)
double wiredMemoryinRaw;
// Wired Memory (Percent)
double wiredMemoryinPercent;
// Purgable Memory (Raw)
double purgableMemoryinRaw;
// Purgable Memory (Percent)
double purgableMemoryinPercent;
/* Accelerometer Information */
// Device Orientation
UIInterfaceOrientation deviceOrientation;
/* Localization Information */
// Country
NSString *country;
// Language
NSString *language;
// TimeZone
NSString *timeZoneSS;
// Currency Symbol
NSString *currency;
/* Application Information */
// Application Version
NSString *applicationVersion;
// Clipboard Content
NSString *clipboardContent;
/* Universal Unique Identifiers */
// Unique ID
NSString *uniqueID;
// Device Signature
NSString *deviceSignature;
// CFUUID
NSString *cfuuid;
// CPU Usage
float cpuUsage;
}
// Get all System Information (All Methods)
- (NSDictionary *)getAllSystemInformation;
@end
@implementation SystemServices
@dynamic allSystemInformation, systemsUptime, deviceModel, deviceName, systemName, systemsVersion, systemDeviceTypeNotFormatted, systemDeviceTypeFormatted, screenWidth, screenHeight, screenBrightness, multitaskingEnabled, proximitySensorEnabled, debuggerAttached, pluggedIn, jailbroken, numberProcessors, numberActiveProcessors, processorSpeed, processorBusSpeed, accessoriesAttached, headphonesAttached, numberAttachedAccessories, nameAttachedAccessories, carrierName, carrierCountry, carrierMobileCountryCode, carrierISOCountryCode, carrierMobileNetworkCode, carrierAllowsVOIP, batteryLevel, charging, fullyCharged, currentIPAddress, currentMACAddress, externalIPAddress, cellIPAddress, cellMACAddress, cellNetmaskAddress, cellBroadcastAddress, wiFiIPAddress, wiFiMACAddress, wiFiNetmaskAddress, wiFiBroadcastAddress, wiFiRouterAddress, connectedToWiFi, connectedToCellNetwork, processID, processName, processStatus, parentPID, processesInformation, diskSpace, freeDiskSpaceinRaw, freeDiskSpaceinPercent, usedDiskSpaceinRaw, usedDiskSpaceinPercent, longDiskSpace, longFreeDiskSpace, totalMemory, freeMemoryinRaw, freeMemoryinPercent, usedMemoryinRaw, usedMemoryinPercent, activeMemoryinRaw, activeMemoryinPercent, inactiveMemoryinRaw, inactiveMemoryinPercent, wiredMemoryinRaw, wiredMemoryinPercent, purgableMemoryinRaw, purgableMemoryinPercent, deviceOrientation, country, language, timeZoneSS, currency, applicationVersion, clipboardContent, uniqueID, deviceSignature, cfuuid, cpuUsage;
// Singleton
+ (id)sharedServices {
static SystemServices *sharedSystemServices = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedSystemServices = [[self alloc] init];
});
return sharedSystemServices;
}
// Init
- (id)init {
if (self = [super init]) {
// Initialize variables
//[self refreshValues];
}
return self;
}
// System Information
- (NSString *)systemsUptime {
return [SSHardwareInfo systemUptime];
}
- (NSString *)deviceModel {
return [SSHardwareInfo deviceModel];
}
- (NSString *)deviceName {
return [SSHardwareInfo deviceName];
}
- (NSString *)systemName {
return [SSHardwareInfo systemName];
}
- (NSString *)systemsVersion {
return [SSHardwareInfo systemVersion];
}
- (NSString *)systemDeviceTypeNotFormatted {
return [SSHardwareInfo systemDeviceTypeFormatted:NO];
}
- (NSString *)systemDeviceTypeFormatted {
return [SSHardwareInfo systemDeviceTypeFormatted:YES];
}
- (NSInteger)screenWidth {
return [SSHardwareInfo screenWidth];
}
- (NSInteger)screenHeight {
return [SSHardwareInfo screenHeight];
}
- (float)screenBrightness {
return [SSHardwareInfo screenBrightness];
}
- (BOOL)multitaskingEnabled {
return [SSHardwareInfo multitaskingEnabled];
}
- (BOOL)proximitySensorEnabled {
return [SSHardwareInfo proximitySensorEnabled];
}
- (BOOL)debuggerAttached {
return [SSHardwareInfo debuggerAttached];
}
- (BOOL)pluggedIn {
return [SSHardwareInfo pluggedIn];
}
- (int)jailbroken {
return [SSJailbreakCheck jailbroken];
}
- (NSInteger)numberProcessors {
return [SSProcessorInfo numberProcessors];
}
- (NSInteger)numberActiveProcessors {
return [SSProcessorInfo numberActiveProcessors];
}
- (NSInteger)processorSpeed {
return [SSProcessorInfo processorSpeed];
}
- (NSInteger)processorBusSpeed {
return [SSProcessorInfo processorBusSpeed];
}
- (BOOL)accessoriesAttached {
return [SSAccessoryInfo accessoriesAttached];
}
- (BOOL)headphonesAttached {
return [SSAccessoryInfo headphonesAttached];
}
- (NSInteger)numberAttachedAccessories {
return [SSAccessoryInfo numberAttachedAccessories];
}
- (NSString *)nameAttachedAccessories {
return [SSAccessoryInfo nameAttachedAccessories];
}
- (NSString *)carrierName {
return [SSCarrierInfo carrierName];
}
- (NSString *)carrierCountry {
return [SSCarrierInfo carrierCountry];
}
- (NSString *)carrierMobileCountryCode {
return [SSCarrierInfo carrierMobileCountryCode];
}
- (NSString *)carrierISOCountryCode {
return [SSCarrierInfo carrierISOCountryCode];
}
- (NSString *)carrierMobileNetworkCode {
return [SSCarrierInfo carrierMobileNetworkCode];
}
- (BOOL)carrierAllowsVOIP {
return [SSCarrierInfo carrierAllowsVOIP];
}
- (float)batteryLevel {
return [SSBatteryInfo batteryLevel];
}
- (BOOL)charging {
return [SSBatteryInfo charging];
}
- (BOOL)fullyCharged {
return [SSBatteryInfo fullyCharged];
}
- (nullable NSString *)currentIPAddress {
return [SSNetworkInfo currentIPAddress];
}
- (nullable NSString *)currentMACAddress{
return [SSNetworkInfo currentMACAddress];
}
- (nullable NSString *)externalIPAddress {
return [SSNetworkInfo externalIPAddress];
}
- (nullable NSString *)cellIPAddress {
return [SSNetworkInfo cellIPAddress];
}
- (nullable NSString *)cellMACAddress {
return [SSNetworkInfo cellMACAddress];
}
- (nullable NSString *)cellNetmaskAddress {
return [SSNetworkInfo cellNetmaskAddress];
}
- (nullable NSString *)cellBroadcastAddress {
return [SSNetworkInfo cellBroadcastAddress];
}
- (nullable NSString *)wiFiIPAddress {
return [SSNetworkInfo wiFiIPAddress];
}
- (nullable NSString *)wiFiMACAddress {
return [SSNetworkInfo wiFiMACAddress];
}
- (nullable NSString *)wiFiNetmaskAddress {
return [SSNetworkInfo wiFiNetmaskAddress];
}
- (nullable NSString *)wiFiBroadcastAddress {
return [SSNetworkInfo wiFiBroadcastAddress];
}
- (nullable NSString *)wiFiRouterAddress {
return [SSNetworkInfo wiFiRouterAddress];
}
- (BOOL)connectedToWiFi {
return [SSNetworkInfo connectedToWiFi];
}
- (BOOL)connectedToCellNetwork {
return [SSNetworkInfo connectedToCellNetwork];
}
- (int)processID {
return [SSProcessInfo processID];
}
- (NSString *)processName {
return [SSProcessInfo processName];
}
- (int)processStatus {
return [SSProcessInfo processStatus];
}
- (int)parentPID {
return [SSProcessInfo parentPID];
}
- (NSMutableArray *)processesInformation {
return [SSProcessInfo processesInformation];
}
- (NSString *)diskSpace {
return [SSDiskInfo diskSpace];
}
- (NSString *)freeDiskSpaceinRaw {
return [SSDiskInfo freeDiskSpace:NO];
}
- (NSString *)freeDiskSpaceinPercent {
return [SSDiskInfo freeDiskSpace:YES];
}
- (NSString *)usedDiskSpaceinRaw {
return [SSDiskInfo usedDiskSpace:NO];
}
- (NSString *)usedDiskSpaceinPercent {
return [SSDiskInfo usedDiskSpace:YES];
}
- (long long)longDiskSpace {
return [SSDiskInfo longDiskSpace];
}
- (long long)longFreeDiskSpace {
return [SSDiskInfo longFreeDiskSpace];
}
- (double)totalMemory {
return [SSMemoryInfo totalMemory];
}
- (double)freeMemoryinRaw {
return [SSMemoryInfo freeMemory:NO];
}
- (double)freeMemoryinPercent {
return [SSMemoryInfo freeMemory:YES];
}
- (double)usedMemoryinRaw {
return [SSMemoryInfo usedMemory:NO];
}
- (double)usedMemoryinPercent {
return [SSMemoryInfo usedMemory:YES];
}
- (double)activeMemoryinRaw {
return [SSMemoryInfo activeMemory:NO];
}
- (double)activeMemoryinPercent {
return [SSMemoryInfo activeMemory:YES];
}
- (double)inactiveMemoryinRaw {
return [SSMemoryInfo inactiveMemory:NO];
}
- (double)inactiveMemoryinPercent {
return [SSMemoryInfo inactiveMemory:YES];
}
- (double)wiredMemoryinRaw {
return [SSMemoryInfo wiredMemory:NO];
}
- (double)wiredMemoryinPercent {
return [SSMemoryInfo wiredMemory:YES];
}
- (double)purgableMemoryinRaw {
return [SSMemoryInfo purgableMemory:NO];
}
- (double)purgableMemoryinPercent {
return [SSMemoryInfo purgableMemory:YES];
}
- (UIInterfaceOrientation)deviceOrientation {
return [SSAccelerometerInfo deviceOrientation];
}
- (NSString *)country {
return [SSLocalizationInfo country];
}
- (NSString *)language {
return [SSLocalizationInfo language];
}
- (NSString *)timeZoneSS {
return [SSLocalizationInfo timeZone];
}
- (NSString *)currency {
return [SSLocalizationInfo currency];
}
- (NSString *)applicationVersion {
return [SSApplicationInfo applicationVersion];
}
- (NSString *)clipboardContent {
return [SSApplicationInfo clipboardContent];
}
- (NSString *)uniqueID {
return [SSUUID uniqueID];
}
- (NSString *)deviceSignature {
return [SSUUID deviceSignature];
}
- (NSString *)cfuuid {
return [SSUUID cfuuid];
}
- (float)cpuUsage {
return [SSApplicationInfo cpuUsage];
}
- (NSDictionary *)allSystemInformation {
return [self getAllSystemInformation];
}
// Get all System Information (All Methods)
- (NSDictionary *)getAllSystemInformation {
// Create an array
NSDictionary *SystemInformationDict;
// Set up all System Values
NSString *SystemUptime = [self systemsUptime];
NSString *DeviceModel = [self deviceModel];
NSString *DeviceName = [self deviceName];
NSString *SystemName = [self systemName];
NSString *SystemVersion = [self systemsVersion];
NSString *SystemDeviceTypeFormattedNO = [self systemDeviceTypeNotFormatted];
NSString *SystemDeviceTypeFormattedYES = [self systemDeviceTypeFormatted];
NSString *ScreenWidth = [NSString stringWithFormat:@"%ld", (long)[self screenWidth]];
NSString *ScreenHeight = [NSString stringWithFormat:@"%ld", (long)[self screenHeight]];
NSString *ScreenBrightness = [NSString stringWithFormat:@"%f", [self screenBrightness]];
NSString *MultitaskingEnabled = ([self multitaskingEnabled]) ? @"Yes" : @"No";
NSString *ProximitySensorEnabled = ([self proximitySensorEnabled]) ? @"Yes" : @"No";
NSString *DebuggerAttached = ([self debuggerAttached]) ? @"Yes" : @"No";
NSString *PluggedIn = ([self pluggedIn]) ? @"Yes" : @"No";
NSString *Jailbroken = [NSString stringWithFormat:@"%d", [self jailbroken]];
NSString *NumberProcessors = [NSString stringWithFormat:@"%ld", (long)[self numberProcessors]];
NSString *NumberActiveProcessors = [NSString stringWithFormat:@"%ld", (long)[self numberActiveProcessors]];
NSString *ProcessorSpeed = [NSString stringWithFormat:@"%ld", (long)[self processorSpeed]];
NSString *ProcessorBusSpeed = [NSString stringWithFormat:@"%ld", (long)[self processorBusSpeed]];
NSString *AccessoriesAttached = ([self accessoriesAttached]) ? @"Yes" : @"No";
NSString *HeadphonesAttached = ([self headphonesAttached]) ? @"Yes" : @"No";
NSString *NumberAttachedAccessories = [NSString stringWithFormat:@"%ld", (long)[self numberAttachedAccessories]];
NSString *NameAttachedAccessories = [self nameAttachedAccessories];
NSString *CarrierName = [self carrierName];
NSString *CarrierCountry = [self carrierCountry];
NSString *CarrierMobileCountryCode = [self carrierMobileCountryCode];
NSString *CarrierISOCountryCode = [self carrierISOCountryCode];
NSString *CarrierMobileNetworkCode = [self carrierMobileNetworkCode];
NSString *CarrierAllowsVOIP = ([self carrierAllowsVOIP]) ? @"Yes" : @"No";
NSString *BatteryLevel = [NSString stringWithFormat:@"%f", [self batteryLevel]];
NSString *Charging = ([self charging]) ? @"Yes" : @"No";
NSString *FullyCharged = ([self fullyCharged]) ? @"Yes" : @"No";
NSString *CurrentIPAddress = [self currentIPAddress];
NSString *CurrentMACAddress = [self currentMACAddress];
NSString *ExternalIPAddress = [self externalIPAddress];
NSString *CellIPAddress = [self cellIPAddress];
NSString *CellMACAddress = [self cellMACAddress];
NSString *CellNetmaskAddress = [self cellNetmaskAddress];
NSString *CellBroadcastAddress = [self cellBroadcastAddress];
NSString *WiFiIPAddress = [self wiFiIPAddress];
NSString *WiFiMACAddress = [self wiFiMACAddress];
NSString *WiFiNetmaskAddress = [self wiFiNetmaskAddress];
NSString *WiFiBroadcastAddress = [self wiFiBroadcastAddress];
NSString *WiFiRouterAddress = [self wiFiRouterAddress];
NSString *ConnectedToWiFi = ([self connectedToWiFi]) ? @"Yes" : @"No";
NSString *ConnectedToCellNetwork = ([self connectedToCellNetwork]) ? @"Yes" : @"No";
NSString *ProcessID = [NSString stringWithFormat:@"%d", [self processID]];
NSString *ProcessName = [self processName];
NSString *ProcessStatus = [NSString stringWithFormat:@"%d", [self processStatus]];
NSString *ParentPID = [NSString stringWithFormat:@"%d", [self parentPID]];
NSMutableArray *ProcessesInformation = [self processesInformation];
NSString *DiskSpace = [self diskSpace];
NSString *FreeDiskSpaceNO = [self freeDiskSpaceinRaw];
NSString *FreeDiskSpaceYES = [self freeDiskSpaceinPercent];
NSString *UsedDiskSpaceNO = [self usedDiskSpaceinRaw];
NSString *UsedDiskSpaceYES = [self usedDiskSpaceinPercent];
NSString *LongDiskSpace = [NSString stringWithFormat:@"%lld", [self longDiskSpace]];
NSString *LongFreeDiskSpace = [NSString stringWithFormat:@"%lld", [self longFreeDiskSpace]];
NSString *TotalMemory = [NSString stringWithFormat:@"%f", [self totalMemory]];
NSString *FreeMemoryNO = [NSString stringWithFormat:@"%f", [self freeMemoryinRaw]];
NSString *FreeMemoryYES = [NSString stringWithFormat:@"%f", [self freeMemoryinPercent]];
NSString *UsedMemoryNO = [NSString stringWithFormat:@"%f", [self usedMemoryinRaw]];
NSString *UsedMemoryYES = [NSString stringWithFormat:@"%f", [self usedMemoryinPercent]];
NSString *ActiveMemoryNO = [NSString stringWithFormat:@"%f", [self activeMemoryinRaw]];
NSString *ActiveMemoryYES = [NSString stringWithFormat:@"%f", [self activeMemoryinPercent]];
NSString *InactiveMemoryNO = [NSString stringWithFormat:@"%f", [self inactiveMemoryinRaw]];
NSString *InactiveMemoryYES = [NSString stringWithFormat:@"%f", [self inactiveMemoryinPercent]];
NSString *WiredMemoryNO = [NSString stringWithFormat:@"%f", [self wiredMemoryinRaw]];
NSString *WiredMemoryYES = [NSString stringWithFormat:@"%f", [self wiredMemoryinPercent]];
NSString *PurgableMemoryNO = [NSString stringWithFormat:@"%f", [self purgableMemoryinRaw]];
NSString *PurgableMemoryYES = [NSString stringWithFormat:@"%f", [self purgableMemoryinPercent]];
NSString *DeviceOrientation = [NSString stringWithFormat:@"%ld", [self deviceOrientation]];
NSString *Country = [self country];
NSString *Language = [self language];
NSString *TimeZone = [self timeZoneSS];
NSString *Currency = [self currency];
NSString *ApplicationVersion = [self applicationVersion];
NSString *ClipboardContent = [self clipboardContent];
NSString *UniqueID = [self uniqueID];
NSString *DeviceSignature = [self deviceSignature];
NSString *CFUUID = [self cfuuid];
NSString *CPUUsage = [NSString stringWithFormat:@"%f", [self cpuUsage]];
// Check to make sure all values are valid (if not, make them)
if (SystemUptime == nil || SystemUptime.length <= 0) {
// Invalid value
SystemUptime = @"Unknown";
}
if (DeviceModel == nil || DeviceModel.length <= 0) {
// Invalid value
DeviceModel = @"Unknown";
}
if (DeviceName == nil || DeviceName.length <= 0) {
// Invalid value
DeviceName = @"Unknown";
}
if (SystemName == nil || SystemName.length <= 0) {
// Invalid value
SystemName = @"Unknown";
}
if (SystemVersion == nil || SystemVersion.length <= 0) {
// Invalid value
SystemVersion = @"Unknown";
}
if (SystemDeviceTypeFormattedNO == nil || SystemDeviceTypeFormattedNO.length <= 0) {
// Invalid value
SystemDeviceTypeFormattedNO = @"Unknown";
}
if (SystemDeviceTypeFormattedYES == nil || SystemDeviceTypeFormattedYES.length <= 0) {
// Invalid value
SystemDeviceTypeFormattedYES = @"Unknown";
}
if (ScreenWidth == nil || ScreenWidth.length <= 0) {
// Invalid value
ScreenWidth = @"Unknown";
}
if (ScreenHeight == nil || ScreenHeight.length <= 0) {
// Invalid value
ScreenHeight = @"Unknown";
}
if (ScreenBrightness == nil || ScreenBrightness.length <= 0) {
// Invalid value
ScreenBrightness = @"Unknown";
}
if (MultitaskingEnabled == nil || MultitaskingEnabled.length <= 0) {
// Invalid value
MultitaskingEnabled = @"Unknown";
}
if (ProximitySensorEnabled == nil || ProximitySensorEnabled.length <= 0) {
// Invalid value
ProximitySensorEnabled = @"Unknown";
}
if (DebuggerAttached == nil || DebuggerAttached.length <= 0) {
// Invalid value
DebuggerAttached = @"Unknown";
}
if (PluggedIn == nil || PluggedIn.length <= 0) {
// Invalid value
PluggedIn = @"Unknown";
}
if (Jailbroken == nil || Jailbroken.length <= 0) {
// Invalid value
Jailbroken = @"Unknown";
}
if (NumberProcessors == nil || NumberProcessors.length <= 0) {
// Invalid value
NumberProcessors = @"Unknown";
}
if (NumberActiveProcessors == nil || NumberActiveProcessors.length <= 0) {
// Invalid value
NumberActiveProcessors = @"Unknown";
}
if (ProcessorSpeed == nil || ProcessorSpeed.length <= 0) {
// Invalid value
ProcessorSpeed = @"Unknown";
}
if (ProcessorBusSpeed == nil || ProcessorBusSpeed.length <= 0) {
// Invalid value
ProcessorBusSpeed = @"Unknown";
}
if (AccessoriesAttached == nil || AccessoriesAttached.length <= 0) {
// Invalid value
AccessoriesAttached = @"Unknown";
}
if (HeadphonesAttached == nil || HeadphonesAttached.length <= 0) {
// Invalid value
HeadphonesAttached = @"Unknown";
}
if (NumberAttachedAccessories == nil || NumberAttachedAccessories.length <= 0) {
// Invalid value
NumberAttachedAccessories = @"Unknown";
}
if (NameAttachedAccessories == nil || NameAttachedAccessories.length <= 0) {
// Invalid value
NameAttachedAccessories = @"Unknown";
}
if (CarrierName == nil || CarrierName.length <= 0) {
// Invalid value
CarrierName = @"Unknown";
}
if (CarrierCountry == nil || CarrierCountry.length <= 0) {
// Invalid value
CarrierCountry = @"Unknown";
}
if (CarrierMobileCountryCode == nil || CarrierMobileCountryCode.length <= 0) {
// Invalid value
CarrierMobileCountryCode = @"Unknown";
}
if (CarrierISOCountryCode == nil || CarrierISOCountryCode.length <= 0) {
// Invalid value
CarrierISOCountryCode = @"Unknown";
}
if (CarrierMobileNetworkCode == nil || CarrierMobileNetworkCode.length <= 0) {
// Invalid value
CarrierMobileNetworkCode = @"Unknown";
}
if (CarrierAllowsVOIP == nil || CarrierAllowsVOIP.length <= 0) {
// Invalid value
CarrierAllowsVOIP = @"Unknown";
}
if (BatteryLevel == nil || BatteryLevel.length <= 0) {
// Invalid value
BatteryLevel = @"Unknown";
}
if (Charging == nil || Charging.length <= 0) {
// Invalid value
Charging = @"Unknown";
}
if (FullyCharged == nil || FullyCharged.length <= 0) {
// Invalid value
FullyCharged = @"Unknown";
}
if (CurrentIPAddress == nil || CurrentIPAddress.length <= 0) {
// Invalid value
CurrentIPAddress = @"Unknown";
}
if (CurrentMACAddress == nil || CurrentMACAddress.length <= 0) {
// Invalid value
CurrentMACAddress = @"Unknown";
}
if (ExternalIPAddress == nil || ExternalIPAddress.length <= 0) {
// Invalid value
ExternalIPAddress = @"Unknown";
}
if (CellIPAddress == nil || CellIPAddress.length <= 0) {
// Invalid value
CellIPAddress = @"Unknown";
}
if (CellMACAddress == nil || CellMACAddress.length <= 0) {
// Invalid value
CellMACAddress = @"Unknown";
}
if (CellNetmaskAddress == nil || CellNetmaskAddress.length <= 0) {
// Invalid value
CellNetmaskAddress = @"Unknown";
}
if (CellBroadcastAddress == nil || CellBroadcastAddress.length <= 0) {
// Invalid value
CellBroadcastAddress = @"Unknown";
}
if (WiFiIPAddress == nil || WiFiIPAddress.length <= 0) {
// Invalid value
WiFiIPAddress = @"Unknown";
}
if (WiFiMACAddress == nil || WiFiMACAddress.length <= 0) {
// Invalid value
WiFiMACAddress = @"Unknown";
}
if (WiFiNetmaskAddress == nil || WiFiNetmaskAddress.length <= 0) {
// Invalid value
WiFiNetmaskAddress = @"Unknown";
}
if (WiFiBroadcastAddress == nil || WiFiBroadcastAddress.length <= 0) {
// Invalid value
WiFiBroadcastAddress = @"Unknown";
}
if (WiFiRouterAddress == nil || WiFiRouterAddress.length <= 0) {
// Invalid value
WiFiRouterAddress = @"Unknown";
}
if (ConnectedToWiFi == nil || ConnectedToWiFi.length <= 0) {
// Invalid value
ConnectedToWiFi = @"Unknown";
}
if (ConnectedToCellNetwork == nil || ConnectedToCellNetwork.length <= 0) {
// Invalid value
ConnectedToCellNetwork = @"Unknown";
}
if (ProcessID == nil || ProcessID.length <= 0) {
// Invalid value
ProcessID = @"Unknown";
}
if (ProcessName == nil || ProcessName.length <= 0) {
// Invalid value
ProcessName = @"Unknown";
}
if (ProcessStatus == nil || ProcessStatus.length <= 0) {
// Invalid value
ProcessStatus = @"Unknown";
}
if (ParentPID == nil || ParentPID.length <= 0) {
// Invalid value
ParentPID = @"Unknown";
}
if (ProcessesInformation == nil || ProcessesInformation.count <= 0) {
// Invalid value
ProcessesInformation = [NSMutableArray arrayWithObject:@"Unknown"];
}
if (DiskSpace == nil || DiskSpace.length <= 0) {
// Invalid value
DiskSpace = @"Unknown";
}
if (FreeDiskSpaceNO == nil || FreeDiskSpaceNO.length <= 0) {
// Invalid value
FreeDiskSpaceNO = @"Unknown";
}
if (FreeDiskSpaceYES == nil || FreeDiskSpaceYES.length <= 0) {
// Invalid value
FreeDiskSpaceYES = @"Unknown";
}
if (UsedDiskSpaceNO == nil || UsedDiskSpaceNO.length <= 0) {
// Invalid value
UsedDiskSpaceNO = @"Unknown";
}
if (UsedDiskSpaceYES == nil || UsedDiskSpaceYES.length <= 0) {
// Invalid value
UsedDiskSpaceYES = @"Unknown";
}
if (LongDiskSpace == nil || LongDiskSpace.length <= 0) {
// Invalid value
LongDiskSpace = @"Unknown";
}
if (LongFreeDiskSpace == nil || LongFreeDiskSpace.length <= 0) {
// Invalid value
LongFreeDiskSpace = @"Unknown";
}
if (TotalMemory == nil || TotalMemory.length <= 0) {
// Invalid value
TotalMemory = @"Unknown";
}
if (FreeMemoryNO == nil || FreeMemoryNO.length <= 0) {
// Invalid value
FreeMemoryNO = @"Unknown";
}
if (FreeMemoryYES == nil || FreeMemoryYES.length <= 0) {
// Invalid value
FreeMemoryYES = @"Unknown";
}
if (UsedMemoryNO == nil || UsedMemoryNO.length <= 0) {
// Invalid value
UsedMemoryNO = @"Unknown";
}
if (UsedMemoryYES == nil || UsedMemoryYES.length <= 0) {
// Invalid value
UsedMemoryYES = @"Unknown";
}
if (ActiveMemoryNO == nil || ActiveMemoryNO.length <= 0) {
// Invalid value
ActiveMemoryNO = @"Unknown";
}