javascript – Combine library for displaying chess UI in iOS app


I have to discover a approach to show a chess UI in my iOS app.

I needn’t assist the precise sport course of (neither between two people, nor vs AI). I want the UI to have the ability to replay the sport that already occurred, load FEN/pgn, transfer ahead/backward alongside the sport historical past, possibly assist sport evaluation (as in make strikes branching off the primary sport course).

Upon checking among the current options, I’ve tried to make work 2 of them:

  1. Amongst Swift-based libs I’ve discovered swift-chess:
    appears to be like fairly good, however the issue is the items aren’t draggable, and I’m not certain it helps the performance I want.

  2. One other one appears to be like even higher, but it surely’s a js part:
    chessboardjs from

I attempted displaying it inside WKWebView like this:

let html = """
        <div id="board1" model="width: 400px"></div>
        <script src=""

        <script src=""
        let webView = WKWebView()
        webView.loadHTMLString(html, baseURL: nil)
        webView.evaluateJavaScript("var board1 = Chessboard('board1', 'begin')") { end result, error in

However this leads to the error complaining that it would not know what Chessboard is.

Please, advise how I may clear up the mixing downside.
Alternatively, are there possibly swift/Goal-C written libraries that might clear up my function?

Thanks prematurely for any assist.