Skip to content

Commit 8bbd7ba

Browse files
KramerKramer
authored andcommitted
Added Nullability support
1 parent 0a89193 commit 8bbd7ba

File tree

11 files changed

+64
-64
lines changed

11 files changed

+64
-64
lines changed

System Services/SystemServices.h

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,38 +26,38 @@
2626
@interface SystemServices : NSObject
2727

2828
// Shared Manager
29-
+ (id)sharedServices;
29+
+ (_Nonnull id)sharedServices;
3030

3131
// Parent ID for a certain PID
3232
- (int)parentPIDForProcess:(int)pid;
3333

3434
// Properties
3535

3636
/* All System Information in Dictionary Format */
37-
@property (nonatomic, readonly) NSDictionary *allSystemInformation;
37+
@property (nonatomic, readonly, nullable) NSDictionary *allSystemInformation;
3838

3939
/* Hardware Information */
4040

4141
// System Uptime (dd hh mm)
42-
@property (nonatomic, readonly) NSString *systemsUptime;
42+
@property (nonatomic, readonly, nullable) NSString *systemsUptime;
4343

4444
// Model of Device
45-
@property (nonatomic, readonly) NSString *deviceModel;
45+
@property (nonatomic, readonly, nullable) NSString *deviceModel;
4646

4747
// Device Name
48-
@property (nonatomic, readonly) NSString *deviceName;
48+
@property (nonatomic, readonly, nullable) NSString *deviceName;
4949

5050
// System Name
51-
@property (nonatomic, readonly) NSString *systemName;
51+
@property (nonatomic, readonly, nullable) NSString *systemName;
5252

5353
// System Version
54-
@property (nonatomic, readonly) NSString *systemsVersion;
54+
@property (nonatomic, readonly, nullable) NSString *systemsVersion;
5555

5656
// System Device Type (Not Formatted = iPhone1,0)
57-
@property (nonatomic, readonly) NSString *systemDeviceTypeNotFormatted;
57+
@property (nonatomic, readonly, nullable) NSString *systemDeviceTypeNotFormatted;
5858

5959
// System Device Type (Formatted = iPhone 1)
60-
@property (nonatomic, readonly) NSString *systemDeviceTypeFormatted;
60+
@property (nonatomic, readonly, nullable) NSString *systemDeviceTypeFormatted;
6161

6262
// Get the Screen Width (X)
6363
@property (nonatomic, readonly) NSInteger screenWidth;
@@ -111,24 +111,24 @@
111111
@property (nonatomic, readonly) NSInteger numberAttachedAccessories;
112112

113113
// Name of attached accessory/accessories (seperated by , comma's)
114-
@property (nonatomic, readonly) NSString *nameAttachedAccessories;
114+
@property (nonatomic, readonly, nullable) NSString *nameAttachedAccessories;
115115

116116
/* Carrier Information */
117117

118118
// Carrier Name
119-
@property (nonatomic, readonly) NSString *carrierName;
119+
@property (nonatomic, readonly, nullable) NSString *carrierName;
120120

121121
// Carrier Country
122-
@property (nonatomic, readonly) NSString *carrierCountry;
122+
@property (nonatomic, readonly, nullable) NSString *carrierCountry;
123123

124124
// Carrier Mobile Country Code
125-
@property (nonatomic, readonly) NSString *carrierMobileCountryCode;
125+
@property (nonatomic, readonly, nullable) NSString *carrierMobileCountryCode;
126126

127127
// Carrier ISO Country Code
128-
@property (nonatomic, readonly) NSString *carrierISOCountryCode;
128+
@property (nonatomic, readonly, nullable) NSString *carrierISOCountryCode;
129129

130130
// Carrier Mobile Network Code
131-
@property (nonatomic, readonly) NSString *carrierMobileNetworkCode;
131+
@property (nonatomic, readonly, nullable) NSString *carrierMobileNetworkCode;
132132

133133
// Carrier Allows VOIP
134134
@property (nonatomic, readonly) BOOL carrierAllowsVOIP;
@@ -194,7 +194,7 @@
194194
@property (nonatomic, readonly) int processID;
195195

196196
// Process Name
197-
@property (nonatomic, readonly) NSString *processName;
197+
@property (nonatomic, readonly, nullable) NSString *processName;
198198

199199
// Process Status
200200
@property (nonatomic, readonly) int processStatus;
@@ -203,24 +203,24 @@
203203
@property (nonatomic, readonly) int parentPID;
204204

205205
// List of process information including PID's, Names, PPID's, and Status'
206-
@property (nonatomic, readonly) NSMutableArray *processesInformation;
206+
@property (nonatomic, readonly, nullable) NSMutableArray *processesInformation;
207207

208208
/* Disk Information */
209209

210210
// Total Disk Space
211-
@property (nonatomic, readonly) NSString *diskSpace;
211+
@property (nonatomic, readonly, nullable) NSString *diskSpace;
212212

213213
// Total Free Disk Space (Raw)
214-
@property (nonatomic, readonly) NSString *freeDiskSpaceinRaw;
214+
@property (nonatomic, readonly, nullable) NSString *freeDiskSpaceinRaw;
215215

216216
// Total Free Disk Space (Percentage)
217-
@property (nonatomic, readonly) NSString *freeDiskSpaceinPercent;
217+
@property (nonatomic, readonly, nullable) NSString *freeDiskSpaceinPercent;
218218

219219
// Total Used Disk Space (Raw)
220-
@property (nonatomic, readonly) NSString *usedDiskSpaceinRaw;
220+
@property (nonatomic, readonly, nullable) NSString *usedDiskSpaceinRaw;
221221

222222
// Total Used Disk Space (Percentage)
223-
@property (nonatomic, readonly) NSString *usedDiskSpaceinPercent;
223+
@property (nonatomic, readonly, nullable) NSString *usedDiskSpaceinPercent;
224224

225225
// Get the total disk space in long format
226226
@property (nonatomic, readonly) long long longDiskSpace;
@@ -277,35 +277,35 @@
277277
/* Localization Information */
278278

279279
// Country
280-
@property (nonatomic, readonly) NSString *country;
280+
@property (nonatomic, readonly, nullable) NSString *country;
281281

282282
// Language
283-
@property (nonatomic, readonly) NSString *language;
283+
@property (nonatomic, readonly, nullable) NSString *language;
284284

285285
// TimeZone
286-
@property (nonatomic, readonly) NSString *timeZoneSS;
286+
@property (nonatomic, readonly, nullable) NSString *timeZoneSS;
287287

288288
// Currency Symbol
289-
@property (nonatomic, readonly) NSString *currency;
289+
@property (nonatomic, readonly, nullable) NSString *currency;
290290

291291
/* Application Information */
292292

293293
// Application Version
294-
@property (nonatomic, readonly) NSString *applicationVersion;
294+
@property (nonatomic, readonly, nullable) NSString *applicationVersion;
295295

296296
// Clipboard Content
297-
@property (nonatomic, readonly) NSString *clipboardContent;
297+
@property (nonatomic, readonly, nullable) NSString *clipboardContent;
298298

299299
/* Universal Unique Identifiers */
300300

301301
// Unique ID
302-
@property (nonatomic, readonly) NSString *uniqueID;
302+
@property (nonatomic, readonly, nullable) NSString *uniqueID;
303303

304304
// Device Signature
305-
@property (nonatomic, readonly) NSString *deviceSignature;
305+
@property (nonatomic, readonly, nullable) NSString *deviceSignature;
306306

307307
// CFUUID
308-
@property (nonatomic, readonly) NSString *cfuuid;
308+
@property (nonatomic, readonly, nullable) NSString *cfuuid;
309309

310310
// CPU Usage
311311
@property (nonatomic, readonly) float cpuUsage;

System Services/Utilities/SSAccelerometerInfo.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,25 @@
2626
+ (UIInterfaceOrientation)deviceOrientation;
2727

2828
// Attitude
29-
@property (nonatomic, readonly) NSString *attitudeString;
29+
@property (nonatomic, readonly, nullable) NSString *attitudeString;
3030

3131
// Gravity
32-
@property (nonatomic, readonly) NSString *gravityString;
32+
@property (nonatomic, readonly, nullable) NSString *gravityString;
3333

3434
// Magnetic Field
35-
@property (nonatomic, readonly) NSString *magneticFieldString;
35+
@property (nonatomic, readonly, nullable) NSString *magneticFieldString;
3636

3737
// Rotation Rate
38-
@property (nonatomic, readonly) NSString *rotationRateString;
38+
@property (nonatomic, readonly, nullable) NSString *rotationRateString;
3939

4040
// User Acceleration
41-
@property (nonatomic, readonly) NSString *userAccelerationString;
41+
@property (nonatomic, readonly, nullable) NSString *userAccelerationString;
4242

4343
// Raw Gyroscope
44-
@property (nonatomic, readonly) NSString *rawGyroscopeString;
44+
@property (nonatomic, readonly, nullable) NSString *rawGyroscopeString;
4545

4646
// Raw Accelerometer
47-
@property (nonatomic, readonly) NSString *rawAccelerometerString;
47+
@property (nonatomic, readonly, nullable) NSString *rawAccelerometerString;
4848

