Thursday, November 6, 2014

[iOS]Cocoapods: manage library dependencies for your Xcode projects

CocoaPods manages library dependencies for your Xcode projects

1. $ sudo gem install cocoapods
It requires your ruby is >= v1.9.x, if it isn't, you need to upgrade as the following steps:
 1.1. Suggest to install rvm (Ruby Version Manager) with the following command line:
$ curl -L https://get.rvm.io | bash -s stable --ruby
1.2. Check available version
$ rvm list known
1.3. Select one to install
$ rvm install ruby-2.1.1

2. $ sudo gem install cocoapods again if update needed.

3. Go to you project directory to do the following command
 I suppose there's been a Podfile there:
$ pod intall
it will automatically generate the *.xworkspace project and Pods project for your project.

Reference URL: http://guides.cocoapods.org/using/getting-started.html

Monday, November 3, 2014

[Android] Add gradle environment constant

Add gradle environment constant: 1. Create ~/.gradle/gradle.properties 2. Add content like: env=stage Add environment constant for running time: $ gradle assembleDebug -Penv=stage Use in gradle file 1. $buildEnv 2. project.ext['buildEnv']