Skip to content


Repository files navigation

Build Status Github Releases Github Releases

What is it?

SgfcKit is an Objective-C wrapper library around the C++ library libsgfc++, which in turn is a wrapper for SGFC, the SGF Syntax Checker & Converter. SgfcKit transitively inherits SGFC's core functionality from libsgfc++:

  • Read and write SGF (Smart Game Format) files.
  • Check the file content for correctness.
  • Correct any errors.
  • Convert FF[1] - FF[3] files to the FF[4] format.

SgfcKit is not restricted to files, it also reads and writes SGF data from/to NSString without filesystem interaction.

The SgfcKit API closely resembles the one offered by libsgfc++, but is re-modeled towards the idioms that prevail in the Objective-C world.

SgfcKit theoretically is cross-platform - as long as your desired platform has an Objective-C compiler and you are able to also build the underlying libsgfc++, you might be successful in building and running SgfcKit for/on that platform. In practice, though, SgfcKit is likely to be restricted to the macOS and iOS-derived platforms.

What it's not

The limitations of SGFC also apply to SgfcKit. Quoting from the SGFC website:

SGFC is intended to be a tool for SGF experts, coders and maintainers of large SGF archives. You ought to have quite some knowledge of SGF to use SGFC efficiently.

SGFC was written primarily for Go/WeiQi/Baduk (GM[1]) files. It can't handle other games yet, i.e. it doesn't check any game-specific properties and values of other games than Go. It may even save erronous game-specific properties of other games! Use SGFC for other games with care.


At runtime SgfcKit only depends on libsgfc++, the C/C++/Objective-C runtime libraries and the C++ standard library.

At build time SgfcKit has the following dependencies:

  1. The main dependency, of course, is libsgfc++.
  2. The second dependency is the build management tool CMake.
  3. A last dependency is Doxygen, used to optionally generate the project's API documentation.

Dependency 1 is integrated via Git submodule.

Project build system

The project build system is documented here.

More documentation


SgfcKit is released under the Apache License (2.0). Here's the link to the license file.

libsgfc++ is released under the terms of the Apache License (2.0).

SGFC is released under the terms of the BSD License.


SgfcKit. An Objective-C library that uses SGFC for reading and writing SGF (Smart Game Format) data.







No packages published