Skip to content
This repository was archived by the owner on Mar 20, 2019. It is now read-only.

Updates for iOS 9#28

Open
xinmyname wants to merge 1 commit intoAzure:masterfrom
xinmyname:master
Open

Updates for iOS 9#28
xinmyname wants to merge 1 commit intoAzure:masterfrom
xinmyname:master

Conversation

@xinmyname
Copy link

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

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) {
Copy link

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;
Copy link

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

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.


reg.RegistrationName = [SBNotificationHubHelper nameOfRegistration:registration];
reg.registrationId = registration.registrationId;
reg.RegistrationId = registration.registrationId;

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants