macOS

Xnor Bundles are packaged in three formats for macOS: .dylib, .framework. and .whl. This allows users to build Swift applications easily with a drop-in XnorNet.framework, build C applications by linking to the libxnornet.dylib shared library, or build Python applications by installing the xnornet module using pip.

macOS Support

Xnor Bundles are officially supported for applications using API version 10.14 (Mojave), Xcode 10.2, and Swift 5.

Language-independent setup

macOS Mojave is available for free on compatible Mac products. We recommend you follow Apple’s instructions for upgrading if you are not yet using Mojave.

Xcode 10.2 is available for free. If you don’t know your Xcode version, you can check it from the toolbar with Xcode -> About Xcode.

Setting up for Swift Development

Swift 5 is also available for free, it is included by default in the Xcode 10.2 download. It will also be the default language for new Swift projects in Xcode. You can verify you are using Swift 5 in Xcode by viewing <Project Name> -> Build Settings -> Swift Compiler -> Language -> Swift Language Version.

Next Steps for Swift Development

Setting up for C Development

Xcode comes with a C compiler pre-installed, so no further installation is necessary. Try building the samples in xnor-sdk-macos/samples/c as follows:

cd ~/Downloads/xnor-sdk-macos/samples/c
make

Next Steps for C Development

Setting up for Python Development

macoS Mojave does not come with Python3 by default. There are a number of ways to install Python3 on your Mac, but we recommend installing using Homebrew:

brew install python3

Next steps for Python Development