Skip to content

Review relic for iOS, for integrating Review relic into your iOS application.

License

Notifications You must be signed in to change notification settings

reviewrelic-universe/ios-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReviewRelic

Version License Platform

Create a Seamless Review Experience For your Mobile Apps. Collect powerful feedback from your iOS native app with Reviewrelic’s flexible and easy-to-install SDK for IOS

Requirements

  • iOS 12+
  • Swift 5+
  • Full customizalble themes
  • Support for dark mode

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

ReviewRelic is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ReviewRelic'

Initialization

In didFinishLaunchingWithOptions initialize with APIKey and AppSecret from admin panel.

ReviewRelic.shared.initialize(
    apiKey: APIKEY, 
    appSecret: APPSECRET,
    merchantId: MERCHANT_ID
)

Presenting ReviewRelic

First confirm to ReviewRelicItem and create an item to be reviewed

public protocol ReviewRelicItem {
    var transactionId: String? { get set } // Additional parameter to identify transaction
    var reviewsId: String? { get set} // Additional parameter to identify application user
}

Initializing ReviewController, and Presentaiton

///item is optional
let controller = presentReviewRelic(item: <ReviewRelicItem>(), completion: {
    //Perform any action after presentation 
})

OR simply

let controller = presentReviewRelic()

Setting messages and additional styling

public func setHeadingLabel(text: String, font: UIFont? = .boldSystemFont(ofSize: 14), textColor: UIColor? = .darkText) {
public func setDescriptionLabel(text: String, font: UIFont? = .systemFont(ofSize: 14), textColor: UIColor? = .darkText) {
public var thankYouText: String // Set message after successful submission

Delgation

func reviewRelicViewController(_: ReviewRelicViewController, submittedReviewRating data: ReviewRelic.Transaction)
func reviewRelicViewControllerRatingSubmissionFailed(_: ReviewRelicViewController)
func reviewRelicViewControllerLoadSettingsFailed(_: ReviewRelicViewController)

License

ReviewRelic is available under the Apache license. See the LICENSE file for more info.