1

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

Alexnnd
  • 429
  • 4
  • 13
  • Your first issue is a duplicate of: https://stackoverflow.com/questions/24871532/xcode-ios-8-keyboard-types-not-supported – jnpdx Apr 24 '22 at 22:06
  • In terms of your second one, is it just the console warning you're getting that worries you or is there actually something on the screen that looks wrong? – jnpdx Apr 24 '22 at 22:06
  • Thanks for the reply. Actually, it's not really a duplicate because I get this error on a physical device. Also, even if I toggle the "Connect Hardware Keyboard" I still have an error on both: the simulator and the physical device. For the second one, the console is warning me as well but everything seems fine: in the textfield and in the view that use the input. – Alexnnd Apr 25 '22 at 16:23
  • These are not what I would define as an "error" -- if your functionality is working, there is often quite a bit that you can ignore in the console (it has gotten much worse/noisier over the years). Both of these seem ignorable. – jnpdx Apr 25 '22 at 16:24
  • Alright, thank you! I'm about to submit this app so I'll know if it was serious or not very soon. Haha! – Alexnnd Apr 25 '22 at 16:28

0 Answers0