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.2.0-beta.0
. Here is how you can add it to your Podfile
:
target 'YourApp' do
pod 'SealdSdk', '0.2.0-beta.0'
end
Then, you can install with pod install
.
You can then import it in your code with:
#import <SealdSdk/SealdSdk.h>
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:
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];
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:]
.