pmf-engine-swift is an iOS framework that empowers developers to seamlessly integrate interactive question prompts for valuable user feedback, ensuring two weeks of app usage and tracking at least two key events to ensure meaningful insights and engagement.
To run the example project, clone the repo, and run pod install from the Example directory first.
- iOS 13.0+
- Swift 5.0+
pmf-engine-swift is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'pmf-engine-swift'import pmf_engine_swift
2. In your AppDelegate's didFinishLaunchingWithOptions method, configure the PMF Engine with your accountId and a unique userId.
PMFEngine.default.configure(accountId: "accountID", userId: UUID().uuidString)Use the PMF Engine to track events within your application. You can either use a default event or specify a custom event.
PMFEngine.default.trackKeyEvent() // Track a default event
PMFEngine.default.trackKeyEvent("journal") // Track a custom event let popupView = PMFEnginePopupView()
popupView.emoji = UIImage(named: "smilling-panda")
popupView.title = "Pleeeeease! 🙏\n Help us to improve \nto help others!"
popupView.subTitle = "By answering a few simple questions."
popupView.confirmTitle = "Yes, happy to help!"
popupView.cancelTitle = "No, I don’t want to help!"
popupView.containerBackgroundColor = UIColor.white
popupView.closeButtonTitleColor = UIColor.lightGray
popupView.pmfButtonBackgroundColor = UIColor.purple
popupView.pmfButtonTitleColor = UIColor.white
popupView.confirmFont = UIFont.systemFont(ofSize: 17, weight: .bold)
popupView.cancelFont = UIFont.systemFont(ofSize: 14, weight: .semibold)To show the form directly from the top controller:
PMFEngine.default.showPMFPopup()To use a custom event name, custom popup view and a specific view controller:
PMFEngine.default.showPMFPopup(for: "journal", popupView: popupView, onViewController: viewController)pmf-engine-swift is available under the MIT license. See the LICENSE file for more info.