I'm currently trying to discover, quite weirdly, most of the errors that a user could get with a SwiftUI View containing some textfields, and it's a success! But I don't know how to handle them.
1 - The decimalPad keyboard:
TextField("", value: $carNumber, format: .number)
.keyboardType(.decimalPad)
Each time this textfield is focused, I get this error below:
// Can't find keyplane that supports type 8 for keyboard iPhone-PortraitChoco-DecimalPad; using 27100_PortraitChoco_iPhone-Simple-Pad_Default
On Internet, everybody seems to say that's not a problem to submit an application to the App Store Connect with this one. Is it true?
2 - The emoji situation:
TextField("", text: $carName)
.onReceive(Just(carName)) { countCarName in
if countCarName.count > 12 {
carName.removeLast()
}
}
If you add an alphabet character, a regular string or an emoji from the suggestion bar everything is fine. But if you're looking for a specific emoji from the emoji keyboard it's a total mess, like this below:
// The behavior of the UICollectionViewFlowLayout is not defined because:
// the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
// The relevant UICollectionViewFlowLayout instance is <_InvertibleFlowLayout: 0x14842b6c0>, and it is attached to <UICollectionView: 0x144180000; frame = (0 0; 155 2); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x281a96520>; layer = <CALayer: 0x281504aa0>; contentOffset: {0, 0}; contentSize: {16, 2}; adjustedContentInset: {0, 0, 0, 0}; layout: <_InvertibleFlowLayout: 0x14842b6c0>; dataSource: <__UIDiffableDataSource 0x282ab1c20: sectionCounts=[_UIDataSourceSnapshotter - 0x281569c00:(0:34)]; sections=[0x281569920]; identifiers=[0x281569560]>>.
// Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
Do you have an idea on how to handle this one? :D