diff --git a/ios/RocketRides/AppDelegate.swift b/ios/RocketRides/AppDelegate.swift index 17788ce..21a70ab 100644 --- a/ios/RocketRides/AppDelegate.swift +++ b/ios/RocketRides/AppDelegate.swift @@ -59,7 +59,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { STPTheme.default().primaryBackgroundColor = .riderVeryLightGrayColor STPTheme.default().primaryForegroundColor = .riderDarkBlueColor STPTheme.default().secondaryForegroundColor = .riderDarkGrayColor - STPTheme.default().accentColor = .riderBlueColor + STPTheme.default().accentColor = .riderGreenColor // Main API client configuration MainAPIClient.shared.baseURLString = baseURLString diff --git a/ios/RocketRides/LocationSearchViewCell.swift b/ios/RocketRides/LocationSearchViewCell.swift index 174fd36..a6a6074 100644 --- a/ios/RocketRides/LocationSearchViewCell.swift +++ b/ios/RocketRides/LocationSearchViewCell.swift @@ -1,5 +1,5 @@ // -// LocationCell.swift +// LocationSearchViewCell.swift // RocketRides // // Created by Romain Huet on 5/26/16. diff --git a/ios/RocketRides/LocationSearchViewController.swift b/ios/RocketRides/LocationSearchViewController.swift index 2d7b88a..4a8c3e4 100644 --- a/ios/RocketRides/LocationSearchViewController.swift +++ b/ios/RocketRides/LocationSearchViewController.swift @@ -33,8 +33,7 @@ class LocationSearchViewController: UIViewController, UITableViewDataSource, UIT let searchBarFont = UIFont.systemFont(ofSize: 17.0) UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).font = searchBarFont - UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).defaultTextAttributes = [NSFontAttributeName: searchBarFont] - + UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).defaultTextAttributes = [NSFontAttributeName: searchBarFont, NSForegroundColorAttributeName: UIColor.riderDarkBlueColor] } override func viewWillAppear(_ animated: Bool) { diff --git a/ios/RocketRides/MainAPIClient.swift b/ios/RocketRides/MainAPIClient.swift index 004fc4a..f49f36a 100644 --- a/ios/RocketRides/MainAPIClient.swift +++ b/ios/RocketRides/MainAPIClient.swift @@ -1,5 +1,5 @@ // -// APIClient.swift +// MainAPIClient.swift // RocketRides // // Created by Romain Huet on 5/26/16. @@ -33,6 +33,9 @@ class MainAPIClient: NSObject, STPEphemeralKeyProvider { return } + // Important: For this demo, we're trusting the `amount` and `currency` coming from the client request. + // A real application should absolutely have the `amount` and `currency` securely computed on the backend + // to make sure the user can't change the payment amount from their web browser or client-side environment. let parameters: [String: Any] = [ "source": source, "amount": amount, diff --git a/ios/RocketRides/Ride.swift b/ios/RocketRides/Ride.swift index c90bd25..0c39a77 100644 --- a/ios/RocketRides/Ride.swift +++ b/ios/RocketRides/Ride.swift @@ -1,5 +1,5 @@ // -// RideRequest.swift +// Ride.swift // RocketRides // // Created by Romain Huet on 5/31/16. diff --git a/ios/RocketRides/RideRequestViewController.swift b/ios/RocketRides/RideRequestViewController.swift index 8924929..4305eb5 100644 --- a/ios/RocketRides/RideRequestViewController.swift +++ b/ios/RocketRides/RideRequestViewController.swift @@ -111,6 +111,7 @@ class RideRequestViewController: UIViewController, STPPaymentContextDelegate, Lo // Request location services authorization locationManager.requestWhenInUseAuthorization() + locationManager.startUpdatingLocation() } // MARK: Button Handlers diff --git a/ios/RocketRides/RocketPathOverlay.swift b/ios/RocketRides/RocketPathOverlay.swift index f1f32aa..73a6729 100644 --- a/ios/RocketRides/RocketPathOverlay.swift +++ b/ios/RocketRides/RocketPathOverlay.swift @@ -1,5 +1,5 @@ // -// CurvedPolylineRenderer.swift +// RocketPathOverlay.swift // RocketRides // // Created by Joey Dong on 8/2/17. @@ -43,7 +43,7 @@ class RocketPathOverlayRenderer: MKOverlayRenderer { private let rocketPathOverlay: RocketPathOverlay - var lineWidth: CGFloat = 5.0 + var lineWidth: CGFloat = 10.0 var strokeColor: UIColor? var arcMultiplier: CGFloat = 1.5 diff --git a/ios/RocketRides/UIView+Utility.swift b/ios/RocketRides/UIView+Utility.swift index b75fd87..a1e0c9f 100644 --- a/ios/RocketRides/UIView+Utility.swift +++ b/ios/RocketRides/UIView+Utility.swift @@ -10,7 +10,7 @@ import UIKit extension UIView { - /// Apply clipping mask on certain corners with corner radius + // Apply clipping mask on certain corners with corner radius func layoutCornerRadiusMask(corners: UIRectCorner, cornerRadius: CGFloat) { let cornerRadii = CGSize(width: cornerRadius, height: cornerRadius) let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: corners, cornerRadii: cornerRadii) @@ -21,7 +21,7 @@ extension UIView { layer.mask = mask } - /// Apply corner radius and rounded shadow path + // Apply corner radius and rounded shadow path func layoutCornerRadiusAndShadow(cornerRadius: CGFloat) { // Apply corner radius for background fill only layer.cornerRadius = cornerRadius