-
Notifications
You must be signed in to change notification settings - Fork 127
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
Swifty APIs #176
Swifty APIs #176
Conversation
@@ -107,6 +107,7 @@ import MapKit | |||
|
|||
} | |||
|
|||
// TODO: fix |
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.
Let's not to commit TODOs.
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.
Done.
@@ -96,6 +96,7 @@ import UIKit | |||
|
|||
/** | |||
* Object representing an access scope to the Uber API | |||
* TODO: investigate why this is here |
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.
Let's not commit TODOs. Link an issue if there's followup work to do.
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.
Done.
@@ -87,48 +84,98 @@ import WebKit | |||
*/ | |||
@objc(UBSDKConfiguration) open class Configuration : NSObject { | |||
// MARK : Variables | |||
open static var shared: Configuration = Configuration() |
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.
Doesn't this put us back in the Singleton situation? Is this a stopgap, or what's intention here?
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.
As discussed in person, this leaves us in the singleton situation but opens the possibility to injecting Configuration()
objects into the RidesClient
in the future to support multiple profiles.
Update public APIs to adhere to the Swift API Design Guidelines.
Most of the changes in this PR are minor, and are related to renaming APIs, and renaming the consumer of the API in the tests.
The primary structural change in this PR is to change the
Configuration
from a static object to a singleton, which will allow us in the future to improve testability and pave the way for multiple Uber Clients, if necessary for the end developer.