Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SimpleKeychain/SimpleKeychain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public struct SimpleKeychain: @unchecked Sendable {
/// - Parameter synchronizable: Whether the items should be synchronized through iCloud. Defaults to `false`.
/// - Parameter attributes: Additional attributes to include in every query. Defaults to an empty dictionary.
/// - Returns: A ``SimpleKeychain`` instance.
public init(service: String = Bundle.main.bundleIdentifier!,
public init(service: String = Bundle.main.bundleIdentifier ?? "SimpleKeychain",
accessGroup: String? = nil,
accessibility: Accessibility = .afterFirstUnlock,
accessControlFlags: SecAccessControlCreateFlags? = nil,
Expand All @@ -61,7 +61,7 @@ public struct SimpleKeychain: @unchecked Sendable {
/// - Parameter synchronizable: Whether the items should be synchronized through iCloud. Defaults to `false`.
/// - Parameter attributes: Additional attributes to include in every query. Defaults to an empty dictionary.
/// - Returns: A ``SimpleKeychain`` instance.
public init(service: String = Bundle.main.bundleIdentifier!,
public init(service: String = Bundle.main.bundleIdentifier ?? "SimpleKeychain",
accessGroup: String? = nil,
accessibility: Accessibility = .afterFirstUnlock,
accessControlFlags: SecAccessControlCreateFlags? = nil,
Expand Down
3 changes: 1 addition & 2 deletions SimpleKeychainTests/SimpleKeychainSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SimpleKeychainTests: XCTestCase {

func testInitializationWithDefaultValues() {
XCTAssertEqual(sut.accessGroup, nil)
XCTAssertEqual(sut.service, Bundle.main.bundleIdentifier)
XCTAssertEqual(sut.service, Bundle.main.bundleIdentifier ?? "SimpleKeychain")
XCTAssertEqual(sut.accessibility, Accessibility.afterFirstUnlock)
XCTAssertEqual(sut.accessControlFlags, nil)
XCTAssertEqual(sut.isSynchronizable, false)
Expand Down Expand Up @@ -374,4 +374,3 @@ public extension Dictionary where Key == String, Value == Any {
public func ==(lhs: [String: Any], rhs: [String: Any]) -> Bool {
return NSDictionary(dictionary: lhs).isEqual(to: rhs)
}