Crayon Bits Blog

User Experience, Frontend, Code and Life

Nativescript Part 1 - Setting up on Mac

mobile nativescript code

Following the instructions at the nativescript quick setup, first step is to install nativescript

> npm install -g nativescript

Ugh, I got the following warning:

WARNING: xcodeproj gem is not installed or is not configured properly.

WARNING: CocoaPods is not installed or is not configured properly.

so I installed cocoapods first

> sudo gem install cocoapods

and then uninstall and reinstalled nativescript. Installed fine. Let’s verify installation.

> tns
#NativeScript

┌─────────┬────────────────────────────────────────────────────────────────┐
│ Usage   │ Synopsis                                                       │
│ General │ $ tns <Command> [Command Parameters] [--command <Options>]     │
│ Alias   │ $ nativescript <Command> [Command Parameters] [--command       │
│         │ <Options>]                                                     │
└─────────┴────────────────────────────────────────────────────────────────┘

Looks good. Now they want me to install iOS and Android requirements

> ruby -e "$(curl -fsSL https://www.nativescript.org/setup/mac)"

This seems to be installing quite a lot of stuff. Going through iOS stuff first. I’m just letting it run for now. (I hope I have enough space on the machine).

It asked me to let it install google chrome. I already have it, so I skipped it. Let’s hope that doesn’t cause a problem.

Now installing Java SE Dev Kit 8. Worked. Now installing android SDK. Got some warnings:

WARNING: There seem to be some problems with the Android configuration

Warning: Failed to find package system-images;android-25;default;x86

WARNING: There seem to be some problems with the Android configuration

don’t know what this means. Let’s check if everything was okay.

> tns doctor
WARNING: Xcode is not installed or is not configured properly.

so still getting that warning… Let’s check what xcode says for the location of command line tools. Ah there’s the issue.

Preferences > Locations > Commandline Tools is blank. Set it to the correct version

Run tns doctor again.

Boom! ‘No issues were detected’