Skip to content

Support brew version of Cocoapods #3276

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

Closed
jaxondu opened this issue Dec 18, 2017 · 1 comment
Closed

Support brew version of Cocoapods #3276

jaxondu opened this issue Dec 18, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@jaxondu
Copy link

jaxondu commented Dec 18, 2017

I'm using the brew version of Cocoapods on macOS instead of Ruby gem version. The brew version also has xcodeproj binary installed in the path. tns CLI however is expecting the gem version of xcodeproj when you run "tns doctor" and "tns run ios". Please support brew version of cocoapods by checking xcodeproj in the path instead of in the gem list.

@rosen-vladimirov rosen-vladimirov added this to the 4.0.0 milestone Jan 11, 2018
@rosen-vladimirov
Copy link
Contributor

Hey @jaxondu ,
Thank you for the information. I confirm there's a problem with current detection. The check for xcodeproj is gem which xcodeproj, instead of just spawning xcodeproj --version.
In order to fix this, the following changes should be applied:

  1. Fix the call from gem which xcodeproj to xcodeproj --version here. We do not need the exact location of the gem, we need it to be installed, so it is a good idea to rename the method and the related properties.
  2. Fix the code in ios-project-service.ts to use the methods from sysInfo when checking if pod install can be called, something like:
const cocoapodVersion = await this.$sysInfo.getCocoapodVersion();
const xcodeProjVersion = await this.$sysInfo.getXCodeProjGemVersion();

if (!(cocoapodVersion || xcodeProjVersion)) {
	this.$errors.failWithoutHelp("CocoaPods or ruby gem 'xcodeproj' is not installed. Run `sudo gem install cocoapods` and try again.");
}

It should be pretty straightforward, so we'll be glad to review PRs in case you want to give it a try.

@Fatme Fatme self-assigned this Feb 14, 2018
Fatme pushed a commit to telerik/mobile-cli-lib that referenced this issue Feb 14, 2018
Fatme added a commit that referenced this issue Feb 14, 2018
Support brew version of Cocoapods
Fixes #3276
Fatme added a commit that referenced this issue Feb 14, 2018
Support brew version of Cocoapods
Fixes #3276
Fatme added a commit that referenced this issue Feb 14, 2018
Support brew version of Cocoapods
Fixes #3276
Fatme added a commit that referenced this issue Feb 14, 2018
Support brew version of Cocoapods
Fixes #3276
@Fatme Fatme reopened this Feb 14, 2018
Fatme pushed a commit to telerik/mobile-cli-lib that referenced this issue Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants