### Configure StableID and RevenueCat for Basic Setup (Swift) Source: https://github.com/codykerns/stableid/blob/main/README.md This example shows how to configure StableID and then use its generated ID to initialize RevenueCat. It handles cases where an ID is already stored or needs to be fetched/generated. ```swift import StableID import RevenueCat class AppDelegate: UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Configure StableID first if StableID.hasStoredID { StableID.configure() // Configure RevenueCat with StableID Purchases.configure(withAPIKey: "your_api_key", appUserID: StableID.id) } else { Task { // Try to fetch AppTransactionID, fallback to generated ID if it fails if let id = try? await StableID.fetchAppTransactionID() { StableID.configure(id: id) } else { StableID.configure() } // Configure RevenueCat after StableID is ready Purchases.configure(withAPIKey: "your_api_key", appUserID: StableID.id) } } return true } } ``` -------------------------------- ### Handle User Login/Logout with StableID and RevenueCat (Swift) Source: https://github.com/codykerns/stableid/blob/main/README.md This example shows how to manage user sessions by calling `StableID.identify` upon user login and `StableID.generateNewID` upon logout, ensuring RevenueCat is updated accordingly to reflect the user's authenticated state. ```swift import StableID import RevenueCat func userDidLogin(userID: String) { // Update StableID to use the user's account ID StableID.identify(id: userID) // Update RevenueCat to match Purchases.shared.logIn(userID) { customerInfo, created, error in if let error = error { print("Error logging in to RevenueCat: (error)") } else { print("Successfully logged in to RevenueCat") } } } func userDidLogout() { // Generate a new anonymous ID StableID.generateNewID() // Switch RevenueCat to the new anonymous ID Purchases.shared.logIn(StableID.id) { customerInfo, created, error in if let error = error { print("Error switching to anonymous ID: (error)") } else { print("Switched to anonymous ID: (StableID.id)") } } } ``` -------------------------------- ### Custom ID Generator for Testing StableID (Swift) Source: https://github.com/codykerns/stableid/blob/main/README.md Provides an example of creating a custom `IDGenerator` conforming to the `StableID` protocol to generate specific test IDs, conditionally configured only in debug builds. ```swift import StableID struct TestIDGenerator: IDGenerator { func generateID() -> String { return "test-user-\(UUID().uuidString.prefix(8))" } } #if DEBUG StableID.configure(idGenerator: TestIDGenerator()) #else StableID.configure() #endif ``` -------------------------------- ### Check and Initialize StableID Source: https://context7.com/codykerns/stableid/llms.txt Determines if a StableID is already stored and configures the library accordingly. It can use a stored ID, fetch an AppTransactionID, or generate a new one as a fallback. This function is crucial for initial app setup and service integration. ```swift import StableID func initializeApp() async { if StableID.hasStoredID { // We already have an ID stored, just configure StableID.configure() print("Using stored ID: (StableID.id)") } else { // No stored ID, fetch AppTransactionID do { let appTransactionID = try await StableID.fetchAppTransactionID() StableID.configure(id: appTransactionID) print("Configured with new AppTransactionID: (StableID.id)") } catch { print("Error fetching AppTransactionID: (error)") // Fallback to generated ID StableID.configure() print("Configured with generated ID: (StableID.id)") } } // Now use the ID initializeServices() } func initializeServices() { // Initialize analytics Analytics.setUserId(StableID.id) // Initialize RevenueCat Purchases.configure(withAPIKey: "your_api_key", appUserID: StableID.id) // Initialize other services print("All services initialized with ID: (StableID.id)") } ``` -------------------------------- ### Get Current Stable User ID Source: https://github.com/codykerns/stableid/blob/main/README.md Retrieves the current stable user identifier. This is the primary method to access the ID that persists across devices and app reinstalls. ```swift let currentID = StableID.id ``` -------------------------------- ### Access and Utilize StableID's Persistent User ID (Swift) Source: https://context7.com/codykerns/stableid/llms.txt Retrieves the current stable user identifier managed by StableID. This ID persists across app launches and is synchronized via iCloud. The example shows its use with RevenueCat and in network requests. ```swift import StableID import RevenueCat // Configure StableID first StableID.configure() // Access the stable identifier let userID = StableID.id print("Current user ID: (userID)") // Use with RevenueCat Purchases.configure(withAPIKey: "your_revenuecat_api_key", appUserID: StableID.id) // Use in network requests let url = URL(string: "https://api.example.com/users/(StableID.id)/profile")! var request = URLRequest(url: url) request.httpMethod = "GET" let (data, response) = try await URLSession.shared.data(for: request) if let httpResponse = response as? HTTPURLResponse, httpResponse.statusCode == 200 { print("Successfully fetched user profile for ID: (StableID.id)") } ``` -------------------------------- ### SwiftUI App Configuration with StableID and RevenueCat (Swift) Source: https://github.com/codykerns/stableid/blob/main/README.md Illustrates how to asynchronously configure both StableID and RevenueCat within the `init` method of a SwiftUI App struct, using `.preferStored` policy and handling potential errors during fetching. ```swift import SwiftUI import StableID import RevenueCat @main struct MyApp: App { init() { // Configure StableID with .preferStored policy Task { do { let id = try await StableID.fetchAppTransactionID() StableID.configure(id: id, policy: .preferStored) // Configure RevenueCat after StableID is ready Purchases.configure(withAPIKey: "your_api_key", appUserID: StableID.id) } catch { print("Error configuring StableID: (error)") // Fallback to generated ID StableID.configure() Purchases.configure(withAPIKey: "your_api_key", appUserID: StableID.id) } } } var body: some Scene { WindowGroup { ContentView() } } } ``` -------------------------------- ### StableID Configuration with ID Policies Source: https://github.com/codykerns/stableid/blob/main/README.md Configures StableID with specific policies to control how a provided ID is used. `.preferStored` prioritizes existing stored IDs, while `.forceUpdate` always uses the provided ID and updates storage. ```swift let id = try await StableID.fetchAppTransactionID() StableID.configure(id: id, policy: .preferStored) ``` ```swift StableID.configure(id: "user-123", policy: .forceUpdate) ``` -------------------------------- ### Update RevenueCat on StableID Change with Delegate (Swift) Source: https://github.com/codykerns/stableid/blob/main/README.md Demonstrates using the StableIDDelegate pattern to receive notifications when the StableID changes (e.g., due to iCloud sync) and subsequently update RevenueCat with the new user identifier. ```swift import StableID import RevenueCat class AppCoordinator: StableIDDelegate { init() { // Set up StableID delegate StableID.set(delegate: self) } func willChangeID(currentID: String, candidateID: String) -> String? { // Optional: validate or modify the candidate ID return nil } func didChangeID(newID: String) { // Update RevenueCat with the new ID Purchases.shared.logIn(newID) { customerInfo, created, error in if let error = error { print("Error updating RevenueCat user: (error)") } else { print("Successfully updated RevenueCat user to: (newID)") } } } } ``` -------------------------------- ### Conditional StableID Configuration based on Launch State (Swift) Source: https://context7.com/codykerns/stableid/llms.txt Shows how to apply different StableID configuration policies based on whether it's the application's first launch or a subsequent one. On the first launch, `.forceUpdate` is used to establish a new ID, while on subsequent launches, `.preferStored` is used to maintain consistency. This logic helps in managing ID behavior during the app's lifecycle. ```swift import StableID // Example 3: Conditional policy based on app state func configureWithPolicy(isFirstLaunch: Bool) { if isFirstLaunch { // First launch - use forceUpdate to establish new ID Task { let id = try await StableID.fetchAppTransactionID() StableID.configure(id: id, policy: .forceUpdate) } } else { // Subsequent launches - prefer stored ID for consistency Task { let id = try await StableID.fetchAppTransactionID() StableID.configure(id: id, policy: .preferStored) } } } ``` -------------------------------- ### Implement Custom ID Generators (Swift) Source: https://context7.com/codykerns/stableid/llms.txt This Swift code demonstrates how to implement the `IDGenerator` protocol to create custom identifiers with specific patterns, such as prefixed UUIDs, timestamp-based IDs, or environment-specific IDs. It shows how to configure StableID with these custom generators and also demonstrates the usage of built-in generators like `StandardGenerator` and `ShortIDGenerator`. Dependencies include StableID and Foundation. ```swift import StableID import Foundation // Example 1: Custom prefixed UUID generator struct PrefixedIDGenerator: IDGenerator { let prefix: String func generateID() -> String { return "\(prefix)-\(UUID().uuidString)" } } // Example 2: Timestamp-based ID generator struct TimestampIDGenerator: IDGenerator { func generateID() -> String { let timestamp = Int(Date().timeIntervalSince1970) let random = UUID().uuidString.prefix(8) return "\(timestamp)-\(random)" } } // Example 3: Environment-specific generator struct EnvironmentIDGenerator: IDGenerator { func generateID() -> String { #if DEBUG return "dev-\(UUID().uuidString.prefix(8))" #else return "prod-\(UUID().uuidString)" #endif } } // Usage #if DEBUG StableID.configure(idGenerator: EnvironmentIDGenerator()) #else StableID.configure(idGenerator: PrefixedIDGenerator(prefix: "user")) #endif print("Generated ID: (StableID.id)") // Built-in generators // StandardGenerator - generates full UUIDs StableID.configure(idGenerator: StableID.StandardGenerator()) print("Standard ID: (StableID.id)") // e.g., "B3C7E5F1-2D4A-4E8B-9C1D-7F3A6B2E8C4D" // ShortIDGenerator - generates 8-character alphanumeric IDs StableID.configure(idGenerator: StableID.ShortIDGenerator()) print("Short ID: (StableID.id)") // e.g., "aB3xY9zQ" ``` -------------------------------- ### Check if StableID is Configured Source: https://github.com/codykerns/stableid/blob/main/README.md Checks whether StableID has been previously configured. This is useful to avoid reconfiguring the identifier unnecessarily. ```swift StableID.isConfigured ``` -------------------------------- ### Implement Custom IDGenerator in Swift Source: https://github.com/codykerns/stableid/blob/main/README.md This Swift code snippet demonstrates how to create a custom ID generator by conforming to the `IDGenerator` protocol and implementing the `generateID()` method. The `generateID()` method should contain the logic for creating the custom identifier. This allows for flexible ID generation patterns. ```swift struct MyCustomIDGenerator: IDGenerator { func generateID() -> String { // do something custom return myGeneratedID } } ``` -------------------------------- ### User Migration with StableID Policies (Swift) Source: https://context7.com/codykerns/stableid/llms.txt Provides a scenario for migrating user IDs using StableID. It allows for either preserving the existing ID if `preferExisting` is true and an ID is stored, or forcing an update to a `newID` using the `.forceUpdate` policy. This is useful for managing user data transitions and ensuring ID integrity during migrations. ```swift import StableID // Example 4: User migration scenario func migrateUserID(oldID: String, newID: String, preferExisting: Bool) { if preferExisting && StableID.hasStoredID { // Keep existing ID StableID.configure(id: newID, policy: .preferStored) print("Kept existing ID: (StableID.id)") } else { // Force migration to new ID StableID.configure(id: newID, policy: .forceUpdate) print("Migrated to new ID: (StableID.id)") } } ``` -------------------------------- ### Basic StableID Configuration Source: https://github.com/codykerns/stableid/blob/main/README.md Initializes StableID with auto-generated identifiers. By default, it checks iCloud and local user defaults for an existing ID or generates a new one if none is found. ```swift StableID.configure() ``` ```swift StableID.configure(id: ) ``` -------------------------------- ### Configure StableID with Different Policies and Generators (Swift) Source: https://context7.com/codykerns/stableid/llms.txt Initializes StableID using various strategies, including default UUID generation, custom identifiers, AppTransactionID, and user-defined ID generators. This function must be called once before accessing other StableID features. ```swift import StableID // Basic configuration - uses stored ID or generates new one StableID.configure() // With custom ID and force update policy StableID.configure(id: "user-123", policy: .forceUpdate) // With AppTransactionID and preferStored policy Task { do { let appTransactionID = try await StableID.fetchAppTransactionID() StableID.configure(id: appTransactionID, policy: .preferStored) print("Configured with ID: (StableID.id)") } catch { print("Error fetching AppTransactionID: (error)") // Fallback to auto-generated ID StableID.configure() } } // With custom ID generator struct CustomIDGenerator: IDGenerator { func generateID() -> String { return "custom-\(UUID().uuidString.prefix(12))" } } StableID.configure(idGenerator: CustomIDGenerator()) ``` -------------------------------- ### Swift UserManager Implementing StableIDDelegate Source: https://context7.com/codykerns/stableid/llms.txt This Swift code implements the StableIDDelegate protocol to manage user ID changes. It intercepts ID changes before they happen, performing validation and transformations, and responds to completed changes by syncing data with RevenueCat, analytics services, and a backend API. It also updates local user defaults and posts a notification. ```swift import StableID import RevenueCat import Foundation class UserManager: StableIDDelegate { private var analyticsService: AnalyticsService init(analyticsService: AnalyticsService) { self.analyticsService = analyticsService StableID.set(delegate: self) } func willChangeID(currentID: String, candidateID: String) -> String? { // Log the impending change print("ID will change: \(currentID) -> \(candidateID)") // Example: Validate the candidate ID format if candidateID.isEmpty || candidateID.count < 8 { print("Invalid candidate ID, rejecting change") return currentID // Keep current ID } // Example: Check if migration is allowed if UserDefaults.standard.bool(forKey: "id_migration_locked") { print("ID migration is locked, rejecting change") return currentID } // Example: Transform the candidate ID if candidateID.hasPrefix("temp-") { let permanentID = candidateID.replacingOccurrences(of: "temp-", with: "perm-") print("Transforming ID to: \(permanentID)") return permanentID } // Accept the candidate ID as-is return nil } func didChangeID(newID: String) { print("ID changed to: \(newID)") // Sync with RevenueCat Purchases.shared.logIn(newID) { customerInfo, created, error in if let error = error { print("RevenueCat sync error: \(error)") } else { print("RevenueCat synced successfully") } } // Sync with analytics analyticsService.setUserID(newID) analyticsService.logEvent("user_id_changed", parameters: ["new_id": newID]) // Sync with backend Task { do { let url = URL(string: "https://api.example.com/users/\(newID)/sync")! var request = URLRequest(url: url) request.httpMethod = "POST" request.setValue("application/json", forHTTPHeaderField: "Content-Type") let payload = ["user_id": newID, "timestamp": Date().timeIntervalSince1970] request.httpBody = try JSONEncoder().encode(payload) let (_, response) = try await URLSession.shared.data(for: request) if let httpResponse = response as? HTTPURLResponse { print("Backend sync status: \(httpResponse.statusCode)") } } catch { print("Backend sync error: \(error)") } } // Update local state UserDefaults.standard.set(newID, forKey: "current_user_id") NotificationCenter.default.post(name: .userIDChanged, object: newID) } } // Supporting code class AnalyticsService { func setUserID(_ id: String) { print("Analytics user ID set to: \(id)") } func logEvent(_ name: String, parameters: [String: Any]) { print("Logged event: \(name) with parameters: \(parameters)") } } extension Notification.Name { static let userIDChanged = Notification.Name("userIDChanged") } ``` -------------------------------- ### Check StableID Configuration Status (Swift) Source: https://context7.com/codykerns/stableid/llms.txt This Swift code checks if StableID has already been configured to prevent duplicate configurations. It handles cases where an ID is stored or needs to be fetched, and ensures services are configured only after StableID is ready. Dependencies include StableID and UIKit. ```swift import StableID import UIKit class AppDelegate: UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Check if already configured (useful for testing or app extensions) if !StableID.isConfigured { if StableID.hasStoredID { StableID.configure() print("StableID configured: (StableID.id)") } else { Task { do { let id = try await StableID.fetchAppTransactionID() StableID.configure(id: id, policy: .preferStored) } catch { StableID.configure() } // Configure services after StableID is ready DispatchQueue.main.async { self.configureServices() } } } } else { print("StableID already configured: (StableID.id)") configureServices() } return true } func configureServices() { guard StableID.isConfigured else { print("Cannot configure services - StableID not configured") return } Purchases.configure(withAPIKey: "your_api_key", appUserID: StableID.id) print("Services configured with ID: (StableID.id)") } } ``` -------------------------------- ### Configure StableID with .preferStored Policy (Swift) Source: https://context7.com/codykerns/stableid/llms.txt Demonstrates using the `.preferStored` policy to maintain ID consistency. If an ID is already stored locally or via iCloud, it will be used; otherwise, a newly fetched AppTransactionID will be employed. This is useful for ensuring that the same identifier is used across multiple launches of the application. ```swift import StableID // Example 1: preferStored policy - maintains consistency Task { let newID = try await StableID.fetchAppTransactionID() // If an ID is already stored (from iCloud or local), use it // Otherwise, use the fetched AppTransactionID StableID.configure(id: newID, policy: .preferStored) print("Using ID: (StableID.id)") } ``` -------------------------------- ### Configure StableID with Custom ID Generator in Swift Source: https://github.com/codykerns/stableid/blob/main/README.md This Swift code snippet shows how to configure StableID to use a custom ID generator. By passing an instance of your custom generator (conforming to `IDGenerator`) to the `StableID.configure()` method, all subsequent identifiers generated by StableID will use your custom logic. ```swift StableID.configure(idGenerator: MyCustomIDGenerator()) ``` -------------------------------- ### Generate New Anonymous ID with RevenueCat Integration (Swift) Source: https://context7.com/codykerns/stableid/llms.txt Demonstrates generating a new anonymous identifier using StableID.generateNewID() and integrating it with RevenueCat for user management after logout. This function is useful for creating new anonymous identities when a user logs out. It takes no arguments and returns void. ```swift import StableID import RevenueCat // User logout flow func userDidLogout() { print("Previous ID: \(StableID.id)") // Generate new anonymous ID StableID.generateNewID() print("New anonymous ID: \(StableID.id)") // Update RevenueCat with new anonymous ID Purchases.shared.logOut { error in if let error = error { print("Error logging out of RevenueCat: \(error)") return } Purchases.shared.logIn(StableID.id) { customerInfo, created, error in if let error = error { print("Error creating new anonymous RevenueCat user: \(error)") } else { print("Successfully switched to new anonymous ID") } } } // Clear local user data UserDefaults.standard.removeObject(forKey: "user_email") UserDefaults.standard.removeObject(forKey: "user_preferences") } ``` -------------------------------- ### Fetch App Store Transaction ID for StableID Configuration (Swift) Source: https://context7.com/codykerns/stableid/llms.txt Illustrates how to fetch the AppTransactionID using StableID.fetchAppTransactionID() to configure StableID. This ID is a globally unique identifier for app downloads. The function requires no arguments but can throw an error. The configuration uses a .preferStored policy. ```swift import StableID import SwiftUI @main struct MyApp: App { @State private var isConfigured = false init() { configureStableID() } var body: some Scene { WindowGroup { if isConfigured { ContentView() } else { ProgressView("Initializing...") } } } private func configureStableID() { Task { // Check if we already have a stored ID if StableID.hasStoredID { StableID.configure() await MainActor.run { self.isConfigured = true } } else { // Fetch AppTransactionID only if needed do { let appTransactionID = try await StableID.fetchAppTransactionID() StableID.configure(id: appTransactionID, policy: .preferStored) print("Configured with AppTransactionID: \(StableID.id)") } catch { print("Failed to fetch AppTransactionID: \(error.localizedDescription)") // Fallback to auto-generated ID StableID.configure() print("Configured with generated ID: \(StableID.id)") } await MainActor.run { self.isConfigured = true } } } } } ``` -------------------------------- ### Set StableID Delegate for Notifications Source: https://context7.com/codykerns/stableid/llms.txt Configures a delegate to receive callbacks before and after StableID changes. This allows for validation and synchronized updates with other services like RevenueCat or a backend API. Dependencies include StableID and potentially RevenueCat. ```swift import StableID import RevenueCat class AppCoordinator: StableIDDelegate { init() { // Configure StableID first if StableID.hasStoredID { StableID.configure() } else { Task { if let id = try? await StableID.fetchAppTransactionID() { StableID.configure(id: id, policy: .preferStored) } else { StableID.configure() } } } // Set delegate to receive ID change notifications StableID.set(delegate: self) } func willChangeID(currentID: String, candidateID: String) -> String? { // Optional: validate or modify the candidate ID before it's set print("StableID will change from (currentID) to (candidateID)") // Example: Prevent changing to certain IDs if candidateID.hasPrefix("invalid-") { print("Rejecting invalid candidate ID, keeping current ID") return currentID } // Return nil to accept the candidate ID as-is return nil } func didChangeID(newID: String) { print("StableID changed to: (newID)") // Sync with RevenueCat Purchases.shared.logIn(newID) { customerInfo, created, error in if let error = error { print("Error syncing RevenueCat: (error)") } else { print("Successfully synced RevenueCat with new ID") } } // Sync with backend Task { let url = URL(string: "https://api.example.com/users/(newID)/sync")! var request = URLRequest(url: url) request.httpMethod = "PUT" do { let (_, response) = try await URLSession.shared.data(for: request) if let httpResponse = response as? HTTPURLResponse, httpResponse.statusCode == 200 { print("Successfully synced ID change with backend") } } catch { print("Error syncing with backend: (error)") } } } } ``` -------------------------------- ### Configure StableID with .forceUpdate Policy (Swift) Source: https://context7.com/codykerns/stableid/llms.txt Illustrates the use of the `.forceUpdate` policy to unconditionally override any existing stored ID with a new one. This function ensures that the application always uses the provided `accountID`, regardless of whether a previous ID was stored. This is typically used when a definitive change in user accounts or identifiers is required. ```swift import StableID // Example 2: forceUpdate policy - always updates func switchToAccountID(accountID: String) { // Always use the provided ID, overriding any stored ID StableID.configure(id: accountID, policy: .forceUpdate) print("Forced update to: (StableID.id)") } ``` -------------------------------- ### Change StableID Identifier Source: https://github.com/codykerns/stableid/blob/main/README.md Changes the current user identifier for StableID. This method forces an update to the new identifier and updates the storage. ```swift StableID.identify(id: ) ``` -------------------------------- ### Configure StableID with App Store Transaction ID (iOS 16.0+) Source: https://github.com/codykerns/stableid/blob/main/README.md Configures StableID using the App Store's App Transaction ID, providing a globally unique and stable identifier tied to the user's Apple Account. This is the recommended approach for App Store apps, ensuring consistency across devices. ```swift // Only fetch if not already configured if StableID.hasStoredID { StableID.configure() } else { Task { let id = try await StableID.fetchAppTransactionID() StableID.configure(id: id) } } ``` ```swift Task { let id = try await StableID.fetchAppTransactionID() StableID.configure(id: id, policy: .preferStored) } ``` -------------------------------- ### Set StableID Delegate for ID Change Notifications Source: https://github.com/codykerns/stableid/blob/main/README.md Configures a delegate to receive notifications when the user identifier changes, such as detecting a change from another iCloud device. The delegate can intercept and modify the ID change. ```swift // call after configuring StableID StableID.set(delegate: MyClass()) class MyClass: StableIDDelegate { func willChangeID(currentID: String, candidateID: String) -> String? { // called before StableID changes IDs, it gives you the option to return the proper ID } func didChangeID(newID: String) { // called once the ID changes } } ``` -------------------------------- ### Update StableID with New User Identifier Upon Login (Swift) Source: https://context7.com/codykerns/stableid/llms.txt Changes the current stable identifier to a new value, persisting it locally and to iCloud. This function is ideal for updating from an anonymous ID to a logged-in user's account ID and synchronizing with services like RevenueCat and backend systems. ```swift import StableID import RevenueCat // User login flow func userDidLogin(email: String, accountID: String) { // Update StableID to use the user's account ID StableID.identify(id: accountID) print("Updated StableID to: (StableID.id)") // Sync with RevenueCat Purchases.shared.logIn(accountID) { customerInfo, created, error in if let error = error { print("Error logging in to RevenueCat: (error)") } else if created { print("New RevenueCat user created") } else { print("Existing RevenueCat user restored") } } // Sync with your backend Task { let url = URL(string: "https://api.example.com/users/sync")! var request = URLRequest(url: url) request.httpMethod = "POST" request.setValue("application/json", forHTTPHeaderField: "Content-Type") let payload = ["user_id": accountID, "email": email] request.httpBody = try? JSONEncoder().encode(payload) let (_, response) = try await URLSession.shared.data(for: request) if let httpResponse = response as? HTTPURLResponse, httpResponse.statusCode == 200 { print("Successfully synced user ID with backend") } } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.