Skip to content

Commit aaab75d

Browse files
須藤将史須藤将史
authored andcommitted
Add _Nonnull or _Nullable
1 parent 89e6cb2 commit aaab75d

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

Demo/StudyplusSDKDemo/StudyplusSDK/SPLStudyplus.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#import "SPLStudyplusRecordAmount.h"
2626
#import "SPLStopwatch.h"
2727

28+
NS_ASSUME_NONNULL_BEGIN
29+
2830
/**
2931
The class for using Studyplus.<br>
3032
For example, you can authenticate in Studyplus account, de-authentication, and post study record.
@@ -67,7 +69,7 @@
6769
/**
6870
@see SPLStudyplusDelegate protocol
6971
*/
70-
@property (nonatomic, weak) id<SPLStudyplusDelegate> delegate;
72+
@property (nonatomic, weak, nullable) id<SPLStudyplusDelegate> delegate;
7173

7274
/**
7375
When set to YES, if Studyplus is not installed, AppStore application starts when auth/login methods are called. Default value is YES.<br>
@@ -79,18 +81,18 @@
7981
Username of Studyplus account. It is set when the auth or login is successful. Default value is nil.<br>
8082
Studyplusアカウントのユーザ名です。login または authが成功したとき設定されます。設定されるまではnilです。
8183
*/
82-
@property (nonatomic, copy, readonly) NSString *username;
84+
@property (nonatomic, copy, readonly, nullable) NSString *username;
8385

8486
/**
8587
Access token of Studyplus API. It is set when the auth or login is successful. Default value is nil.<br>
8688
StudyplusAPIのアクセストークンです。login または authが成功したとき設定されます。設定されるまではnilです。
8789
*/
88-
@property (nonatomic, copy, readonly) NSString *accessToken;
90+
@property (nonatomic, copy, readonly, nullable) NSString *accessToken;
8991

9092
/**
9193
@see SPLStopwatch class
9294
*/
93-
@property (nonatomic, readonly) SPLStopwatch *stopwatch;
95+
@property (nonatomic, readonly, nullable) SPLStopwatch *stopwatch;
9496

9597
/**
9698
The convenience constructor of SPLStudyplus class.
@@ -182,4 +184,6 @@
182184
*/
183185
- (BOOL)openURL:(NSURL*)url;
184186

187+
NS_ASSUME_NONNULL_END
188+
185189
@end

Demo/StudyplusSDKDemo/StudyplusSDK/SPLStudyplusAPIRequest.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,18 @@
2222

2323
#import <Foundation/Foundation.h>
2424

25+
NS_ASSUME_NONNULL_BEGIN
26+
2527
@interface SPLStudyplusAPIRequest : NSObject
2628

2729
+ (SPLStudyplusAPIRequest*)newRequestWithAccessToken:(NSString*)accessToken
2830
options:(NSDictionary*)options;
2931

3032
- (void)postRequestWithPath:(NSString *)path
3133
requestParameter:(NSDictionary *)requestParameter
32-
completed:(void(^)(NSDictionary *response))completed
34+
completed:(void(^)(NSDictionary * _Nullable response))completed
3335
failed:(void(^)(NSError *error))failed;
3436

37+
NS_ASSUME_NONNULL_END
38+
3539
@end

Demo/StudyplusSDKDemo/StudyplusSDK/SPLStudyplusRecord.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#import <Foundation/Foundation.h>
2424

25+
NS_ASSUME_NONNULL_BEGIN
26+
2527
@class SPLStudyplusRecordAmount;
2628

2729
/**
@@ -54,7 +56,7 @@
5456
The comment of learning.<br>
5557
勉強に関するコメントです。
5658
*/
57-
@property (nonatomic, readonly) NSString *comment;
59+
@property (nonatomic, readonly, nullable) NSString *comment;
5860

5961
/**
6062
Creates and returns StudyplusRecord object that has number of seconds, no amount, and empty comment.<br>
@@ -87,11 +89,13 @@
8789
8890
@result StudyplusRecord object.
8991
*/
90-
+ (SPLStudyplusRecord*)recordWithDuration:(NSTimeInterval)duration options:(NSDictionary*)options;
92+
+ (SPLStudyplusRecord*)recordWithDuration:(NSTimeInterval)duration options:(NSDictionary* _Nullable)options;
9193

9294
/**
9395
@result Returns the parameters of the study record for posting API
9496
*/
9597
- (NSDictionary*)toRequestParam;
9698

99+
NS_ASSUME_NONNULL_END
100+
97101
@end

Demo/StudyplusSDKDemo/StudyplusSDK/SPLStudyplusRecordAmount.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#import <Foundation/Foundation.h>
2424

25+
NS_ASSUME_NONNULL_BEGIN
26+
2527
/**
2628
The class that represents the amount of learning. <br>
2729
学習量を表すクラスです。
@@ -59,4 +61,6 @@
5961
*/
6062
- (NSDictionary*)toRequestParameter;
6163

64+
NS_ASSUME_NONNULL_END
65+
6266
@end

0 commit comments

Comments
 (0)