github.com/cityos/CoreCityOS

⚡️ Open Smart City data standard as a framework


License
Apache-2.0

Documentation

https://img.shields.io/badge/platform-linux%20|%20osx%20|%20ios-blue.svg Build Status

CoreCityOS framework is designed as an CityOS open-source data format standard in the new IOT world.

Contents:

  1. Installation
  2. Usage
  3. Tutorials
  4. Contributing
  5. Licence

Installation

  1. Swift Package Manager
  2. Carthage
  3. Embedded Framework

Swift Package Manager

Swift Package Manager is currently only available for OSX and Linux apps. To build CoreCityOS with Swift Package Manager add it like dependency inside your Package.swift file:

import PackageDescription

// Example Package.swift file
let package = Package (
  name: "CityOS",
  dependencies: [
    .Package(url: "https://github.com/cityos/CoreCityOS.git", majorVersion: 1),
  ]
)

After dependency is added to the Package.swift, run following to compile and build the framework:

$ swift build

Carthage

You can use Carthage to install CoreCityOS by adding following to your Cartfile:

github "cityos/CoreCityOS" ~> 0.0.1

After that run following to build framework:

$ carthage update

Note that you can pass --platform option to the carthage, if you want to build framework only for one platform. Supported Carthage platforms are iOS, OSX and tvOS.

Manual installation

First add CoreCityOS to your project root folder as a submodule

$ git submodule add https://github.com/cityos/CoreCityOS.git

After that drag CoreCityOS.xcodeproj to your project and add it to Linked Frameworks and Libraries in your target settings.

Usage

After you have added CoreCityOS by any of the supported methods you can import it with import statement:

import CoreCityOS

Tutorials

  • CoreCityOS basic tutorial on data structures and protocols Link
  • How to create your own IOT framework using CoreCityOS as base framework Link