Skip to content

Latest commit

 

History

History
60 lines (46 loc) · 1.06 KB

InstallationForSwift4.md

File metadata and controls

60 lines (46 loc) · 1.06 KB

Installation for Swift 4

CocoaPods

⚠️ CocoaPods (1.1.0 or later) is required.

Adding it to your Podfile:

use_frameworks!
pod 'Kanna', '~> 4.0.0'

Carthage

Adding it to your Cartfile:

github "tid-kijyun/Kanna" ~> 4.0.0
  1. In the project settings add $(SDKROOT)/usr/include/libxml2 to the "header search paths" field

Swift Package Manager

Installing libxml2 to your computer:

// macOS
$ brew install libxml2
$ brew link --force libxml2

// Linux(Ubuntu)
$ sudo apt-get install libxml2-dev

Adding it to your Package.swift:

// swift-tools-version:4.0
import PackageDescription

let package = Package(
    name: "YourProject",
    dependencies: [
        .package(url: "https://github.com/tid-kijyun/Kanna.git", from: "4.0.0")
    ],
    targets: [
        .target(
            name: "YourTarget",
            dependencies: ["Kanna"]),
    ]
)
$ swift build

Note: When a build error occurs, please try run the following command:

$ sudo apt-get install pkg-config