pvinis / rn-diff-purge

Easier React Native upgrades by clearly exposing changes from a version to another. :rocket: And what better way than to purge, init, then diff? Spoiler: there's no better way. 😎
https://pvinis.github.io/purge-web/
MIT License
308 stars 5 forks source link

Failed to build on react-native run-ios but success using XCode #23

Closed isaaclem closed 5 years ago

isaaclem commented 5 years ago

I'm trying to upgrade my package from 0.57.5 to 0.57.8

Steps I've taken: 1) Visit https://github.com/pvinis/rn-diff-purge/compare/version/0.57.5..version/0.57.8 2) Manually change the content of package.json and AppDelegate.m 3) Execute command yarn cache clean && yarn install && react-native run-ios

Installing build/Build/Products/Debug-iphonesimulator/myapp.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/myapp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/myapp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

    at checkExecSyncError (child_process.js:637:11)
    at Object.execFileSync (child_process.js:655:13)
    at Promise.then (/Users/lemchiewchoon/Code/Detrack/myapp/node_modules/react-native/local-cli/runIOS/runIOS.js:208:5)
    at processTicksAndRejections (internal/process/next_tick.js:81:5)

No matter how I clear the watchman and reinstall node modules, it simply wont work. And I head over to XCode and run from there, it's working fine. May I know if anyone facing the same issue?

pvinis commented 5 years ago

I am not sure I can help with just this error, but the first easy suggestion is to try and "bisect" it, by upgrading one version at a time. This way you can see which version is giving you the error, and maybe we can debug it more easily with that information.

isaaclem commented 5 years ago

Eventually I've resolved it following this https://stackoverflow.com/a/41854111/9816472. Not really sure about the impact but it does fixed the above mentioned error. Thanks @pvinis, this tool is so useful and saved many of us from nightmare!