Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ruby for iOS developer
Search
Jun Lin
March 14, 2014
Programming
0
980
Ruby for iOS developer
A brief introduction to Ruby for iOS developer. S01 E01
Jun Lin
March 14, 2014
Tweet
Share
More Decks by Jun Lin
See All by Jun Lin
A brief introduction to GenStage
linjunpop
1
41
Microservices
linjunpop
0
53
Actor Model
linjunpop
0
20
A brief introduction to GitHub
linjunpop
1
60
Test Driven Development
linjunpop
0
41
Ruby 2.0
linjunpop
1
160
Other Decks in Programming
See All in Programming
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
360
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
26
8.2k
SIMD Parallel Programming with the Vector API
josepaumard
0
140
新宿ダンジョンを可視化してみた
satoshi7190
2
240
データアナリストが行うDatabricksを活用したETLの自動化事例
shinoa
0
260
見た目から始める生産性向上
ikumatadokoro
7
830
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
170
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
730
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
380
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.3k
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
43
19k
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
4k
Featured
See All Featured
Building Your Own Lightsaber
phodgson
99
5.7k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
Building an army of robots
kneath
300
41k
Bash Introduction
62gerente
604
210k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
244
20k
Fantastic passwords and where to find them - at NoRuKo
philnash
37
2.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
260
12k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Rebuilding a faster, lazier Slack
samanthasiow
73
8.2k
Art, The Web, and Tiny UX
lynnandtonic
289
19k
It's Worth the Effort
3n
180
27k
How to Ace a Technical Interview
jacobian
272
22k
Transcript
Ruby For iOS developer S01 E01
Concept • Ruby • Version manager(s) • Ruby versions •
Gem • Bundler • CocoaPods
Ruby
A programming language
$ ruby
System Ruby /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Why not use system ruby • Gem dependencies hell •
Outdated
$ sudo gem install NEVER
Version manager(s)
• (RVM) http://rvm.io • (rbenv) https://github.com/sstephenson/rbenv • (chruby) https://github.com/postmodern/chruby
RVM Powerful. It can install, manager ruby versions $ \curl
-sSL https://get.rvm.io | bash -s stable
rbenv Lightweight, but shims is a little painful $ brew
install rbenv ruby-build
chruby Lightweight as rbenv, no shims RECOMMENDED $ brew install
chruby ruby-install
Ruby versions
CRuby, MRI
• ruby-1.8 • ruby-1.9.3-p448 • ruby-2.0.0-p247 • ruby-2.0.0-p353 • ruby-2.1.0
• ruby-2.1.1
1.8 is DEAD
1.9 ~ 2.0
A patch breaks API too • ruby-1.9.3-p327 • ruby-1.9.3-p448
Since 2.1.0
Semantic Versioning https://www.ruby-lang.org/en/news/2013/12/21/semantic-versioning-after-2-1-0/ Finally
.ruby-version
• 2.0.0 • 2.0.0-p353 • 2.1.0 • 2.1.1
Gem
Ships with Ruby, manage gems
rubygems.org
None
Bundler
None
$ gem install bundler
Gemfile source 'https://rubygems.org' gem ‘nokogiri' gem 'rails', github: 'rails/rails' group
:test do gem 'rspec', require: ‘spec' end
$ bundle install
CocoaPods
A Ruby gem $ gem install cocoapods
Podfile similar to Gemfile
Podfile platform :ios, '6.0' ! xcodeproj `MyProject` ! pod 'ObjectiveSugar',
'~> 0.5’ ! target :test do pod 'OCMock', '~> 2.0.1' end
Q&A
Thanks