Overview of UICKeyChainStore
mainNSUserDefaults by providing a simplified interface for storing and retrieving sensitive data.repository·main·Indexed 23 days ago
https://github.com/aws-amplify/aws-sdk-iosLow-level access to various AWS services for iOS applications. Currently in a maintenance phase, with a recommendation to migrate to AWS Amplify for Swift for new development. Includes utility libraries such as UICKeyChainStore for secure data storage, GZIP for NSData compression, Mantle for JSON serialization and model mapping, Reachability for network monitoring, and TMCache for parallel key/value storage.
NSUserDefaults by providing a simplified interface for storing and retrieving sensitive data.As of August 1, 2025, the AWS SDK for iOS has entered the Maintenance Phase.
What this means for your project:
Recommendation: It is highly recommended to migrate to AWS Amplify for Swift, which is the modern, feature-rich library for cloud-connected apps. You can use the AWS SDK for iOS migration guide to assist with the transition.
TMCache is a fast, parallel key/value store designed for persisting temporary objects that are expensive to reproduce (e.g., downloaded data or slow processing results).
It consists of two self-similar stores:
Key Characteristics:
TMCache coordinates both stores so that objects added to memory are immediately available to other threads while being written to disk safely in the background.TMMemoryCache allows concurrent reads and serialized writes. TMDiskCache serializes disk access across all app instances to prevent file contention.NSCoding.UICKeyChainStore provides several key capabilities for managing secure data:
AWSTask objects for asynchronous operations to prevent blocking the UI thread. AWSTask is a renamed version of BFTask from the Bolts framework.When using XCFrameworks (via Swift Package Manager, Carthage, or Dynamic Frameworks), certain modules are named with an XCF suffix to resolve Swift compatibility issues. Specifically, AWSMobileClient is named AWSMobileClientXCF and AWSLocation is named AWSLocationXCF.
To use these SDKs, you must import them using the XCF suffix, but you can call their methods in your application code using the standard names without the suffix.
import AWSMobileClientXCF
import AWSLocationXCF
// Use the standard names in your code
AWSMobileClient.default().initialize()
let locationClient = AWSLocation.default()Instead of writing extensive boilerplate for NSCoding, NSCopying, isEqual:, and hash, you can inherit from MTLModel. MTLModel provides default implementations for these methods based on your @property declarations. It also simplifies JSON parsing and serialization through key path mapping and value transformers.
@interface GHIssue : MTLModel <MTLJSONSerializing>
@property (nonatomic, copy, readonly) NSURL *URL;
@property (nonatomic, copy, readonly) NSURL *HTMLURL;
@property (nonatomic, copy, readonly) NSNumber *number;
@property (nonatomic, assign, readonly) GHIssueState state;
@property (nonatomic, copy, readonly) NSString *reporterLogin;
@property (nonatomic, strong, readonly) GHUser *assignee;
@property (nonatomic, copy, readonly) NSDate *updatedAt;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *body;
@property (nonatomic, copy, readonly) NSDate *retrievedAt;
@endMTLModel conforms to <NSCoding>, you can archive your model objects to disk using NSKeyedArchiver. For more complex persistence needs or to avoid keeping entire models in memory, consider using Core Data.CBOR.encode(..., asByteString: true), if the computer is little-endian, the raw bytes of all items except UInt8 will be reversed to comply with CBOR's big-endian (network byte order) requirement. UInt8 arrays are treated as already being in network byte order and are not reversed.FMDB is built around three primary classes:
FMDatabase: Represents a single SQLite database connection. It is used to execute SQL statements (updates and queries).FMResultSet: Represents the results returned from executing a query on an FMDatabase.FMDatabaseQueue: A thread-safe wrapper used to perform queries and updates across multiple threads by serializing access to a single FMDatabase instance.To encode indefinite-length arrays, maps, strings, and byte strings, you must explicitly use open- and close-stream CBOR values. Between these markers, use chunk functions like encodeArrayChunk or encodeMapChunk to add data.
let map: [String: Int] = ["a": 1]
let map2 = ["B": 2]
CBOR.encodeMapStreamStart() + CBOR.encodeMapChunk(map) + CBOR.encodeMapChunk(map2) + CBOR.encodeStreamEnd()
let bs: [UInt8] = [0xf0]
let bs2: [UInt8] = [0xff]
CBOR.encodeByteStringStreamStart()
+ CBOR.encode(bs, asByteString: true)
+ CBOR.encode(bs2, asByteString: true)
+ CBOR.encodeStreamEnd()To update the SDK to a newer version, use the command corresponding to your dependency manager:
Run pod update in your project directory.
Note: If you encounter issues, delete Podfile.lock and the Pods/ directory, then run pod install for a clean installation.
Run carthage update in your project directory.
If you manually added frameworks:
$ pod update