Latest 1.0.3
Homepage https://github.com/KEN-chan/ReminderAlertView
License MIT
Platforms ios 8.0
Authors

ReminderAlertView is a alert view that can remind regularly.
ReminderAlertView is inspired by Appirater.
Appirater is only for app review. ReminderAlertView has high versatility.
You can use ReminderAlertView according to your application. For app review, push notification, and etc.

Usage

ex)

  • You want to display a alert for push notification when a user sees product page 5 times. And if a user hits ok button once, you don’t want to display the alert.
  • You want to display a alert for app review when a user hits the like button 10 times. And if the alert is displayed once, you don’t want to display it.

Register alerts in AppDelegate

ReminderAlertView.registerAlert(id: "push_notification_alert",
  countToRemind: 5,
  alertTitle: "Please turn on push notification!",
  message: "Do you want to get push notification when you receive message?", cancelButtonTitle: "Not now",
  OKButtonTitle: "Turn on")

ReminderAlertView.registerAlert(id: "app_review_alert",
  countToRemind: 10, alertTitle: "Please review our app!",
  message: "If you like our app, could you review our app?",
  cancelButtonTitle: "Not now",
  OKButtonTitle: "OK")

Increment when a user sees product page and hits like button

func showProductScreen() {
  if !ReminderAlertView.hasBeenPushedOKButton(id: "push_notification_alert") {
    ReminderAlertView.incrementCount(id: "push_notification_alert") {

        application.registerForRemoteNotifications()
    }
  }
}

func likeProduct() {
  if !ReminderAlertView.hasBeenDisplayed(id: "app_review_alert") {
    ReminderAlertView.incrementCount(id: "app_review_alert") {

      // code to transition to review page on app store
    }
  }
}

If you want to display alert forcibly

ReminderAlertView.showAlert(id: "push_notification_alert") {

    // code for when a user hits ok button
}

Installation

CocoaPods

gem install cocoapods

Add following to your Podfile

platform :ios, '8.0'
use_frameworks!

target 'Your Target Name' do
  pod 'ReminderAlertView'
end

Run

pod install

Carthage

brew install carthage

Add following to your Cartfile

github "KEN-chan/ReminderAlertView"

Run

carthage update --platform ios

Requirements

  • iOS 8.0+
  • Swift 4.0+

License

MIT license

Latest podspec

{
    "name": "ReminderAlertView",
    "version": "1.0.3",
    "summary": "A alert view that can remind regularly",
    "description": "ReminderAlertView is inspired by Appirater (https://github.com/arashpayan/appirater)nAppirater is only for app review. ReminderAlertView has high versatility.nYou can use ReminderAlertView according to your application. For app review, push notification, and etc.",
    "homepage": "https://github.com/KEN-chan/ReminderAlertView",
    "license": "MIT",
    "authors": {
        "Kenta Hara": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/KEN-chan/ReminderAlertView.git",
        "tag": "1.0.3"
    },
    "source_files": "ReminderAlertView/*.{swift,h,m}",
    "exclude_files": "Classes/Exclude",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This