File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import AWSClientRuntime
1616@_spi ( InternalHttpEngineProxy) import AWSPluginsCore
1717import SmithyRetriesAPI
1818import SmithyRetries
19- #if canImport(UIKit)
19+ #if os(iOS) && canImport(UIKit)
2020import UIKit
2121#endif
2222
@@ -41,7 +41,7 @@ extension AWSCognitoAuthPlugin {
4141 AuthPluginErrorConstants . decodeConfigurationError. recoverySuggestion)
4242 }
4343
44- #if canImport(UIKit)
44+ #if os(iOS) && canImport(UIKit)
4545 guard UIApplication . shared. isProtectedDataAvailable else {
4646 throw PluginError . pluginConfigurationError (
4747 AuthPluginErrorConstants . protectedDataUnavailableError. errorDescription,
Original file line number Diff line number Diff line change 77import Foundation
88import Amplify
99
10- #if canImport(UIKit)
10+ #if os(iOS) && canImport(UIKit)
1111import UIKit
1212#endif
1313
@@ -34,7 +34,7 @@ extension AmplifyAuthTask where Self: DefaultLogger {
3434 get async throws {
3535 do {
3636 log. info ( " Starting execution for \( eventName) " )
37- #if canImport(UIKit)
37+ #if os(iOS) && canImport(UIKit)
3838 guard await UIApplication . shared. isProtectedDataAvailable else {
3939 throw AuthError . configuration (
4040 AuthPluginErrorConstants . protectedDataUnavailableError. errorDescription,
You can’t perform that action at this time.
0 commit comments