mkoehnke / WKZombie

WKZombie is a Swift framework for iOS/OSX to navigate within websites and collect data without the need of User Interface or API, also known as Headless browser. It can be used to run automated tests / snapshots and manipulate websites using Javascript.
MIT License
1.17k stars 100 forks source link

'The keyWindow or contentView is missing' message before scraping #63

Open lorismaz opened 7 years ago

lorismaz commented 7 years ago

When testing the command line Example from the repo, this message gets printed in the console, before doing anything: The keyWindow or contentView is missing., then the script works as intended.

What does it means and how can we prevent this to show?

fishfisher commented 7 years ago

Are you using storyboards? If so, check if it helps to embed your viewcontroller in a navigation controller.

avisual commented 7 years ago

@fishfisher can you explain a little more please?

fishfisher commented 7 years ago

@avisual Are you seeing this printed to the log as well? For me the log went away when I embedded my root view controller in storyboard to a navigation controller. For me the keyWindow was nil when my main view controller was root.