File tree Expand file tree Collapse file tree 5 files changed +55
-2
lines changed
AmplifyPlugins/Auth/Sources Expand file tree Collapse file tree 5 files changed +55
-2
lines changed Original file line number Diff line number Diff line change 5
5
// SPDX-License-Identifier: Apache-2.0
6
6
//
7
7
8
+ import AmplifyAvailability
8
9
import Foundation
9
10
10
11
struct ASFAppInfo : ASFAppInfoBehavior {
@@ -16,9 +17,9 @@ struct ASFAppInfo: ASFAppInfoBehavior {
16
17
var targetSDK : String {
17
18
var targetSDK : String = " "
18
19
#if os(iOS) || os(watchOS) || os(tvOS)
19
- targetSDK = " \( __IPHONE_OS_VERSION_MIN_REQUIRED ) "
20
+ targetSDK = " \( getIOSVersionMinRequired ( ) ) "
20
21
#elseif os(macOS)
21
- targetSDK = " \( __MAC_OS_X_VERSION_MIN_REQUIRED ) "
22
+ targetSDK = " \( getMACOSXVersionMinRequired ( ) ) "
22
23
#else
23
24
targetSDK = " Unknown "
24
25
#endif
Original file line number Diff line number Diff line change
1
+ //
2
+ // Copyright Amazon.com Inc. or its affiliates.
3
+ // All Rights Reserved.
4
+ //
5
+ // SPDX-License-Identifier: Apache-2.0
6
+ //
7
+
8
+ #include "include/AmplifyAvailability.h"
9
+ #include <Availability.h>
10
+
11
+ #if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
12
+ int getIOSVersionMinRequired (void ) {
13
+ return __IPHONE_OS_VERSION_MIN_REQUIRED ;
14
+ }
15
+ #endif
16
+
17
+ #if TARGET_OS_OSX
18
+ int getMACOSXVersionMinRequired (void ) {
19
+ return __MAC_OS_X_VERSION_MIN_REQUIRED ;
20
+ }
21
+ #endif
Original file line number Diff line number Diff line change
1
+ //
2
+ // Copyright Amazon.com Inc. or its affiliates.
3
+ // All Rights Reserved.
4
+ //
5
+ // SPDX-License-Identifier: Apache-2.0
6
+ //
7
+
8
+ #ifndef AmplifyAvailability_h
9
+ #define AmplifyAvailability_h
10
+
11
+ #include <TargetConditionals.h>
12
+
13
+ #if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
14
+ int getIOSVersionMinRequired (void );
15
+ #endif
16
+
17
+ #if TARGET_OS_OSX
18
+ int getMACOSXVersionMinRequired (void );
19
+ #endif
20
+
21
+ #endif /* AmplifyAvailability_h */
Original file line number Diff line number Diff line change
1
+ module AmplifyAvailability {
2
+ header "include/AmplifyAvailability.h"
3
+ export *
4
+ }
Original file line number Diff line number Diff line change @@ -179,6 +179,7 @@ let authTargets: [Target] = [
179
179
name: " AWSCognitoAuthPlugin " ,
180
180
dependencies: [
181
181
. target( name: " Amplify " ) ,
182
+ . target( name: " AmplifyAvailability " ) ,
182
183
. target( name: " AmplifySRP " ) ,
183
184
. target( name: " AWSPluginsCore " ) ,
184
185
. target( name: " InternalAmplifyCredentials " ) ,
@@ -191,6 +192,11 @@ let authTargets: [Target] = [
191
192
. copy( " Resources/PrivacyInfo.xcprivacy " )
192
193
]
193
194
) ,
195
+ . target(
196
+ name: " AmplifyAvailability " ,
197
+ path: " AmplifyPlugins/Auth/Sources/AmplifyAvailability " ,
198
+ publicHeadersPath: " include "
199
+ ) ,
194
200
. target(
195
201
name: " libtommathAmplify " ,
196
202
path: " AmplifyPlugins/Auth/Sources/libtommath " ,
You can’t perform that action at this time.
0 commit comments