Installing Kanna
Three means of installation are supported:
CocoaPods
0.39 or later
) is required.
Adding it to your Podfile
:
use_frameworks!
pod 'Kanna', '~> 1.1.0'
Carthage
Adding it to your Cartfile
:
github "tid-kijyun/Kanna" ~> 1.1.0
Manual Installation
- Add these files to your project:
Kanna.swift
CSS.swift
libxmlHTMLDocument.swift
libxmlHTMLNode.swift
libxmlParserOption.swift - In the target settings add
$(SDKROOT)/usr/include/libxml2
to theSearch Paths > Header Search Paths
field - In the target settings add
-lxml2
to theLinking > Other Linker Flags
field - Import
libxml
headers: Copy the those import statements:#import <libxml/HTMLtree.h> #import <libxml/xpath.h> #import <libxml/xpathInternals.h>
and paste them into your [Modulename]-Bridging-Header.h
Note: With manual installation, this library doesn’t need to be imported, or namespace-qualified in your code.