Appium inspector, no testId's on element

I have added a test id to my button:

  return (
    <TouchableOpacity onPress={onPress} {...TestIdHelper(testID)}>
      <View style={[styles.iconButton, buttonStyles]}>
        <View style={styles.mainContentContainer}>
          {icon && icon}
          <Text style={[styles.iconButtonText, textStyles]}>{text}</Text>
        {!!subText && <Text style={styles.iconButtonSubText}>{subText}</Text>}

When I try and inspect the element in Appium Inspector, I see nested elements with the name as the content, and no testId’s. How can I add testId’s?

Here is a screenshot of my inspector:

the default name for some elements is theirs text value. to change it you need to alter the iOS mobile app code.
You need to find the part in the code where those elements are being created and assign a value to theirs accessibilityIdentifier attribute - this will appear in the name field when using appium inspector.

Note that in order to create a good automation code you must have the right “support” from the mobile end. Meaning, you need to be able to adjust the mobile code(mainly ids) to fir and support your automation. You can do it yourself or ask you developers.