takecian / SwiftRater

A utility that reminds your iPhone app's users to review the app written in pure Swift.
MIT License
356 stars 42 forks source link

No possibility to show rate alert dialog except from RootViewController #7

Closed webwarrior06 closed 6 years ago

webwarrior06 commented 6 years ago

Hello, I cannot show rating alert dialog except from root view controller. I will implement this library in a game. My rating logic is like following; If a user makes a very high score, I will show rating dialog. But the problem is that the gameplay view is not the RootViewController. That's why it is impossible to show that dialog in every viewcontroller on pre-iOS 10.3 devices.

SwiftRater.swift UIApplication.shared.keyWindow?.rootViewController?.present(alertController, animated: true, completion: nil)

Is it possible that you implement some logic by which developers can pass desired ViewController as a parameter? So we can have the ability to show it everywhere. Thanks!

takecian commented 6 years ago

okay, I will check and get back to you.

takecian commented 6 years ago

@webwarrior06 sorry for late. Could you try 1.1.0 and pass viewcontroller like https://github.com/takecian/SwiftRater/blob/1.1.0/Demo/Demo/ViewController.swift#L21 ?

takecian commented 6 years ago

I will close this if you find any issues, please reopen.