mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add support for new iOS text content type cellular EID and cellular IMEI (#46378)
Summary: Support for new iOS text content type to autofill cellular EID or cellular IMEI: - https://developer.apple.com/documentation/uikit/uitextcontenttypecellulareid?language=objc - https://developer.apple.com/documentation/uikit/uitextcontenttypecellularimei?language=objc ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [ADDED] - new text content type cellular EID and cellular IMEI Pull Request resolved: https://github.com/facebook/react-native/pull/46378 Test Plan: JavaScript Tests - yarn test [PASSED] - No errors related with the changes Flow - yarn flow && yarn lint [PASSED] - No errors related with the changes iOS Tests - ./scripts/objc-test.sh test [PASSED] - No errors related with the changes Build RNTester [PASSED] - No errors related with the changes - Proof: <img width="838" alt="Screenshot 2024-09-07 at 12 06 48" src="https://github.com/user-attachments/assets/836a71f2-8adb-428f-b98d-8b84f71e93d6"> <img width="806" alt="Screenshot 2024-09-07 at 12 07 29" src="https://github.com/user-attachments/assets/7b33b919-3b29-4846-b6a2-3427dbbc2869"> <img width="1221" alt="Screenshot 2024-09-07 at 12 13 02" src="https://github.com/user-attachments/assets/58b369e9-5281-4a6b-9663-1cbd77439510">  Note: Since the test was done using an iOS simulator the autofill suggestion won't appear for the cellularEID or cellularIMEI Reviewed By: cortinico Differential Revision: D62386126 Pulled By: cipolleschi fbshipit-source-id: 50da572650b796d0426a15f0c06fd0c52a8247f5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1ac3b890d8
commit
14e0d0dffb
@@ -323,6 +323,15 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
|
||||
@"birthdateYear" : UITextContentTypeBirthdateYear,
|
||||
}];
|
||||
}
|
||||
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 170400 /* __IPHONE_17_4 */
|
||||
if (@available(iOS 17.4, *)) {
|
||||
[mutableContentTypeMap addEntriesFromDictionary:@{
|
||||
@"cellularEID" : UITextContentTypeCellularEID,
|
||||
@"cellularIMEI" : UITextContentTypeCellularIMEI,
|
||||
}];
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
contentTypeMap = mutableContentTypeMap;
|
||||
|
||||
+9
@@ -240,6 +240,15 @@ UITextContentType RCTUITextContentTypeFromString(const std::string &contentType)
|
||||
@"birthdateYear" : UITextContentTypeBirthdateYear,
|
||||
}];
|
||||
}
|
||||
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 170400 /* __IPHONE_17_4 */
|
||||
if (@available(iOS 17.4, *)) {
|
||||
[mutableContentTypeMap addEntriesFromDictionary:@{
|
||||
@"cellularEID" : UITextContentTypeCellularEID,
|
||||
@"cellularIMEI" : UITextContentTypeCellularIMEI,
|
||||
}];
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
contentTypeMap = mutableContentTypeMap;
|
||||
|
||||
Reference in New Issue
Block a user