-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Cocoapods support #769
Conversation
✅ |
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."); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Consider adding checks for CocoaPods in the |
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(); |
There was a problem hiding this comment.
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.
Adding some unit tests for this functionality will be great. 👮 |
✅ |
@@ -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", |
There was a problem hiding this comment.
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.
✅ |
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."); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
✅ |
✅ |
✅ |
Lets merge this, 👍 ! |
❌ |
✅ |
No description provided.