Skip to content
New issue

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

Make it optional to skip 'Pods.xcodeproj'? #55

Open
markusekblad opened this issue Feb 1, 2019 · 1 comment
Open

Make it optional to skip 'Pods.xcodeproj'? #55

markusekblad opened this issue Feb 1, 2019 · 1 comment

Comments

@markusekblad
Copy link

I'm wondering about this part in the utilities.js

if (filePath.endsWith(path.join('Pods.xcodeproj', 'project.pbxproj'))) {
  // The Pods.xcodeproj file isn't currently able to be parsed
  // by node-xcode:
  // https://github.com/alunny/node-xcode/issues/127
  //
  // We don't actually need to manipulate it so we'll go ahead and ignore.
  return;
 }

In my project I have a dependency on https://github.com/tlenclos/react-native-audio-streaming which has a Pods.xcodeproj which also needs to have my staging configurations copied.

If I remove the section above from utilities.js everything works for me, so I'm wondering if perhaps there could be an option when running the script whether to run this check or not, or if it is even needed any more?

Steps to reproduce the behavior

Expected behavior

Actual behavior

@thekevinbrown
Copy link
Owner

When I built the library, the xcode package would throw an exception while trying to parse that particular pbxproj file. It doesn't hurt to have the script run through all of your project files, I just didn't want to swallow errors about not being able to parse entire files and pretend it worked, so this was the best workaround for then. If the latest versions of the package don't do that, then there's no reason to skip that file at all that I can see.

So all that'd be needed in a PR is:

  1. Upgrade the dependency in package json + yarn.lock to ensure we get the latest version when people install.
  2. Remove the section of code you've quoted above.

I'd be happy to merge that PR.

I'd probably release it as a major version number (breaking change) just in case someone's pods file is more complex than the one you've got, then they won't magically have their workflow broken without their realising why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants