Apple provides a official development tool called Xcode. It's completely free of charge, let's get it.
Xcode
.Please wait...
Following installation, let's create a first project. It's the simplest app commonly called "Hello, world!".
Build and then run the current scheme
button on left top.You can see the app with white screen.
If simulator window is too large, select scale. (Window -> Scale -> 75%, 50%...)
When we create a full-scale application, we must take the help of 3rd party libraries. CocoaPods and Carthage is famous tool to manage dependencies with libraries. I recommend CocoaPods for beginners.
It's written by Ruby. So we'll install CocoaPods with Ruby.
First, launch Terminal: Applications -> Utilities -> Terminal * Recommend: Keep in Dock
$ ruby -v
ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]
$ which ruby
/usr/bin/ruby
Ruby is installed on your mac by default, but it's too old. So we'll update it to latest version with rbenv.
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
Restart Terminal.
$ rbenv install 2.2.3
$ rbenv global 2.2.3
$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15]
$ which ruby
/Users/tnantoka/.rbenv/shims/ruby
We only need to run one command.
$ gem install cocoapods
$ pod --version
0.39.0
That's all. Now, you've got a development environment for your first iPhone app!