Crashes in production only - iOS
Opened this issue · 0 comments
arlindiDev commented
Works in the Expo Go simulator for iOS. But crashes in production.
On iOS, it crashes when you try to open the dropdown.
I am building with eas build
To Reproduce
- Use the basic setup guide to setup.
- Open the component in a production version of the application.
Additional details
- Device: iOS - Tested multiple devices with same issue.
- OS: iOS 17.1.1
- react-native-picker-select version: 2.12.0
- react-native version: 0.73.6
- expo sdk version: 50.0.17
Code
const renderItem = (item, selected) => {
return (
<View style={ styles.itemBackground}>
<View style={styles.item}>
{/* <CountryFlag isoCode={item.value} size={12} /> */}
<Text style={styles.textItem}>{item.label}</Text>
</View>
</View>
);
};
const [country, setCountry] = useState("");
const [items] = useState([
{ label: "United States", value: "us", index: 0 },
{ label: "Canada", value: "ca", index: 1 },
{ label: "United Kingdom", value: "gb", index: 9999 },
// Add more countries as needed
]);
<Dropdown
style={[appStyle.dropdown]}
placeholderStyle={styles.placeholderStyle}
selectedTextStyle={styles.selectedTextStyle}
selectedStyle={styles.selectedStyle}
containerStyle={styles.containerStyle}
itemContainerStyle={styles.itemContainerStyle}
activeColor={"#000000"}
data={items}
maxHeight={300}
labelField="label"
valueField="value"
placeholder={"Country"}
value={country}
onChange={(item) => {
countryChange(item.value);
}}
renderItem={renderItem}
renderRightIcon={() => (
<Icon
style={styles.iconStyle}
name={"chevron-down"}
size={20}
color={country != "" ? "#000000" : "#6D6F78"}
/>
)}
/>