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 55// SPDX-License-Identifier: Apache-2.0
66//
77
8+ import AmplifyAvailability
89import Foundation
910
1011struct ASFAppInfo : ASFAppInfoBehavior {
@@ -16,9 +17,9 @@ struct ASFAppInfo: ASFAppInfoBehavior {
1617 var targetSDK : String {
1718 var targetSDK : String = " "
1819#if os(iOS) || os(watchOS) || os(tvOS)
19- targetSDK = " \( __IPHONE_OS_VERSION_MIN_REQUIRED ) "
20+ targetSDK = " \( getIOSVersionMinRequired ( ) ) "
2021#elseif os(macOS)
21- targetSDK = " \( __MAC_OS_X_VERSION_MIN_REQUIRED ) "
22+ targetSDK = " \( getMACOSXVersionMinRequired ( ) ) "
2223#else
2324 targetSDK = " Unknown "
2425#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] = [
179179 name: " AWSCognitoAuthPlugin " ,
180180 dependencies: [
181181 . target( name: " Amplify " ) ,
182+ . target( name: " AmplifyAvailability " ) ,
182183 . target( name: " AmplifySRP " ) ,
183184 . target( name: " AWSPluginsCore " ) ,
184185 . target( name: " InternalAmplifyCredentials " ) ,
@@ -191,6 +192,11 @@ let authTargets: [Target] = [
191192 . copy( " Resources/PrivacyInfo.xcprivacy " )
192193 ]
193194 ) ,
195+ . target(
196+ name: " AmplifyAvailability " ,
197+ path: " AmplifyPlugins/Auth/Sources/AmplifyAvailability " ,
198+ publicHeadersPath: " include "
199+ ) ,
194200 . target(
195201 name: " libtommathAmplify " ,
196202 path: " AmplifyPlugins/Auth/Sources/libtommath " ,
You can’t perform that action at this time.
0 commit comments