ReviewPrompter is an open-source library for iOS applications written in Swift that helps you intelligently prompt users for app reviews. It tracks the occurrence of specific events within your app and requests a review prompt when the specified conditions are met. ReviewPrompter ensures that users are not prompted too frequently by implementing a minimum time interval between each prompt.
Dependencies
ReviewPrompter is a subclass of EventTracker and so depends on the EventTracker library.
Features
Tracks occurrences of named events in your app
Requests review prompts when the number of events matches the specified condition
Ensures a minimum time interval between each prompt
Allows for manual triggering of review prompts
Supports event count resetting
Provides an option to enable or disable logging
🧪 Tests
The library is basically fully tested with 98.5% code coverage
💻 Installation
Swift Package Manager
To add ReviewPrompter to your project using Swift Package Manager, add the following dependency in your Package.swift file:
Increase the event count and request a review prompt if the condition is met. Callback is used to inform the caller if a review prompt has been requested.
do {
try reviewPrompter.increaseEventCountWithReviewPrompt(forIdentifier: "event1") { didRequestReview in
print("Review prompt requested: \(didRequestReview)")
}
} catch {
print("Error: \(error)")
}
Manually triggr a review prompt
let didRequest = reviewPrompter.requestReviewPrompt()
print("Review prompt requested: \(didRequest)")
If needed, you can delete the history of review prompt dates with the deleteHistoryOfReviewPromptDates() method:
Pull requests are welcome. I welcome developers of all skill levels to help improve the library, fix bugs, or add new features.
For major changes, please open an issue first to discuss what you would like to change.
Before submitting a pull request, please ensure that your code adheres to the existing code style and conventions, and that all tests pass. Additionally, if you’re adding new functionality, please make sure to include unit tests to verify the behavior.
If you have any questions or need assistance, feel free to open an issue, and I’ll do my best to help you out.
🪪 Licence
ReviewPrompter is released under the MIT Licence. See the LICENSE file for more information.
ReviewPrompter
ReviewPrompter is an open-source library for iOS applications written in Swift that helps you intelligently prompt users for app reviews. It tracks the occurrence of specific events within your app and requests a review prompt when the specified conditions are met. ReviewPrompter ensures that users are not prompted too frequently by implementing a minimum time interval between each prompt.
Dependencies
ReviewPrompter
is a subclass ofEventTracker
and so depends on the EventTracker library.Features
🧪 Tests
The library is basically fully tested with 98.5% code coverage
💻 Installation
Swift Package Manager
To add ReviewPrompter to your project using Swift Package Manager, add the following dependency in your Package.swift file:
Don’t forget to add ReviewPrompter to your target dependencies:
🛠️ Usage
ReviewPrompter
Initialise an instance
Increase the event count and request a review prompt if the condition is met. Callback is used to inform the caller if a review prompt has been requested.
Manually triggr a review prompt
If needed, you can delete the history of review prompt dates with the deleteHistoryOfReviewPromptDates() method:
Inherited from EventTracker
Begin tracking an event
Stop tracking an event
Change the condition for an event
Increase the event count
Reset the event count
Check if an event’s condition has been met
Check an event is being tracked
Check the number of times an event has occured
Check the current condition of an event
🐕🦺 Support
Please open an issue for support.
👷♂️ Contributing
Pull requests are welcome. I welcome developers of all skill levels to help improve the library, fix bugs, or add new features.
For major changes, please open an issue first to discuss what you would like to change.
Before submitting a pull request, please ensure that your code adheres to the existing code style and conventions, and that all tests pass. Additionally, if you’re adding new functionality, please make sure to include unit tests to verify the behavior.
If you have any questions or need assistance, feel free to open an issue, and I’ll do my best to help you out.
🪪 Licence
ReviewPrompter is released under the MIT Licence. See the LICENSE file for more information.