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

how can I pass WKZombie between ViewControllers #69

Open avisual opened 7 years ago

avisual commented 7 years ago

How can I pass browsers between view controllers and maintain state and context?

avisual commented 7 years ago

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {

    if segue.identifier == "wifiSettings" {
        if let toViewController = segue.destination as? WifiSettingsVC {
            toViewController.browser = browser
        }
    }
}

does not seem to have context when passed

avisual commented 7 years ago

I've tried using a new wkzombie instance. But it does not seem to work as expected.

When I open a new view controller using a new or passed instance of wkzombie it seems to be none responsive. Am I stuck in a closure or wrong thread

Any help from other developers would be greatly appreciated.