Skip to content

Commit

Permalink
fix: restore ifdefs for iOS 17
Browse files Browse the repository at this point in the history
  • Loading branch information
krozniata committed Feb 1, 2024
1 parent 9354d76 commit 0dc0220
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ - (void)setTextContentType:(NSString *)type
@"shipmentTrackingNumber" : UITextContentTypeShipmentTrackingNumber,
}];
}


#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000 /* __IPHONE_17_0 */
if (@available(iOS 17.0, *)) {
[mutableContentTypeMap addEntriesFromDictionary:@{
@"creditCardExpiration" : UITextContentTypeCreditCardExpiration,
Expand All @@ -320,7 +321,7 @@ - (void)setTextContentType:(NSString *)type
@"birthdateYear" : UITextContentTypeBirthdateYear,
}];
}
#endif

contentTypeMap = mutableContentTypeMap;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ UITextContentType RCTUITextContentTypeFromString(const std::string &contentType)
}];
}

#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000 /* __IPHONE_17_0 */
if (@available(iOS 17.0, *)) {
[mutableContentTypeMap addEntriesFromDictionary:@{
@"creditCardExpiration" : UITextContentTypeCreditCardExpiration,
Expand All @@ -239,6 +240,7 @@ UITextContentType RCTUITextContentTypeFromString(const std::string &contentType)
@"birthdateYear" : UITextContentTypeBirthdateYear,
}];
}
#endif

contentTypeMap = mutableContentTypeMap;
});
Expand Down

0 comments on commit 0dc0220

Please sign in to comment.