Skip to content

die-tageszeitung/NorthLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPM compatible

NorthLib

NorthLib is a library of Swift types primarily intended to support iOS development. Although the main focus is on iOS, we modularized the library so that limited support for other platforms is available. Beside some wrappers of system libraries (to make these libraries available in Swift) the following modules are available:

  • NorthLowLevel
    Offers some C-functions based on POSIX libc library functions. Since Swift's standard library still lacks base OS functionality we feel the necessity to provide some minimal Swift types in NorthBase (see below) to be independent from Apple's Foundation module. Thus at least some functionality is available for Swift programs running on Linux. In addition we offer an interface for reading zip-Files as a stream, i.e. the ability to unpack a zip data stream without having to wait for the final table of contents.

  • NorthBase
    Offers Swift types purely based on the Swift standard library, NorthLowLevel and POSIX functions (e.g. class File).

  • NorthFoundation
    Extends NorthBase and imports Foundation to offer additional Functionality which is only available on MacOS and iOS (+ derivatives).

  • NorthUIKit
    Imports UIKit and is therefore only available on iOS compatible platforms. In a later release we might support Mac Catalyst as well.

  • NorthLib
    Is a tiny module that only imports NorthBase, NorthFoundation, NorthUIKit and re-exports all symbols from these modules, similar to how UIKit re-exports the symbols from Foundation.

File-Tree

The source files are grouped under the src subdirectory. C library wrappers reside in C<library> directories and the above noted modules are organized in:

  LowLevel   -> NorthLowLevel sources
  Base       -> NorthBase sources
  Foundation -> NorthFoundation sources
  UIKit      -> NorthUIKit sources

How to build

To build the NorthLib library use:

  swift build --product NorthLib

or to build the optimized release version:

  swift build -c release --product NorthLib

How to use

Add the dependency to the product NorthLib either to your Package.swift or to your Xcode project and link to libc++ and libz, eg. in Package.swift add:

  linkerSettings: [.linkedLibrary("z"), .linkedLibrary("c++")] 

to your target's definition.

Authors

Norbert Thies, [email protected]
Ringo Müller, [email protected]

License

NorthLib is available under the LGPL. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages