/iOS9-Swift2-Uber-Clone

Sample application to implement Uber like business functionality but with different UX - Facebook for login, callouts for requesting/cancelling ride, driver uses TableView for accepting rides etc

Primary LanguageObjective-CApache License 2.0Apache-2.0

iOS9-Swift2-Uber-Clone

Swift 2, Facebook integration and Parse BaaS application that allow users to

  1. Login using their FaceBook credentials - access to public profile and email
  2. Signup for application with preference to show if the user is logging in as driver/rider
  3. Rider can long press on map to choose the pickup address - then click on pin to request Uber.
  4. Driver gets to see rides requested in 10 mile radius in table view including the picture, name and email of rider
  5. Driver can accept/reject ride
  6. Once the driver accepts the ride, he is moved to another screen where
  7. Show direction plot from current location to pickup point
  8. Type destination address - search matching address and able to choose 1 address
  9. Once driver "Starts" trip, he will be redirected to Apple maps so that he can see the directions to the destination,
  10. Once the driver is at the end of trip, he can stop directions and click on "Back To Uber" link to come back to the application.
  11. The driver can now end the trip. He will be redirected to the "Rides Requested" page
  12. Once the ride has been accepted, the rider can see where the driver is (via a car icon on screen) and the estimated time of arrival.

Pre-requisites

  1. XCode 7 with Swift 2 and iOS 9

Setup

  1. Clone the project from GitHub https://github.com/anilallewar/iOS9-Swift2-Uber-Clone
  2. Open Uber.xcodeproj in XCode.
  3. Parse setup
  4. Create a new project in Parse and note the application ID and client key for your application. Use the Parse Quickstart to get started quickly.
  5. Open the UberProject/AppDelegate.swift file and make changes for Parse application ID and client key.
        //Uncomment and fill in with your Parse credentials:
        Parse.setApplicationId("<<Your_Application_Id>>",
            clientKey: "<<Your_client_key>>")
  1. Facebook setup

  2. You can continue to use the existing facebook integration made with my id.

  3. If you need to create your own Facebook app for integration 1. Login in to Facebook Developers and add a new app. 2. Goto the "Settings" screen and add your email id, bundle id of your application which should be the same as the bundle identifier of your XCode project. 3. Goto the "Status & Review" screen and make the app and all it's live features available to the public. 4. Add the Facebook FBSDKCoreKit.framework and FBSDKLoginKit.framework bundles to the application; they are already bundled with this application. 5. Open the info.plist file and make changes to the following entries based on your Facebook app.

       ``` 
       
       <key>CFBundleURLTypes</key>
       <array>
           <dict>
               <key>CFBundleURLSchemes</key>
               <array>
                   <string><<Your value>></string>
               </array>
           </dict>
       </array>
       <key>FacebookAppID</key>
       <string><<Your value>></string>
       <key>FacebookDisplayName</key>
       <string><<Your value>></string>
       <key>LSApplicationQueriesSchemes</key>
       <array>
           <string>fbauth</string>
       </array>
       <key>NSAppTransportSecurity</key>
       <dict>
           <key>NSAllowsArbitraryLoads</key>
           <true/>
       </dict>
       ```
    

Note: Add the entries through info.plist at the end; don't copy-paste it in the source file. If the entries don't stay in order they create arbitary problems

  1. Build and run the application on the XCode simulator to signup using Facebook and enjoy the app!
  2. You might need to click on the login button again after initially providing the facebook credentials.

Screenshots

Login and Signup

screenshot1      screenshot2      screenshot3
screenshot4      screenshot5

Rider chooses trip start


screenshot6

    

screenshot7

    

screenshot8




screenshot9




screenshot10

    

screenshot11

    

screenshot12


--- ### Driver signs in

screenshot13


--- ### Driver accepts ride

screenshot14

    

screenshot15

    

screenshot16


screenshot17

    

screenshot18

    

screenshot19


--- ### Rider sees the driver's current location and ETA

screenshot27


--- ### Directions to destination

screenshot20

    

screenshot21

    

screenshot22


--- ### End trip

screenshot23

    

screenshot24

    

screenshot25



screenshot26


---