I'm trying to determine the class of the rootViewController because I do not want push notifications to show up on all of the screens. However the following line keeps getting validated as true on every view of my project:
print(UIApplication.sharedApplication().keyWindow?.rootViewController!.isKindOfClass(TabView))
To further examine the problem I've added titles to all the views on Storyboard. After doing this I tried to print the titles of the current screen that shown on the iPhone/Simulator. However, a title different from what I was expecting gets printed:
UIApplication.sharedApplication().keyWindow?.rootViewController!.title