junedomingo / react-native-rename

Rename react-native app with just one command
MIT License
2.63k stars 261 forks source link

fix: ios project path selector changed #224

Closed dopplerDistortion closed 1 year ago

dopplerDistortion commented 1 year ago

Info.plist selection have a problem of selecting wrong folder if you try to change an app name that has third party extension with Info.plist file.

For example if react-native-onesignal installed in your app. It requires you to create an extension that named OneSignalNotificationServiceExtension and if your app name initial is something after letter O in alphabetical order, lets call it RnDiffApp, following selector in utils.js returns the OneSignalNotificationServiceExtension path.

const iosInfoPlistFullPath = globbySync(normalizePath(path.join(APP_PATH, iosPlist)))[0];

Expected result should be RnDiffApp path. So remaining scripts will change CFBundleDisplayName in RnDiffApp/Info.plist.

junedomingo commented 1 year ago

@dopplerDistortion Thank you for this!🙏