All Projects → schayes04 → SupportEmail

schayes04 / SupportEmail

Licence: MIT license
Pre-populates emails with support information in iOS/iPadOS apps

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to SupportEmail

column-text-view-ui
📄 Column Text View is an adaptive UI component that renders text in columns, horizontally [iOS 12, UIKit, TextKit, SwiftUI].
Stars: ✭ 11 (-45%)
Mutual labels:  swift-package-manager, spm
xcframework-maker
macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support
Stars: ✭ 239 (+1095%)
Mutual labels:  swift-package-manager, spm
TVToday
iOS TV Shows app with TMDb Api. RxSwift, MVVM, Clean Architecture. Tuist + Swift Package Manager
Stars: ✭ 27 (+35%)
Mutual labels:  swift-package-manager, spm
SwiftSimctl
Swift client-server tool to call xcrun simctl from your simulator. Automate push notification testing!
Stars: ✭ 50 (+150%)
Mutual labels:  swift-package-manager, spm
swift-watch
Watches over your Swift project's source
Stars: ✭ 43 (+115%)
Mutual labels:  swift-package-manager, spm
SwiftGradients
Useful extensions for UIViews and CALayer classes to add beautiful color gradients.
Stars: ✭ 15 (-25%)
Mutual labels:  swift-package-manager, spm
concurrency-kit
🚄 Concurrency abstractions framework for Apple Platforms [Task, Atomic, Lock, Operation, etc.].
Stars: ✭ 17 (-15%)
Mutual labels:  swift-package-manager, spm
danger-swift-xcodesummary
A Danger-Swift plugin that adds build errors, warnings and unit tests results generated from xcodebuild to your Danger report
Stars: ✭ 72 (+260%)
Mutual labels:  swift-package-manager, spm
Expandable Collection View Kit
🗂 Expandable, hierarchical, flexible, declarative UICollectionView with diffable data sources & SwiftUI-like tree items builder [Swift 5.1, iOS & iPadOS 13].
Stars: ✭ 69 (+245%)
Mutual labels:  swift-package-manager, spm
Sketchkit
A lightweight auto-layout DSL library for iOS & tvOS.
Stars: ✭ 40 (+100%)
Mutual labels:  swift-package-manager, spm
ecs
A dependency free, lightweight, fast Entity-Component System (ECS) implementation in Swift
Stars: ✭ 79 (+295%)
Mutual labels:  swift-package-manager, spm
Aksidemenu
Beautiful iOS side menu library with parallax effect. Written in Swift
Stars: ✭ 216 (+980%)
Mutual labels:  swift-package-manager, spm
MMActionSheet
An actionSheet view implement with pure swift
Stars: ✭ 25 (+25%)
Mutual labels:  swift-package-manager, spm
Ether
A Command-Line Interface for the Swift Package Manager
Stars: ✭ 86 (+330%)
Mutual labels:  swift-package-manager, spm
YMFF
Feature management made easy.
Stars: ✭ 26 (+30%)
Mutual labels:  swift-package-manager, spm
FitDataProtocol
Swift Implementation the Garmin Flexible and Interoperable Data Transfer Protocol.
Stars: ✭ 32 (+60%)
Mutual labels:  swift-package-manager, spm
PagedLists
Paginated UITableView and UICollectionViews for iOS.
Stars: ✭ 69 (+245%)
Mutual labels:  swift-package-manager, spm
ecs-demo
Minimal demo App for the Fireblade Entity-Component System (ECS)
Stars: ✭ 20 (+0%)
Mutual labels:  swift-package-manager, spm
Hippolyte
HTTP Stubbing in Swift
Stars: ✭ 109 (+445%)
Mutual labels:  swift-package-manager, spm
Flexcolorpicker
Modern color picker library written in Swift 5 that can be easily extended and customized. It aims to provide great UX and performance with stable, quality code.
Stars: ✭ 164 (+720%)
Mutual labels:  swift-package-manager, spm

SupportEmail

Platform CocoaPods Swift Version

Prepopulates emails with support information in iOS apps

About

SupportEmail is about simplifying support for apps. By prepopulating device information in your embedded support email link, you can save time and needless back and forth between you and your users. Check out Countdowns or Recurrence to see SupportEmail in action.

Requirements

  • Xcode 10.2+
  • iOS 10.0+
  • Swift 5.0+

Installation

Swift Package Manager

The preferred installation method is with Swift Package Manager. Starting with Xcode 11, you can add packages directly from the IDE.

CocoaPods

You can also install with CocoaPods. To do so, add the following to your Podfile:

pod 'SupportEmail', '~> 4.0'

Carthage

You can also install with Carthage. To do so, add the following to your Cartfile:

github "schayes04/SupportEmail"

Usage

Due to how MFMailComposeViewController works, you must retain a reference to SupportEmail outside of where you are sending the email.

var supportEmail: SupportEmail?

Using SupportEmail is simple and has just one method. send will allow you to craft the email and handle the end result:

supportEmail = SupportEmail()
supportEmail.send(to: ["[email protected]"], subject: "Support", from: self) { result, error in
    switch result {
    case .cancelled:
        print("Message cancelled")
    case .failed:
        print("Message failed")
    case .saved:
        print("Message saved")
    case .sent:
        print("Message sent")
    }
}

The send function takes 3 arguments:

  • An array of email address the support email should be sent to
  • The subject of the support email
  • The view controller the MFMailComposeViewController is to be presented on

Advanced

SupportEmail also supports providing custom arguments.

supportEmail.customFields = ["Pro Upgrade": "Yes"]

Customization

SupportEmail allows you to provide choose between sending a text file or just content in the email body. Defaults to sending as a text file. If you are sending as a text file you can also specify the file name.

supportEmail.sendAsTextFile = true
supportEmail.fileName = "Sample File Name"

SupportEmail allows you to provide a tintColor in order to customize the appearance of the navigation bar.

supportEmail.tintColor = .blue

SupportEmail allows you to provide a baseLocale in order to localize the system locale in the email. Defaults to en-US.

supportEmail.baseLocale = Locale(identifier: "es-US")

SupportEmail allows you to provide a bodyPrefix that adds a default body to the email

supportEmail.bodyPrefix = "Please add any relevant feedback:\n"

SupportEmail allows you to change the modalPresentationStyle. Defaults to .fullScreen.

supportEmail.modalPresentationStyle = .formSheet

License

This code is distributed under the terms and conditions of the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].