Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agios 525.swift3.release #91

Merged
merged 3 commits into from Nov 16, 2016

Conversation

aidenkeating
Copy link
Contributor

No description provided.

@aidenkeating
Copy link
Contributor Author

@jcesarmobile Could you take a look at this please?

@aidenkeating
Copy link
Contributor Author

@corinnekrych Would you also mind having a look please?

@corinnekrych
Copy link
Contributor

@aidenkeating I think we should revisit the Swift3 API (open method) for ex:
https://github.com/aerogear/aerogear-ios-push/blob/master/push-sdk-swift/DeviceRegistration.swift#L102
should be renamed

register(clientInfo: ((config: ClientDeviceInformation) -> Void)!,
        success:(() -> Void)!, failure:((NSError) -> Void)!) -> Void

to follow Swift3 API design:
https://github.com/corinnekrych/Swift3Tour/blob/master/Swift3Tour.playground/Pages/API%20Design%20Guide.xcplaygroundpage/Contents.swift#L73

@aidenkeating we missed that in this PR:
#89

@jcesarmobile do you agree?

@@ -69,7 +69,7 @@ open class DeviceRegistration: NSObject, URLSessionTaskDelegate {
self.session = Foundation.URLSession(configuration: sessionConfig, delegate: self, delegateQueue: OperationQueue.main)
}

open func overridePushProperties(_ pushProperties: [String: String]) {
open func overridePushProperties(pushProperties: [String: String]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remane to override(pushProperties:
the PushProperties becomes redundant in the function name since we have a label as first parram

@@ -204,7 +204,7 @@ open class DeviceRegistration: NSObject, URLSessionTaskDelegate {
We need to 'override' that 'default' behaviour to return the original attempted NSURLRequest
with the URL parameter updated to point to the new 'Location' header.
*/
open func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection redirectResponse: HTTPURLResponse, newRequest redirectReq: URLRequest, completionHandler: (@escaping (URLRequest?) -> Void)) {
open func urlSession(session: URLSession, task: URLSessionTask, willPerformHTTPRedirection redirectResponse: HTTPURLResponse, newRequest redirectReq: URLRequest, completionHandler: (@escaping (URLRequest?) -> Void)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one keep _ because it is inherited.

@corinnekrych
Copy link
Contributor

@aidenkeating
Copy link
Contributor Author

@corinnekrych Are the PushAnalytics changes you recommend not made here?

https://github.com/aerogear/aerogear-ios-push/pull/91/files#diff-07bdc4a2fe51d48489af20c79e9379d3L37

@corinnekrych
Copy link
Contributor

@aidenkeating yes! all good ignore that last commnet

@corinnekrych
Copy link
Contributor

+1 LGTM
ready for a release

@corinnekrych corinnekrych merged commit e639f08 into aerogear:master Nov 16, 2016
@aidenkeating aidenkeating deleted the AGIOS-525.swift3.release branch November 16, 2016 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants