Skip to content

Commit

Permalink
Swifty APIs (#176)
Browse files Browse the repository at this point in the history
* Convert OAuth to Swifty API

* Translated more Swift 3 APIs

* Update tests for new SDK API

* Remove TODO comment
  • Loading branch information
edjiang authored Sep 13, 2017
1 parent 5b1d143 commit ffddf05
Show file tree
Hide file tree
Showing 56 changed files with 674 additions and 893 deletions.
6 changes: 5 additions & 1 deletion source/TestAppShim/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</array>
<key>UberClientID</key>
<string>UberTestClientID</string>
<key>UberDisplayName</key>
<string>UberTestDisplayName</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions source/UberRides/AppStoreDeeplink.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ import Foundation
let domain = "m.uber.com"
let path = "/sign-up"

let clientIDQueryItem = URLQueryItem(name: "client_id", value: Configuration.getClientID())
let clientIDQueryItem = URLQueryItem(name: "client_id", value: Configuration.shared.clientID)

let userAgent = userAgent ?? "rides-ios-v\(Configuration.sdkVersion)"
let userAgent = userAgent ?? "rides-ios-v\(Configuration.shared.sdkVersion)"

let userAgentQueryItem = URLQueryItem(name: "user-agent", value: userAgent)

Expand Down
4 changes: 2 additions & 2 deletions source/UberRides/BaseDeeplink.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ import Foundation
- parameter completion: The completion block to execute once the deeplink has
executed. Passes in True if the url was successfully opened, false otherwise.
*/
@objc open func execute(_ completion: ((NSError?) -> ())? = nil) {
@objc open func execute(completion: ((NSError?) -> ())? = nil) {

let usingIOS9 = ProcessInfo().isOperatingSystemAtLeast(OperatingSystemVersion(majorVersion: 9, minorVersion: 0, patchVersion: 0))

if usingIOS9 {
Expand Down
Loading

0 comments on commit ffddf05

Please sign in to comment.