iOSでアイコンを変更すると即時再起動するように

This commit is contained in:
harukin-expo-dev-env 2025-03-10 15:34:29 +00:00
parent 0838414540
commit c0478bf9ae

View File

@ -9,6 +9,7 @@ import {
Platform,
} from "react-native";
import { useNavigation } from "@react-navigation/native";
import * as Updates from "expo-updates";
import { AS } from "../../storageControl";
import icons from "../../assets/icons/icons";
import { setAlternateAppIcon, getAppIconName } from "expo-alternate-app-icons";
@ -132,6 +133,8 @@ export const LauncherIconSettings = ({ navigate }) => {
"アイコンを変更しました。アプリを再起動します。",
ToastAndroid.SHORT
);
} else if (Platform.OS === "ios") {
Updates.reloadAsync();
}
})
.catch((err) => {