https://github.com/gabrieltheodoropoulos/emailcomposer-xcode12
A custom view modifier in order to present the system email composer in SwiftUI based iOS apps shipped as a Swift package. For Xcode 12.
https://github.com/gabrieltheodoropoulos/emailcomposer-xcode12
ios swift swiftpackage swiftui xcode12
Last synced: about 1 year ago
JSON representation
A custom view modifier in order to present the system email composer in SwiftUI based iOS apps shipped as a Swift package. For Xcode 12.
- Host: GitHub
- URL: https://github.com/gabrieltheodoropoulos/emailcomposer-xcode12
- Owner: gabrieltheodoropoulos
- License: mit
- Created: 2021-07-22T19:20:19.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-22T19:38:20.000Z (over 4 years ago)
- Last Synced: 2025-01-23T09:43:38.956Z (about 1 year ago)
- Topics: ios, swift, swiftpackage, swiftui, xcode12
- Language: Swift
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EmailComposer for Xcode 12
Compose and send emails in SwiftUI using a view modifier.

## About EmailComposer
EmailComposer library makes it pretty easy to present the system provided controller for composing emails in SwiftUI based iOS applications. All it takes is to use a **view modifier**, providing a few arguments. The rest are handled automatically.
## Special Note
The EmailComposer Swift package in this repository makes use of the Swift tools version 5.4 *in order to be compatible with Xcode 12*. Original EmailComposer package implementation was done in Xcode 13 with Swift tools version 5.5, taking advantage of the new documentation features and Documentation Compiler (DocC).
If you are working in Xcode 12, then use the package of this repository. If you are working in Xcode 13 and above, then look at [this repository](https://github.com/gabrieltheodoropoulos/EmailComposer.git) in order to enjoy all those new documentation features.
## Integration
Copy this repository's URL, and in Xcode 12 go to *File > Swift Packages > Add Package Dependency...* menu. Follow the on-screen steps to finish adding the package. Do not forget to:
- Add EmailComposer library to the *Frameworks, Libraries, and Embedded Content* section in the General tab of your app's target.
- Import it in any source file you are going to use it:
```swift
import EmailComposer
```
## Documentation
[This short guide](https://github.com/gabrieltheodoropoulos/EmailComposer-Xcode12/wiki) demonstrates how to use EmailComposer library.
**Note:** There is a DocC archive (.doccarchive) available to download and open it with the Developer Documentation. However, this cannot be done in Xcode 12, as DocC archives require Xcode 13 and above. To find out more, look at the [original EmailComposer Swift package repository](https://github.com/gabrieltheodoropoulos/EmailComposer.git) made for Xcode 13+.
## Reading Material
There is a text tutorial to read about how to implement email composer in SwiftUI on [SerialCoder.dev](https://serialcoder.dev/text-tutorials/swiftui/composing-emails-in-swiftui-using-a-view-modifier/), and on [Medium](https://gabth.medium.com/composing-emails-in-swiftui-using-a-view-modifier-a764a981080a).
## Author
Gabriel Theodoropoulos, Copyright © 2021 - Explore more content and material at [SerialCoder.dev](https://serialcoder.dev).
*Legal Note:
It is allowed to use EmailComposer library in both personal and commercial projects, as well as to modify it as neccesary. However, it is not allowed to sell it, or claim ownership.*
## License
EmailComposer is licensed under the MIT license.