We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to change the icon, Expo SDK 49, custom expo-dev-client.
My expo.plugins in app.json:
"plugins": [ "expo-apple-authentication", "@react-native-firebase/app", "@react-native-firebase/auth", [ "expo-build-properties", { "ios": { "useFrameworks": "static" } } ], "expo-localization", "expo-dynamic-app-icon", [ "expo-dynamic-app-icon", { "gorg": { "image": "./assets/gorg-icon.png", "prerendered": true }, "little-gorg": { "image": "./assets/little-gorg.png", "prerendered": true } } ] ]
import { TouchableOpacity, View, Image } from "react-native"; import * as Haptics from "expo-haptics"; import { getAppIcon, setAppIcon } from "expo-dynamic-app-icon"; import { useTheme } from "@react-navigation/native"; const IconSwitcher = ({ icon, onPress }) => { const activeIcon = getAppIcon(); console.log("activeIcon", activeIcon) const isActive = activeIcon === icon.name; const theme = useTheme(); return ( <View style={{ borderWidth: isActive ? 2 : 0, padding: 5, alignItems: "center", justifyContent: "center", }} > <TouchableOpacity onPress={() => { Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Heavy); console.log("icon.name", icon.name) const result = setAppIcon(icon.name); console.log('result', result) //returns "gorg" or "little-gorg" respectively onPress(); }} > <Image source={icon.image} style={{ height: 75, aspectRatio: 1, borderRadius: 20 }} /> </TouchableOpacity> </View> ); }; export default IconSwitcher;
Even if I get the returned icon name when calling setAppIcon (as if it succeeded), it does not update the app icon, even if I reload the app.
When I run, I get "DEFAULT". It seems like it isn't changing it at all. I have double-checked that the images are at the correct path.
const activeIcon = getAppIcon(); console.log("activeIcon", activeIcon) // returns "DEFAULT"
The text was updated successfully, but these errors were encountered:
Did you rebuild the app? It needs to be built again for the changes in app.json to take affect.
app.json
Sorry, something went wrong.
No branches or pull requests
I'm trying to change the icon, Expo SDK 49, custom expo-dev-client.
My expo.plugins in app.json:
Even if I get the returned icon name when calling setAppIcon (as if it succeeded), it does not update the app icon, even if I reload the app.
When I run, I get "DEFAULT". It seems like it isn't changing it at all. I have double-checked that the images are at the correct path.
The text was updated successfully, but these errors were encountered: