Latest 1.0.5
Homepage https://github.com/stanwood/StanwoodDialog_iOS
License MIT
Platforms ios 10.0
Frameworks UIKit
Authors

[Swift Version]()
[iOS 10+]()
CodeClimate Badge
Build Status

Example

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

Installation

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

pod 'StanwoodDialog'

Usage

Add import StanwoodDialog and call the method bellow from wherever you are calling AppDelegate‘s applicationDidBecomeAvailable:

    if RatingDialog.shouldShow(onLaunch: 5) {
        let text1 = "Hi there,nmy name is John Appleseed,nthe developer of this app."
        let text2 = "Independent developers like menrely heavily on good ratings in the app store"
        let text3 = "so that we can continue working on apps.nIf you like this app, I'd be thrillednif you left a positive rating."
        let text4 = "the stars would be enough, it will only take a few seconds."

        let cancel = "Cancel"
        let accept = "Rate the app"

        let faceUrlString = "https://lh5.googleusercontent.com/-_w2wo1s6SkI/AAAAAAAAAAI/AAAAAAAAhMU/s78iSxXwVZk/photo.jpg"
        let bannerUrlString = "https://d30x8mtr3hjnzo.cloudfront.net/creatives/41868f99932745608fafdd3a03072e99"
        let appID = "<YOUR_APPID>"

        RatingDialog.builder()
        .set(paragraph1: text1)
        .set(paragraph2: text2)
        .set(paragraph3: text3)
        .set(paragraph4: text4)
        .set(cancelText: cancel)
        .set(okText: accept)
        .set(faceUrl: faceUrlString)
        .set(bannerUrl: bannerUrlString)
        .set(tintColor: UIColor.blue)
        .buildAppStoreUrl(with: appID)
        .set(rootView: (window?.rootViewController?.view)!)
        .build()
    }

Ideally you would be fetching each one of these parameters remotely. For instance, from Firebase RemoteConfig to do some A/B testing and/or from a service like lokalise.co to provide internationalization.

If you don’t have a URL for the profile and banner images, you may upload these to Firebase Storage (go to Store section in Firebase and click on [Upload Image]):

  • the profile image should be 300×300 pixels (this will cover the 3 variations for 100×100 points)
  • the banner image should be 300×1125 pixels (this will cover the 3 variations for 100×375 points)

    Test

Using a negative value in RatingDialog.shouldShow(onLaunch: -1) will result in the Rating Dialog being shown everytime.

Also, while in Debug, the launch count doesn’t need 30 minutes from the last launch to increase its count.

Author

Eugène Peschard, [email protected]

License

StanwoodDialog is under MIT licence. See the LICENSE file for more info.

Latest podspec

{
    "name": "StanwoodDialog",
    "version": "1.0.5",
    "summary": "Library to show a rating dialog prompt like the one used in On Air.",
    "description": "This library allows to show a rating dialog prompt like the one used in On Air. nThis allows a more personal approach and dismisses automatically when no interaction.",
    "homepage": "https://github.com/stanwood/StanwoodDialog_iOS",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "stanwood": "[email protected]"
    },
    "source": {
        "git": "https://github.com/stanwood/StanwoodDialog_iOS.git",
        "tag": "1.0.5"
    },
    "platforms": {
        "ios": "10.0"
    },
    "swift_version": "4.2",
    "source_files": "Stanwood_Dialog_iOS/Classes/**/*.{swift}",
    "resource_bundles": {
        "Stanwood_Dialog_iOS": [
            "Stanwood_Dialog_iOS/Classes/**/*.{xib,png,jpeg}"
        ]
    },
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This