Skip to content

Cocoapods support #769

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

Merged
merged 3 commits into from
Aug 21, 2015
Merged

Cocoapods support #769

merged 3 commits into from
Aug 21, 2015

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Aug 11, 2015

No description provided.

@Fatme Fatme added this to the 1.3.0 milestone Aug 11, 2015
@ns-bot
Copy link

ns-bot commented Aug 11, 2015

try {
this.$childProcess.exec("pod install", { cwd: this.platformData.projectRoot }).wait();
} catch(e) {
this.$errors.failWithoutHelp("CocoaPods are not installed. Run `sudo gem install cocoapods` and try again.");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we display the error as well? For example CocoaPods might be installed but the command pod install to fail for some reason?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check must also be introduced in doctor command.

@ligaz
Copy link

ligaz commented Aug 11, 2015

Consider adding checks for CocoaPods in the doctor command.

let pluginPodFilePath = path.join(pluginPlatformsFolderPath, "Podfile");
if(this.$fs.exists(pluginPodFilePath).wait()) {
let pluginPodFileContent = this.$fs.readText(pluginPodFilePath).wait();
this.$fs.appendFile(this.projectPodFilePath, pluginPodFileContent).wait();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a comment in the general pod file mentioning that the code is from this given file.

@ligaz
Copy link

ligaz commented Aug 11, 2015

Adding some unit tests for this functionality will be great. 👮

@ns-bot
Copy link

ns-bot commented Aug 14, 2015

@@ -10,7 +10,7 @@
},
"main": "./lib/nativescript-cli.js",
"scripts": {
"test": "node_modules\\.bin\\_mocha --ui mocha-fibers --recursive --reporter spec --require test/test-bootstrap.js --timeout 60000 test/ lib/common/test/unit-tests",
"test": "node_modules\\.bin\\_mocha --ui mocha-fibers --recursive --reporter spec --require test/test-bootstrap.js --timeout 60000 test/ios-project-service",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this change is leftover from debugging - but it currently breaks our test suite.

@ns-bot
Copy link

ns-bot commented Aug 17, 2015

try {
this.$childProcess.exec("gem which cocoapods").wait();
} catch(e) {
this.$errors.failWithoutHelp("CocoaPods are not installed. Run `sudo gem install cocoapods` and try again.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message on my machine is ERROR: Can't find ruby library file or shared library cocoapods. We must find another way to check for existence. Checking the exit code looks promising.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed the issue in person and we decided that the code is correct.

@ns-bot
Copy link

ns-bot commented Aug 21, 2015

@ns-bot
Copy link

ns-bot commented Aug 21, 2015

@ns-bot
Copy link

ns-bot commented Aug 21, 2015

@teobugslayer
Copy link
Contributor

Lets merge this, 👍 !

@ns-bot
Copy link

ns-bot commented Aug 21, 2015

@ns-bot
Copy link

ns-bot commented Aug 21, 2015

Fatme pushed a commit that referenced this pull request Aug 21, 2015
@Fatme Fatme merged commit 283bc8d into master Aug 21, 2015
@Fatme Fatme deleted the fatme/cocoapods branch August 21, 2015 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants