File tree 2 files changed +4
-4
lines changed
AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import AWSClientRuntime
16
16
@_spi ( InternalHttpEngineProxy) import AWSPluginsCore
17
17
import SmithyRetriesAPI
18
18
import SmithyRetries
19
- #if canImport(UIKit)
19
+ #if os(iOS) && canImport(UIKit)
20
20
import UIKit
21
21
#endif
22
22
@@ -41,7 +41,7 @@ extension AWSCognitoAuthPlugin {
41
41
AuthPluginErrorConstants . decodeConfigurationError. recoverySuggestion)
42
42
}
43
43
44
- #if canImport(UIKit)
44
+ #if os(iOS) && canImport(UIKit)
45
45
guard UIApplication . shared. isProtectedDataAvailable else {
46
46
throw PluginError . pluginConfigurationError (
47
47
AuthPluginErrorConstants . protectedDataUnavailableError. errorDescription,
Original file line number Diff line number Diff line change 7
7
import Foundation
8
8
import Amplify
9
9
10
- #if canImport(UIKit)
10
+ #if os(iOS) && canImport(UIKit)
11
11
import UIKit
12
12
#endif
13
13
@@ -34,7 +34,7 @@ extension AmplifyAuthTask where Self: DefaultLogger {
34
34
get async throws {
35
35
do {
36
36
log. info ( " Starting execution for \( eventName) " )
37
- #if canImport(UIKit)
37
+ #if os(iOS) && canImport(UIKit)
38
38
guard await UIApplication . shared. isProtectedDataAvailable else {
39
39
throw AuthError . configuration (
40
40
AuthPluginErrorConstants . protectedDataUnavailableError. errorDescription,
You can’t perform that action at this time.
0 commit comments