All Projects → xmindltd → xmind-sdk-swift

xmindltd / xmind-sdk-swift

Licence: MIT license
XMind SDK for Swift

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language

Labels

Projects that are alternatives of or similar to xmind-sdk-swift

GitMindMap-command
📘 GitMindmap Git 指令-思维导图 Git常用指令速查
Stars: ✭ 108 (+227.27%)
Mutual labels:  xmind
android-thinkmap-treeview
Tree View; Mind map; Think map; tree map; custom view; 自定义;关系图;树状图;思维导图;组织机构图;层次图
Stars: ✭ 314 (+851.52%)
Mutual labels:  xmind
Xmind
The most popular mind mapping software
Stars: ✭ 1,883 (+5606.06%)
Mutual labels:  xmind
CodeMap
把全部项目代码转换成一个思维导图 (暂时只支持Swift)
Stars: ✭ 30 (-9.09%)
Mutual labels:  xmind
notes
保存了我的所有的学习笔记
Stars: ✭ 23 (-30.3%)
Mutual labels:  xmind
Psyduck
Record CS knowlegement with XMind, version 2.0. 使用 XMind 记录 Linux 操作系统,网络,C++,Golang 以及数据库的一些设计
Stars: ✭ 4,280 (+12869.7%)
Mutual labels:  xmind
XMind-Learning
❄️自己整理的思维导图学习资料(IT专业技术)
Stars: ✭ 267 (+709.09%)
Mutual labels:  xmind
xmind2testlink
Convert xmind to test link xml files, support xmind pro and xmind zen.
Stars: ✭ 99 (+200%)
Mutual labels:  xmind
JMind
基于 Canvas 技术,使用 Janvas 封装库实现的 XMind 的核心功能
Stars: ✭ 274 (+730.3%)
Mutual labels:  xmind

XMind SDK in Swift

Swift Package Manager compatible Carthage compatible Language

This SDK enables you to create and modify xmind(.xmind) files, and it's written in swift.

Supported Platforms:

  • iOS 9+

  • macOS 10.11+

Structure of XMind files

XMind file is a zip file which contains several components, including manifest, metadata, sheets and resources.

Resources contains all the resources of this xmind file that like images.

Metadata represents the version of xmind file and the creator.

Sheets contains all of the topics that belong to the each sheets(canvas).

Manifest lists primary files that contained in this xmind file.

Usage

If you create a new xmind file, you can directly operate sheets and topics after initializing a Workbook instance that represents a xmind file.

If you open an existing xmind file. You need call public func loadManifest() of Workbook after initializing a workbook to load some base informations. And now you can access the passwordHint to read and write the password hint. then, you need call public func loadContent(password: String? = nil) to load the metadata and sheets. When it's loaded, you can operate sheets and topics.

Simple

import XMindSDK

...
...

let wb = try Workbook.open(filePath: filePath)// This file path which contains an existing xmind file.
try wb.loadManifest()
try wb.loadContent(password: "123456")

let root = wb.allSheets.first!.rootTopic

let sub1 = root.addSubTopic("Sub Topic 1")
let sub2 = root.addSubTopic("Sub Topic 2")
let sub3 = root.addSubTopic("Sub Topic 3")

sub3.addSubTopic("Topic 4")
sub3.addSubTopic("Topic 5")

sub2.addMarker(Marker.Arrow.refresh)
root.addMarker(Marker.Flag.darkBlue)
sub1.addMarker(Marker.Priority.p2)

try wb.save(to: filePath, password: "123456")

Fast Creating

import XMindSDK

...
...

let wb = try! workbook {
    topic(title: "Apple") {
        topic(title: "Hardware") {
            topic(title: "iPhone") {
                topic(title: "iPhone 6")
                topic(title: "iPhone 7 Plus")
                topic(title: "iPhone 8")
                topic(title: "iPhone XS Max")
            }
            topic(title: "Mac") {
                topic(title: "MacBook Pro")
                topic(title: "Mac mini")
                topic(title: "Mac Pro")
            }
        }
        
        topic(title: "Software") {
            topic(title: "Xcode")
            topic(title: "Siri")
        }
    }
}

try wb.save(to: filePath)

Read the Documents for all details.

Installation

  • Carthage

    github "xmindltd/xmind-sdk-swift"
    
  • Swift Package Manager

    .package(url: "https://github.com/xmindltd/xmind-sdk-swift.git", .upToNextMinor(from: "1.1.0"))
    

License

This SDK is released under the MIT license. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].