Lickability / PinpointKit

Send better feedback
MIT License
1.13k stars 79 forks source link

Add mail failure alert #237

Closed grantjbutler closed 6 years ago

grantjbutler commented 6 years ago

This brings the changes for #220 into master, with one code change to fix a variable reference. The original body of PR #220 is reproduced below for reference.


Closes #219.

What It Does

Previously, if the user clicked Send and the MailSender experienced a failure (e.g. when there are no mail accounts set up), nothing would happen in the GUI. There was also no method in PinpointKitDelegate to correspond to didFailToSend in SenderDelegate.

This commit adds an alert popup to PinpointKit to solve the first problem, and a didFailToSend method to PinpointKitDelegate for the second. The latter takes the original Error as a parameter in case developers want to use it present more specific messages.

simulator

How to Test

Ensure that the mailer will encounter an error (the easiest way is to run the example app on a simulator with no email accounts set up) and click Send.

Notes

None in particular.

mbbischoff commented 6 years ago

@grantjbutler Merge when Buddybuild finished.