You’re on a date, everything’s going great, and you’d like to become intimate. How do you tell your partner?

There are apps for that.

In the wake of the #MeToo movement and a rash of sexual-harassment scandals, software companies are creating digital ways for people to give their consent to have sex. Apps such as uConsent allow potential sexual...