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
Superando barreiras no desenvolvimento iOS
Search
Marcelo
May 11, 2013
Programming
2
11k
Superando barreiras no desenvolvimento iOS
Palestra apresentada no DevCamp 2013.
Marcelo
May 11, 2013
Tweet
Share
More Decks by Marcelo
See All by Marcelo
Geração de Código - 👍 ou 👎?
marcelofabri
0
140
Desenvolvendo um plugin para o Xcode
marcelofabri
0
170
Desenvolvimento iOS em projetos reais - QCon Rio 2014
marcelofabri
4
440
Objective-Chaos (A Grande Mudança de 2014™)
marcelofabri
1
190
Além do Flat Design: O que mudou no iOS 7
marcelofabri
1
420
E se eu tivesse um DeLorean? - TDC 2012
marcelofabri
0
94
Jogos para iOS usando cocos2d
marcelofabri
0
65
Other Decks in Programming
See All in Programming
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
120
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
340
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
10
1.8k
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
180
定理証明プラットフォーム lapisla.net
abap34
1
1.7k
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
770
Pulsar2 を雰囲気で使ってみよう
anoken
0
230
WebDriver BiDiとは何なのか
yotahada3
1
140
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
さいきょうのレイヤードアーキテクチャについて考えてみた
yahiru
3
730
Honoとフロントエンドの 型安全性について
yodaka
4
250
sappoRo.R #12 初心者セッション
kosugitti
0
230
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
20
2.4k
BBQ
matthewcrist
86
9.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
400
A better future with KSS
kneath
238
17k
The Language of Interfaces
destraynor
156
24k
KATA
mclloyd
29
14k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Thoughts on Productivity
jonyablonski
69
4.5k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Writing Fast Ruby
sferik
628
61k
Transcript
Superando Barreiras no Desenvolvimento iOS
•Apresentação •Motivação •Pré-requisitos •Linguagem •IDE •Dependências •DEMO •Últimos detalhes Agenda
Eu sou o Marcelo! marcelofabri.com @marcelofabri_
[email protected]
Quem?!
Quem?
Sobre o que é essa palestra?
Sobre o que NÃO é essa palestra?
None
None
None
Mas sério, sobre o que é essa palestra?
Fácil. Barreiras.
None
Chega de nhenhenhe.
Primeira barreira
Xcode só roda no Mac OSX
Beleza. Arranjei um Mac. E agora? #comofas
Objective-C
Objective-C + (void)sendAsynchronousRequest:(NSURLRequest *)request queue:(NSOperationQueue*) queue completionHandler:(void (^)(NSURLResponse*, NSData*, NSError*))
handler [NSURLConnection sendAsynchronousRequest:req queue:queue completionHandler:^(NSURLResponse *resp, NSData *data, NSError *err) { NSLog(@"%@", [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]); }];
Acha isso ruim? Vamos ver algumas melhorias
home.view.frame = self.view.frame; [[home view] setFrame:[[self view] frame]]; Para acessar
propriedades, usa-se dot notation. Métodos são chamados com colchetes. Dot Notation
NSDictionary *palestrante = [NSDictionary dictionaryWithObjectsAndKeys:@"Marcelo", @"nome", @"Palmeiras", @"time", nil]; NSString
*nome = [palestrante objectForKey:@"nome"]; NSArray *numeros = [NSArray arrayWithObjects:[NSNumber numberWithInt:1], [NSNumber numberWithInt:2], nil]; NSNumber *um = [numeros objectAtIndex:0]; NSDictionary *palestrante = @{@"nome": @"Marcelo", @"time": @"Palmeiras"}; NSString *nome = palestrante[@"nome"]; NSArray *numeros = @[@1, @2]; NSNumber *um = numeros[0]; Literals http://clang.llvm.org/docs/ObjectiveCLiterals.html
None
Mas e o gerenciamento de memória? Me falaram que não
tem Garbage Collector.
Não tem mesmo. É usado contagem de referências. http://en.wikipedia.org/wiki/Reference_counting
Vou ter que controlar isso na mão?
NÃO!
ARC http://clang.llvm.org/docs/AutomaticReferenceCounting.html
None
There’s a twist!
ARC não é magia •“Objetos” do CoreFoundation (C) devem ser
controlados na mão •Retain cycles
Xcode
Xcode •Ruim, mas já foi pior! •Modinha nova: plugins ✓ColorSense-for-Xcode
✓KSImageNamed-Xcode http://mneorr.github.io/Alcatraz/
None
Sabe o que seria massa? Se eu pudesse usar alguma
coisa igual o maven.
Existe algo assim! Chama CocoaPods http://www.raywenderlich.com/12139/introduction-to-cocoapods
DEMO https://github.com/marcelofabri/devcamp-demo
“Acabei meu app. Vamos colocar na AppStore e ganhar milhões.”
É importante testar em dispostivos reais.
E o que isso significa?
DOR.
None
None
WHY?
Code Sign
Code Sign TestFlight HockeyApp
Relembrando •Só com Mac OSX •Objective-C •ARC •Xcode •CocoaPods •Code
Sign
E agora?
None
Links •https://developer.apple.com/ •http://www.raywenderlich.com/ •https://github.com/github/objective-c-conventions •http://informalprotocol.com/2012/10/declaring-blocks-in-objective-c/ •http://iosdevweekly.com/ •http://nshipster.com/ •http://amattn.com/2011/12/07/arc_best_practices.html •http://dannysu.com/2012/07/30/automatic-reference-counting-on-ios/ •http://www.mikeash.com/pyblog/friday-qa-2011-09-30-automatic-reference-
counting.html •http://conradstoll.com/blog/2013/1/19/blocks-operations-and-retain-cycles.html •https://speakerdeck.com/marcelofabri/e-se-eu-tivesse-um-delorean-tdc-2012 •http://www.raywenderlich.com/21987/top-10-most-useful-ios-libraries-to-know-and- love •http://www.raywenderlich.com/31166/25-ios-app-performance-tips-tricks
None
One more thing...
None
Obrigado! marcelofabri.com @marcelofabri_
[email protected]