tanjyy / ridesio

Ridesharing iOS application for college students. Won 2nd place in the iOS category at CodePath Demo Day 2020.
https://tanjyy.github.io/ridesio
1 stars 1 forks source link

User can accept a nearby ride offering #45

Closed nashirj closed 3 years ago

nashirj commented 3 years ago

Note: the book button is found only on the Ride Details page Pressing the book button will add this ride to the user's list of rides It also opens the mail app with the email field populated so that the user can message the poster If this ride is already in the user's list of rides or the user is the poster, should show some error

nashirj commented 3 years ago

Here is how to open the mail app: https://stackoverflow.com/questions/25981422/how-to-open-mail-app-from-swift

nashirj commented 3 years ago

Note that mail app doesn't open unless this is run on an actual iPhone

let email = poster?.email
if let url = URL(string: "mailto:\(email)") {
    UIApplication.shared.open(url)
}