• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-swift / 29018885975

09 Jul 2026 12:40PM UTC coverage: 77.87% (-5.2%) from 83.062%
29018885975

Pull #1099

github

web-flow
Merge 2bab4f734 into 27f31bfb7
Pull Request #1099: feat(storage): OpenAPI codegen tool + generated Storage HTTP client

428 of 1233 new or added lines in 18 files covered. (34.71%)

6 existing lines in 2 files now uncovered.

8322 of 10687 relevant lines covered (77.87%)

33.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

41.67
/Sources/Auth/Storage/KeychainLocalStorage.swift
1
#if !os(Windows) && !os(Linux) && !os(Android)
2
  public import Foundation
3

4
  /// ``AuthLocalStorage`` implementation using Keychain. This is the default local storage used by the library.
5
  public struct KeychainLocalStorage: AuthLocalStorage {
6
    private let keychain: Keychain
7

8
    /// Creates a Keychain-backed storage instance.
9
    ///
10
    /// - Parameters:
11
    ///   - service: The Keychain service name used to namespace stored items.
12
    ///     Defaults to `"supabase.gotrue.swift"`.
13
    ///   - accessGroup: An optional Keychain access group for sharing items between apps.
14
    public init(service: String? = "supabase.gotrue.swift", accessGroup: String? = nil) {
1✔
15
      keychain = Keychain(service: service, accessGroup: accessGroup)
1✔
16
    }
1✔
17

18
    /// Stores `value` in the Keychain under `key`.
19
    ///
20
    /// - Parameters:
21
    ///   - key: The Keychain item key.
22
    ///   - value: The raw bytes to store.
23
    /// - Throws: A Keychain error if the write fails.
24
    public func store(key: String, value: Data) throws {
×
25
      try keychain.set(value, forKey: key)
×
26
    }
×
27

28
    /// Returns the data stored in the Keychain for `key`, or `nil` if not present.
29
    ///
30
    /// - Parameter key: The Keychain item key.
31
    /// - Returns: The stored bytes, or `nil` if the item does not exist.
32
    /// - Throws: A Keychain error if the read fails.
33
    public func retrieve(key: String) throws -> Data? {
4✔
34
      try keychain.data(forKey: key)
4✔
UNCOV
35
    }
×
36

37
    /// Removes the Keychain item for `key`.
38
    ///
39
    /// - Parameter key: The Keychain item key to delete.
40
    /// - Throws: A Keychain error if the delete fails.
41
    public func remove(key: String) throws {
×
42
      try keychain.deleteItem(forKey: key)
×
43
    }
×
44
  }
45
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc