In-app ratings for Cocoa apps
In-app Ratings module helps improve app rating by allowing you to customize the appropriate location and time for prompting users to rate your application. Refer to this user guide to configure in-app ratings in the Apptics web console.
Installation
Copiedsource 'https://github.com/CocoaPods/Specs.git'
target '[TARGET NAME]' do
pod 'AppticsRateUs'
end
Run the pod install to integrate the module.
Import
Dynamic in-app ratings
In dynamic in-app ratings, you can configure the criteria using screens, events, and sessions in the Apptics web console. A rate us pop-up will be shown to the user whenever the criteria are satisfied.
- Enable the Rate us module by using Apptics config class AppticsConfig.default.enableRateUs=true.
Copied[AppticsConfig defaultConfig].enableRateUs = true;
[Apptics initializeWithVerbose:YES];
CopiedAppticsConfig.default.enableRateUs = true
Apptics.initialize(withVerbose: true)
You can either set an anchor point on the web or manually trigger the prompt in your app using the below.
Copied[APRateUs showPromptOnFulfillingCriteria];
CopiedAPRateUs.showPromptOnFulfillingCriteria()
Static in-app ratings
To enable a user to initiate a review as a result of an action in the UI (probably in the settings screen), call the below method and it will open the App Store page for your app. The below method will work only when the app is live in the App Store.
Copied[APRateUs takeToAppStoreReviewScreen];
CopiedAPRateUs.takeToAppStoreReviewScreen()
The above method will work only for apps that are LIVE on the App Store.
Customize in-app ratings
To show the custom review prompt, use the APCustomHandler class and implement the callback willdisplayReviewPrompt.
- To trigger the custom review prompt, use the below.
For more advanced customization such as updating user actions or marking the review prompt, refer to the methods in the APCustomHandler class.
Callbacks
To handle the callbacks related to the feedback module, create a custom class that conforms to the ARCustomHandler protocol.
Copied@interface CustomHandler : NSObject <ARCustomHandler>
@end
Copiedclass CustomHandler: NSObject, ARCustomHandler {}
- You can now pass the instance to the ARCustomHandler.
Copied[ARCustomHandlerManager setCustomHandler:[CustomHandler new]];
CopiedARCustomHandlerManager.setCustomHandler(CustomHandler())