-
Notifications
You must be signed in to change notification settings - Fork 38
Updates for iOS 9 #28
base: master
Are you sure you want to change the base?
Conversation
Replaced deprecated API calls in urlEncode/urlDecode Use APIs for generating CSV tag list instead of manually concatenating Replaced deprecated NSURLConnection with NSURLSession in SBURLConnection
if(!theConnection && completion) | ||
|
||
NSURLSession* session = [NSURLSession sharedSession]; | ||
NSURLSessionDataTask* task = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable c_data, NSURLResponse * _Nullable c_response, NSError * _Nullable c_error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a big fan of the variable names here. For one, they are not using the regular casing and also, they are not very descriptive. In my opinion, they should use more verbose and descriptive names.
} | ||
|
||
self->_response = (NSHTTPURLResponse*)response; | ||
__block NSData* b_data = nil; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
SBURLConnectionCompletion _completion; | ||
NSMutableData *_data; | ||
} | ||
@interface SBURLConnection : NSObject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should rename the class/file name if we are now only using NSURLSession
.
@@ -83,7 +83,7 @@ - (void) updateWithRegistrationName: (NSString*) registrationName registration:( | |||
StoredRegistrationEntry* reg = [[StoredRegistrationEntry alloc] init]; | |||
|
|||
reg.RegistrationName = [SBNotificationHubHelper nameOfRegistration:registration]; | |||
reg.registrationId = registration.registrationId; | |||
reg.RegistrationId = registration.registrationId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should follow Apple convention on property names here so doing it the other way around, all properties' name of StoredRegistrationEntry
should start with a lowercase letter.
Corrected warnings on const strings and properties
Replaced deprecated API calls in urlEncode/urlDecode
Use APIs for generating CSV tag list instead of manually concatenating
Replaced deprecated NSURLConnection with NSURLSession in SBURLConnection