UsbongKit is a framework that contains the main components for Usbong.
- Add documentation
- CocoaPods support
- Make sure you have carthage installed
- Run
carthage update --platform iOS
in the project
For example, UsbongKit is located in ~/Developer/Usbong/UsbongKit. Therefore, I navigate to the folder in the terminal using "cd" command, and then, run "carthage update" or "carthage update --platform iOS" (specifying the platform will make the update finish faster, since it will only build the frameworks for iOS). Once all dependencies have been downloaded and built, the UsbongKit example app should now be able to be built and run in a simulator or an iOS device.
- Build and run the
UsbongKit-example
target
You can integrate UsbongKit
in your project in 3 different ways:
1. Carthage (Recommended)
- Add
github "usbong/UsbongKit"
in yourCartfile
- Run
carthage update --platform iOS
in your project directory - Follow Carthage instructions to add frameworks in your project
- Drag-and-drop
UsbongKit.xcodeproj
as sub-project - Run
carthage update --platform iOS
in UsbongKit folder to fetch dependencies - Link
UsbongKit.framework
in your project
- Run
carthage update --platform iOS
in UsbongKit folder to fetch dependencies - Build
UsbongKit
framework - Embed
UsbongKit.framework
in your project
To view a utree file, import the framework, import UsbongKit
, then add this code in your app:
// parentViewController is the controller which will present the Usbong tree viewer
// treeURL is the URL for the compressed .utree
Usbong.presentViewer(onViewController: parentViewController, withUtreeURL: treeURL)
The documentation for extending UsbongKit can be found here.
Copyright 2016 Usbong Social Systems, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.