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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UI API called on a background thread - iOS 11 - Xcode 9

fishfisher opened this issue · comments

Hi!
FYI:
WKZombie unfortunately does not work on iOS 11. The NSOperationQueue is of type USER_INITIATED and calls to WKWebView requires to be on the main thread.

With the new Main Thread Checker in XCode 9 it prints out the following in the console:

  • Main Thread Checker: UI API called on a background thread: -[WKWebView isLoading]
  • Main Thread Checker: UI API called on a background thread: -[WKWebView configuration]
  • Main Thread Checker: UI API called on a background thread: -[WKUserContentController addScriptMessageHandler:name:]
  • Main Thread Checker: UI API called on a background thread: -[WKWebView setNavigationDelegate:]
  • Main Thread Checker: UI API called on a background thread: -[WKWebView loadRequest:]
  • Main Thread Checker: UI API called on a background thread: -[WKWebView evaluateJavaScript:completionHandler:]

Best regards,
Erik

Hi @fishfisher Thank you very much for reporting this! I'll have a look.

Yes, We have the same issue too. Hope we would have working version ASAP. The app crashes as of now. Can you please let me know the commit, if its already been fixed?

Hi @mkoehnke any news on this? We're seeing the same issue and would love to know if you found a fix.

Hi guys! Sorry for the late response. I am currently working on a fix. My plan is to release a new version by the end of the week. Sorry for the inconvenience. I didn‘t have much time lately to make WKZombie iOS11 compatible. For any other iOS11 related issues, please open another issue and I‘ll try to include a fix in the next release as well! Thanks!

Hi. I've created a new release 1.1.0 that should fix the crashes seen in iOS11/Xcode9. It's still a pre-release, so please let me know if that fixes the issue on your side. Thanks!