Skip to content

Commit

Permalink
PM-15904 Added precompiler compiler checks so that it keeps building …
Browse files Browse the repository at this point in the history
…on Xcode < 16.2
  • Loading branch information
fedemkr committed Dec 20, 2024
1 parent 6e4bc89 commit 9c871ec
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if compiler(>=6.0.3)
import AuthenticationServices
import XCTest

Expand Down Expand Up @@ -235,3 +236,4 @@ class ImportCiphersRepositoryTests: BitwardenTestCase {
XCTAssertEqual(progressDelegate.progressReports, [0.3, 0.8])
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,19 @@ protocol CredentialImportManager: AnyObject {
func importCredentials(token: UUID) async throws -> ASExportedCredentialData
}

#if compiler(>=6.0.3)

@available(iOS 18.2, *)
extension ASCredentialImportManager: CredentialImportManager {}

#else

class ASCredentialImportManager: CredentialImportManager {
func importCredentials(token: UUID) async throws -> ASExportedCredentialData {
ASExportedCredentialData()
}
}

struct ASExportedCredentialData {}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if compiler(>=6.0.3)
import AuthenticationServices
#endif
import XCTest

@testable import BitwardenShared
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if compiler(>=6.0.3)
import AuthenticationServices
import BitwardenSdk

Expand All @@ -21,3 +22,4 @@ class MockCredentialImportManager: CredentialImportManager {
try importCredentialsResult.get()
}
}
#endif

0 comments on commit 9c871ec

Please sign in to comment.