Skip to content

Seald SDK for iOS

WARNING

This package is still early-access:

  • the interface will probably still have breaking changes
  • some quality-of-life features are still missing
  • some bugs may still be present
  • the documentation may still be incomplete, or not very readable

Feel free to give us feedback!

This package is the Seald SDK for iOS.

It is available as a Cocoapod.

The current version is 0.4.0-beta.2. Here is how you can add it to your Podfile:

ruby
target 'YourApp' do
  pod 'SealdSdk', '0.4.0-beta.2'
end
target 'YourApp' do
  pod 'SealdSdk', '0.4.0-beta.2'
end

Then, you can install with pod install.

You can then import it in your code with:

objc
#import <SealdSdk/SealdSdk.h>
#import <SealdSdk/SealdSdk.h>
swift
import SealdSdk
import SealdSdk

You can also see the example app for Objective-C, or the example app for Swift.

This package contains the main SealdSdk class, the SealdEncryptionSession class, as well as multiple helper classes.

SealdSdk

SealdSdk is the main class for the Seald SDK. It represents an instance of the Seald SDK.

You can instantiate it this way:

objc
SealdSdk* seald = [[SealdSdk alloc] initWithApiUrl:@"https://api.seald.io/"
                                            appId:@"YourAppId"
                                           dbPath:@"/myApp/seald_db"
                                      dbb64SymKey:@"A Secret Key to encrypt the local database, encoded in b64"
                                     instanceName:@"my-instance"
                                         logLevel:0
                                       logNoColor:true
                        encryptionSessionCacheTTL:0
                                          keySize:4096
                                           error:&error];
SealdSdk* seald = [[SealdSdk alloc] initWithApiUrl:@"https://api.seald.io/"
                                            appId:@"YourAppId"
                                           dbPath:@"/myApp/seald_db"
                                      dbb64SymKey:@"A Secret Key to encrypt the local database, encoded in b64"
                                     instanceName:@"my-instance"
                                         logLevel:0
                                       logNoColor:true
                        encryptionSessionCacheTTL:0
                                          keySize:4096
                                           error:&error];
swift
let seald = try! SealdSdk.init(
  apiUrl: "https://api.seald.io/",
  appId: "YourAppId",
  dbPath: "/myApp/seald_db", 
  dbb64SymKey: "A Secret Key to encrypt the local database, encoded in b64",
  instanceName: "my-instance",
  logLevel: 0,
  logNoColor: true,
  encryptionSessionCacheTTL: 0,
  keySize: 4096
)
let seald = try! SealdSdk.init(
  apiUrl: "https://api.seald.io/",
  appId: "YourAppId",
  dbPath: "/myApp/seald_db", 
  dbb64SymKey: "A Secret Key to encrypt the local database, encoded in b64",
  instanceName: "my-instance",
  logLevel: 0,
  logNoColor: true,
  encryptionSessionCacheTTL: 0,
  keySize: 4096
)

This class then allows you to create an account, create or retrieve a SealdEncryptionSession, etc.

See the SealdSdk reference for more information.

SealdEncryptionSession

A SealdEncryptionSession allows you to encrypt / decrypt multiple messages or files.

This should not be instantiated directly, and should be either created with -[SealdSdk createEncryptionSessionWithRecipients:useCache:error:] or retrieved with -[SealdSdk retrieveEncryptionSessionWithSessionId:useCache:error:] or -[SealdSdk retrieveEncryptionSessionFromMessage:useCache:error:].

© 2023 Seald SAS

You can find the license information of Open Source libraries used in Seald SDK for mobile at https://download.seald.io/download/mobile_dependencies_licenses_0.4.0-beta.2.txt.