Skip to content

An iOS component to present the email compose sheet with device and app info in the body

License

Notifications You must be signed in to change notification settings

ricsantos/RSEmailFeedback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RSEmailFeedback

Version License Platform

A simple way to get direct feedback from your App users is via email. This component simplifies the presentation of the email composer by adding blocks, and pre-populates the email message body with details about the device, OS and app version.

Installation

RSEmailFeedback is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'RSEmailFeedback'

Usage

(see sample Xcode project in /Demo)

Create an instance of RSEmailFeedback and present it by passing a reference the the visible view controller, and an optional block to run on completion.

Objective C:

#import <RSEmailFeedback/RSEmailFeedback.h>

RSEmailFeedback *emailFeedback = [[RSEmailFeedback alloc] init];
emailFeedback.toRecipients = @[@"rics@ntos.me"];
emailFeedback.subject = @"Feedback for RSEmailFeedback";
[emailFeedback showOnViewController:self withCompletionHandler:^(MFMailComposeResult result, NSError *error) {
    if (result == MFMailComposeResultSent) {
        NSLog(@"email sent 😁");   
    }
}];

Swift:

import RSEmailFeedback

let emailFeedback = RSEmailFeedback()
emailFeedback.toRecipients = ["rics@ntos.me"]
emailFeedback.subject = "Feedback for RSEmailFeedback"
emailFeedback.show(on: self) { (result, error) in
    if result == .sent {
        print("email sent 😁")
    }
}

License

RSEmailFeedback is available under the MIT license. See the LICENSE file for more info.

About

An iOS component to present the email compose sheet with device and app info in the body

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published