A simple user feedback form right into your app.
Submit user feedbacks to your own database, or use the provided Notion service to store feedbacks to a Notion database.
This is an MVP, feel free to improve it.
Check out the demo project.
Simply present the FeedbackForm
to the user. The form is already wrapped in a NavigationView
.
Button("Send feedback") {
showFeedbackForm = true
}
.sheet(isPresented: $showFeedbackForm) {
FeedbackForm(service: notionSubmitService)
}
You can add you own title by passing a config
parameter.
FeedbackForm(
service: notionSubmitService,
config: .init(title: "My custom title")
)
Feedbacks are submitted with using a SubmitService
.
You can define your own SubmitService
by providing a object that conforms to the protocol.
public protocol SubmitService {
func submit(formData: FeedbackFormData) async throws
}
A default implementation using Notion API is also available.
NotionSubmitService
.Internal Integration Token
for later.email
FeedbackForm
View. You will need :
Internal Integration Token
from the integration page.?
: https://www.notion.so/your-name/your-database-id?v=...
let notionSubmitService = NotionSubmitService(
apiKey: "your-secret",
databaseId: "your-database-id",
notionVersion: "2022-06-28"
)
link |
Stars: 1 |
Last commit: 3 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics