Nativescript-cli: Unclear message when running a project and CocoaPod is not installed

Created on 4 Dec 2015  路  5Comments  路  Source: NativeScript/nativescript-cli

When I tried to run a project which contained a CocoaPod it failed with a message from which it was not clear that I didn't have CocoaPod installed. Maybe the message should guide you that you have to install them.

nchakaromac:locationtest nchakaro$ tns doctor
WARNING: CocoaPod is not installed or is not configured properly.
You will not be able to build your projects for iOS if they contain plugin with CocoaPod file.
To be able to build such projects, verify that you have installed CocoaPod.
These warnings are just used to help the NativeScript maintainers with debugging if you file an issue.
Please ignore them if everything you use NativeScript for is working fine.

nchakaromac:locationtest nchakaro$ tns prepare ios
Successfully prepared plugin nativescript-geolocation for ios.
The iOS Deployment Target is now 8.0 in order to support Cocoa Touch Frameworks in CocoaPods.
Successfully prepared plugin nativescript-googlemaps for ios.
Creating project scheme...
Processing node_modules failed. Error: Command failed: /bin/sh -c ruby -e "require 'xcodeproj'; xcproj = Xcodeproj::Project.open('locationtest.xcodeproj'); xcproj.recreate_user_schemes; xcproj.save"
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- xcodeproj (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from -e:1:in `<main>'
bug

Most helpful comment

sudo gem install cocoapods is clean enough.

All 5 comments

I wasn't able to reproduce this issue. I've added nativescript-geolocation and nativescript-googlemaps plugins and got the followings:

tns doctor
WARNING: CocoaPods is not installed or is not configured properly.
tns prepare ios
Processing node_modules failed. Exception: CocoaPods or ruby gem 'xcodeproj' is not installed. Run `sudo gem install cocoapods` and try again.

sudo gem install cocoapods is clean enough.

@dtopuzov but I still got the warning WARNING: CocoaPods is not installed or is not configured properly.

Hi @tolerious

Sorry for the late response, this happens when pods are not setup.
After install you should run pod setup command.

Added to docs with this PR: https://github.com/NativeScript/docs/pull/1181

@dtopuzov thank you~

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jerbob92 picture jerbob92  路  3Comments

bradmartin picture bradmartin  路  3Comments

PeterStaev picture PeterStaev  路  3Comments

erjdriver picture erjdriver  路  3Comments

leevigraham picture leevigraham  路  3Comments