Giter Club home page Giter Club logo

Comments (7)

jalbano avatar jalbano commented on August 17, 2024 1

Same problem -- I'm testing on a real device. getRootViewController() is returning nothing. I assume it has something to do with the fact that I don't use storyboards? Instead, I'm doing this in AppDelegate...

    window = UIWindow(frame: UIScreen.main.bounds)
    window?.windowLevel = UIWindowLevelNormal
    window?.rootViewController = navigationController
    window?.makeKeyAndVisible()

I'm calling rateApp() from my Settings UIViewController -- so no "timing" issue here.

from armchair.

 avatar commented on August 17, 2024

I noticed that the function getRootViewController return nil...

from armchair.

phimage avatar phimage commented on August 17, 2024

same as #43
If you reproduce, step by step find where the method return nil, before or after finding the window, etc...

from armchair.

willemotlucas avatar willemotlucas commented on August 17, 2024

I am experiencing the same issue, but getRootViewController doesn't return nil in my case.

However in my case, like the issue #43, the rating alert is shown after closing a view presented modally, which is embedded inside a UINavigationController which is itself embedded inside a UIPageViewController . @massimogreco Is your views architecture similar to that ? If yes, it could be a trail to investigate @phimage

from armchair.

csemresari avatar csemresari commented on August 17, 2024

Same problem.
Modal controller of Armchar appears successfully however nothing happens after pressing Rate.
How can this be fixed, i dont think it is related with a bug on my side.

from armchair.

coneybeare avatar coneybeare commented on August 17, 2024

Are you testing in the simulator?

from armchair.

kuchmiyalex avatar kuchmiyalex commented on August 17, 2024

Same thing here. Also calling rateApp() from my settings page, I'm using storyboard though.

As a workaround added these lines in the end of getRootViewController() function:

if let presentingController = UIApplication.shared.keyWindow?.rootViewController {
           if let topController = topMostViewController(presentingController) {
                return topController
            }
}
return nil

from armchair.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.