Send email feedback from your iOS application.
Currently there are english and german translations available for this package. Feel free to contribute another language.
Install AppFeedback
with Swift Package Manager:
dependencies: [
.package(name: "AppFeedback", url: "https://github.com/lambdadigamma/swift-app-feedback", .upToNextMajor(from: "1.0.0")),
]
To use the AppFeedback
user interface and the default setup,
you just need to create a FeedbackViewController
with a FeedbackConfiguration
.
import AppFeedback
let configuration = FeedbackConfiguration(
receiver: "[email protected]",
subject: "Feedback",
)
let viewController = FeedbackViewController(configuration: configuration)
self.navigationController.pushViewController(viewController, animated: true)
The feedback has a few configuration options. …
You can easily swap or change all texts (e.g. title, button, help text, etc.) by passing a StringResolver
with the Bundle
containing your own strings.
⚠️ Attention If you want to customize strings by providing a custom string resolver, make sure to provide a string for every key into yourLocalizable.strings
file. You can find the latest strings used by this package here.
To provide a custom button color you can customize the buttonAppearance
of the feedback configuration.
Just initialize a ButtonAppearance and pass it into the configuration.
let buttonAppearance = ButtonAppearance(
backgroundColor: .red,
foregroundColor: .white
)
let configuration = FeedbackConfiguration(
…,
buttonAppearance: buttonAppearance
)
You can easily attach your own feedback to the email by passing an object that conforms to the FeedbackDataCollecting
protocol into the FeedbackViewController
.
This protocol only requires you to implement a collect()
method which returns an array of strings.
You can also create your own subclass of FeedbackViewController
.
All of the actions and also the view setup can be overwritten.
See FeedbackViewController
to learn what to override.
- Implement a default feedback overview screen
- Make feedback overview customizable
- Add accessibility identifiers for all controls
- Make feedback overview even more customizable
- Support more localizations
- Support data attachments
- Support more platforms (e.g. macOS and Catalyst)
Please see CHANGELOG.md
for more information what has changed recently.
Contributions are always welcome!
swift-app-feedback
is available under the MIT license. See the LICENSE.md
file for more info.