Swiftpack.co -  TeskaLabs/SeaCat-iOS-G3 as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
TeskaLabs/SeaCat-iOS-G3
SeaCat SDK for iOS (3rd generation)
.package(url: "https://github.com/TeskaLabs/SeaCat-iOS-G3.git", from: "21.2.0")

SeaCat-iOS-G3

SeaCat SDK for iOS (3rd generation)

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate SeaCat into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'SeaCat', '~> 20.03.01'

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but SeaCat does support its use on supported platforms.

Once you have your Swift package set up, adding SeaCat as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/TeskaLabs/SeaCat-iOS-G3.git", .upToNextMajor(from: "20.03.01"))
]

Swift Package Manager (via Xcode)

Navigate Xcodes top menu File > Swift Packages > Add Package Dependency`. Then in dialog use url https://github.com/TeskaLabs/SeaCat-iOS-G3.git and version 20.03.01.

Usage

Working with SeaCat is simple.

import SeaCat

// 1. Configure SeaCat with your PKI URL.
let seacat = SeaCat(apiURL: "https://pki.seacat.io/seacat-demo/seacat")

// 2. Check whenever is SeaCat ready (Bool).
seacat.ready

// 3. Create URLSession with SeaCat identity.
let session = seacat.createURLSession()

Additionaly you might need this too.

// Get SeaCat identity (String). Ideal for logging or debuging clients.
seacat.identity?.identity

// Revoke current identity in PKI (e.g. Certificate).
seacat.identity?.revoke()

// When you revoke identity but you want continue with new identity.
seacat.identity?.enroll()

Notice

It is important to create URLSession after SeaCat become ready. If you revoke identity and then enroll with new one then you need create new URLSession too.

License

SeaCat is released under the BSD-3-Clause License. See LICENSE for details.

GitHub

link
Stars: 0
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API