4949
/**
5050
* startLoggingMotionData

System Services/Utilities/SSAccessoryInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
+ (NSInteger)numberAttachedAccessories;
2323

2424
// Name of attached accessory/accessories (seperated by , comma's)
25-
+ (NSString *)nameAttachedAccessories;
25+
+ (nullable NSString *)nameAttachedAccessories;
2626

2727
@end

System Services/Utilities/SSApplicationInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
// Application Information
1515

1616
// Application Version
17-
+ (NSString *)applicationVersion;
17+
+ (nullable NSString *)applicationVersion;
1818

1919
// Clipboard Content
20-
+ (NSString *)clipboardContent;
20+
+ (nullable NSString *)clipboardContent;
2121

2222
// Application CPU Usage
2323
+ (float)cpuUsage;

System Services/Utilities/SSCarrierInfo.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
// Carrier Information
1414

1515
// Carrier Name
16-
+ (NSString *)carrierName;
16+
+ (nullable NSString *)carrierName;
1717

1818
// Carrier Country
19-
+ (NSString *)carrierCountry;
19+
+ (nullable NSString *)carrierCountry;
2020

2121
// Carrier Mobile Country Code
22-
+ (NSString *)carrierMobileCountryCode;
22+
+ (nullable NSString *)carrierMobileCountryCode;
2323

2424
// Carrier ISO Country Code
25-
+ (NSString *)carrierISOCountryCode;
25+
+ (nullable NSString *)carrierISOCountryCode;
2626

2727
// Carrier Mobile Network Code
28-
+ (NSString *)carrierMobileNetworkCode;
28+
+ (nullable NSString *)carrierMobileNetworkCode;
2929

3030
// Carrier Allows VOIP
3131
+ (BOOL)carrierAllowsVOIP;

System Services/Utilities/SSDiskInfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
// Disk Information
1414

1515
// Total Disk Space
16-
+ (NSString *)diskSpace;
16+
+ (nullable NSString *)diskSpace;
1717

1818
// Total Free Disk Space
19-
+ (NSString *)freeDiskSpace:(BOOL)inPercent;
19+
+ (nullable NSString *)freeDiskSpace:(BOOL)inPercent;
2020

2121
// Total Used Disk Space
22-
+ (NSString *)usedDiskSpace:(BOOL)inPercent;
22+
+ (nullable NSString *)usedDiskSpace:(BOOL)inPercent;
2323

2424
// Get the total disk space in long format
2525
+ (long long)longDiskSpace;

System Services/Utilities/SSHardwareInfo.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
// System Hardware Information
1414

1515
// System Uptime (dd hh mm)
16-
+ (NSString *)systemUptime;
16+
+ (nullable NSString *)systemUptime;
1717

1818
// Model of Device
19-
+ (NSString *)deviceModel;
19+
+ (nullable NSString *)deviceModel;
2020

2121
// Device Name
22-
+ (NSString *)deviceName;
22+
+ (nullable NSString *)deviceName;
2323

2424
// System Name
25-
+ (NSString *)systemName;
25+
+ (nullable NSString *)systemName;
2626

2727
// System Version
28-
+ (NSString *)systemVersion;
28+
+ (nullable NSString *)systemVersion;
2929

3030
// System Device Type (iPhone1,0) (Formatted = iPhone 1)
31-
+ (NSString *)systemDeviceTypeFormatted:(BOOL)formatted;
31+
+ (nullable NSString *)systemDeviceTypeFormatted:(BOOL)formatted;
3232

3333
// Get the Screen Width (X)
3434
+ (NSInteger)screenWidth;

System Services/Utilities/SSLocalizationInfo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
// Localization Information
1414

1515
// Country
16-
+ (NSString *)country;
16+
+ (nullable NSString *)country;
1717

1818
// Language
19-
+ (NSString *)language;
19+
+ (nullable NSString *)language;
2020

2121
// TimeZone
22-
+ (NSString *)timeZone;
22+
+ (nullable NSString *)timeZone;
2323

2424
// Currency Symbol
25-
+ (NSString *)currency;
25+
+ (nullable NSString *)currency;
2626

2727
@end

System Services/Utilities/SSProcessInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ NS_CLASS_DEPRECATED_IOS(2_0, 9_0, "SSProcessInfo is deprecated. Process informat
1717
+ (int)processID;
1818

1919
// Process Name
20-
+ (NSString *)processName;
20+
+ (nullable NSString *)processName;
2121

2222
// Process Status
2323
+ (int)processStatus;
@@ -29,6 +29,6 @@ NS_CLASS_DEPRECATED_IOS(2_0, 9_0, "SSProcessInfo is deprecated. Process informat
2929
+ (int)parentPIDForProcess:(int)pid;
3030

3131
// List of process information including PID's, Names, PPID's, and Status'
32-
+ (NSMutableArray *)processesInformation;
32+
+ (nullable NSMutableArray *)processesInformation;
3333

3434
@end

System Services/Utilities/SSUUID.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
// Universal Unique Identifiers
1414

1515
// Unique ID - Unique Identifier based on unchanging information about the device
16-
+ (NSString *)uniqueID NS_DEPRECATED_IOS(2_0, 8_0);
16+
+ (nullable NSString *)uniqueID NS_DEPRECATED_IOS(2_0, 8_0);
1717

1818
// Device Signature - Device Signature based on assorted information about the device including: SystemVersion, ScreenHeight, ScreenWidth, PluggedIn, Jailbroken, HeadphonesAttached, BatteryLevel, FullyCharged, ConnectedtoWiFi, DeviceOrientation, Country, TimeZone, NumberProcessors, ProcessorSpeed, TotalDiskSpace, TotalMemory, and a Salt
19-
+ (NSString *)deviceSignature NS_DEPRECATED_IOS(2_0, 8_0);
19+
+ (nullable NSString *)deviceSignature NS_DEPRECATED_IOS(2_0, 8_0);
2020

2121
// CFUUID - Random Unique Identifier that changes every time
22-
+ (NSString *)cfuuid;
22+
+ (nullable NSString *)cfuuid;
2323

2424
@end

0 commit comments

Comments
 (0)