iOS App; Taking passengers to destination
Simple Taxi App that user can request ride to nearby drivers
- Basic features
Signup, Login, Profile, Setting, ...
- Set location and destination on the map
- Send request to nearby drivers
- Draw routes on the map when ride has made
- Messaging with driver
- Accept or decline incoming ride request
- Draw routes on the map when ride has made
- Messaging with user
Main language: Swift 4.0
- Implementing view controllers with individual xib interface
- TableView cell and CollectionView cell should be implemented independent xib file
- Register nib for table view cell
UITableView.register()
- Register nib for table view cell
- Showing map using Google Maps
GMSCoordinateBoundsis used to show multiple points in one screen - Adding border to view programmatically
func addBottomBorderWithColor(color: UIColor, width: CGFloat) {
// the height of view may change, so we use autoresizing
let border = UIView(frame: CGRect(x: 0, y: self.frame.size.height - width, width: self.frame.size.width, height: width))
border.backgroundColor = color
border.autoresizingMask = [.flexibleWidth, .flexibleTopMargin]
self.addSubview(border)
}- Getting location using
CLLocationManager()
locationManager.startUpdatingLocation() - Google Firebase for backend
- GeoFire for location saving & querying
- Push notification using Firebase Clound Messaging(FCM)
- Sending push notification from App for message feature
- Add data record to requests table {userId} / orderData
- Add marks to accepts table
{driverId} / {userId} / "request"
- Remove data from requests table
- Remove marks from accepts table
- Add data to picked table
{userId} / orderData
{driverId} / orderData
- Add data to arrived table
{userId} / {driverId} / true
- Add data to bookhistories table
{userId} / orderData
{driverId} / orderData - Remove data from arrived table
- Remove data from picked table
- /api/ephemeral_keys
Gets Stripe ephemeral key - /api/createCustomStripe
Creates Stripe cusomer Id for user - /connectStripe?email=mail address
Web url getting Stripe accound Id for driver
- /api/order
Sending payment from user to driver
Get Card List
https://stripe.com/docs/api/cards/list- Problems
Result object issourcewhen added in Android andcardwhen added in iOS version
- Problems
- Get All Sources for card list
https://api.stripe.com/v1/customers/{customerId}/sources
Card list in User Profile page - Create a Card
https://stripe.com/docs/api/cards/create
Add card in User Profile page
STPPaymentMethodsViewController
Cards and Bank Accounts page in SettingsSTPAddCardViewController
Add card in User Profile page
|
+-- addresses
| |
| +-- {userId}
| |
| +-- {id}
|
+-- bookhistories
| |
| +-- {userId (driver)}
| | |
| | +-- {orderId}
| |
| +-- {userId (user)}
| |
| +-- {orderId}
|
+-- driverstatus
| |
| +-- {userId}
|
+-- messages
| |
| +-- {userId (sender)}
| | |
| | +-- {userId (receiver)}
| | |
| | +-- {id}
| |
| +-- {userId (receiver)}
| |
| +-- {userId (sender)}
| |
| +-- {id}
|
+-- picked
| |
| +-- {userId (driver)}
| |
| +-- {userId (user)}
|
+-- rates
| |
| +-- {userId}
| |
| +-- {id}
|
+-- users
|
+-- {id}
label.font = ARTextHelper.exoBold(size: width / widthDesign * 30)func readFromDatabase(withId: String, completion: @escaping((Any?)->())) {
}PopupDelegate in UserWaitPopup.swift
protocol PopupDelegate: Any {
func onClosePopup(_ sender: Any?)
}PaymentMethodHelper&ARPaymentMethodDelegate
Common pages for Stripe Payment SetupPhotoViewHelper&ARUpdateImageDelegate
Addedtagfor multiple photo controls in a page
- IHKeyboardAvoiding v4.2
- Sign in page
- GeoFire v1.1.3
Searching drivers when request a ride - EmptyDataSet-Swift v4.0.5
TableView / CollectionView with empty notice - KMPlaceholderTextView v1.3.0
TextView in report page - Cosmos v16.0
Rate star control- Rate stars in driver profile page
- FBSDKCoreKit v4.34.0
Facebook Login - SwiftyJSON v4.1.0
Parse response JSON from Google API - Toast-Swift v3.0.1
Showing error info &states
- GoogleMaps
- GooglePlaces
- Place Autocomplete
Customer home page - PlacePicker
- Distance Matrix API
Get distance between two points to calculate fee
Google Firebase v5.0.1
- Firebase Auth
- Firebase Database
- Firebase Storage
- Firebase Messaging
Add and update features