Introduction to iOS Development
 Offline Class Jasakomer (Special iOS), April 15, 2012




                                         Andri Yadi
                     President, ID-ObjC | CEO, DyCode
                  @andri_yadi | a (at) dycode (dot) com
                                    http://andriyadi.me
about me
ID-ObjectiveC
President

The first & largest iOS & OSX
developer community in Indonesia
4 years in a row
2011 - now
start a company & code for food
9 years in mobile development
a movie freak
iOS Devices
Start developing iOS apps Today!




                                   21
http://developer.apple.com/ios
Xcode   iOS Simulator   iOS Developer Library
Required Stuffs
Latest iOS SDK
Installing Tools




                   27
Optional Stuffs
Actual iOS devices
For debugging to device & deployment to AppStore
Some development stuffs
Objective-C
C + OOP ≠ C++
A superset of C:                          Objective-C Advantages:
•   Syntactical convention for defining   •   Dynamic typing:
    classes & method                          enables to determine the class of an object
•   Syntax for method invocation              at runtime
•   Syntax for declaring & synthesizing   •   Dynamic binding:
    properties                                allows to determine the method to call at
•   Static & dynamic typing                   runtime instead of at compile-time
•   Blocks                                •   Dynamic loading:
•   Extension: protocol & categories          allows to add modules of code & other
                                              resources at runtime.
Classes & Objects
Methods & Messaging




   [aMutableArray insertObject:anObject atIndex:0];

[[self aMutableArray] insertObject:anObject atIndex:0];

 [self.aMutableArray insertObject:anObject atIndex:0];
Blocks




int result = myBlock(4);
Protocols & Categories
Protocol == Interface in other OOP language (Java, C#)
@interface NowPlayingController :
UIViewController<UIScrollViewDelegate, ProfileViewDelegate> {

}
@end

@protocol ProfileViewDelegate
- (void)profileView:(ProfileView *)profileView doSignInWith:
(AuthProviderType)signInType sender:(id)sender;

@optional
- (void)profileView:(ProfileView *)profileView doSignOut:(id)sender;
@end



Category, enables to extend a class without subclassing it
@interface NSDate (Additions)
+ (NSDate *)dateFromTimeString:(NSString*)timeString;
+ (NSDate *)dateWithJSONString:(NSString *)json;

- (NSDate *)dateByAddingDays:(NSInteger)numDays;
- (NSDate *)dateByAddingHours:(NSInteger)numHours;
@end
More details:
http://bit.ly/AF8EiJ
Design Pattern
Model-View-Controller design pattern
NowPlayingController




NowPlaying


                                    NowPlayingView

   Model-View-Controller design pattern
Memory Management




       Reference counting
No garbage collector support (yet)
        Autorelease Pool
iOS frameworks
Enable apps to store user documents
          and key value data
          Push changes to all user’s computers
          and devices




Storage
Easily integrate Tweet Sheet
Access system-wide Twitter account
from within app
Wrap OAuth request & response
Memory management becomes
                      compiler’s job
                      No need to deal with retain & release
                      by yourself
                      Manually enabled in Xcode
                      It’s NOT a garbage collector!

Automatic Reference
  Counting (ARC)
Layout the app’s workflow & design
             user interfaces
             Specify transitions & segues between
             views
             Can be loaded dynamically
Storyboard
Image processing framework finally
            comes to iOS
            Provides built-in filters: color effect,
            distortions, transitions
            Advanced features: red-eye reduction,
            face recognition
CoreImage
Take advantage of the latest hardware
GLKit: new high-level framework
Apple-developed OpenGL ES extensions
Cocoa Touch
Foundation, UIKit, Multi-Touch Gestures
Graphics
Core Graphics, Core Animation, Core Image, Core Text, OpenGL ES
CoreData
Database, Object-Relational Mapping, optimized for mobile - > 1 million objects store
Audio & Video
Media player, Core Audio & OpenAL, iPod library, HTTP Live Streaming
Networking
Bonjour, Peer to peer, WebKit framework, BSD socket
Core Location & MapKit
Multitasking
New kind of multitasking
External display support
AirPrint
Wireless printing to AirPrint-enabled printers. Hack available
Push & Local Notification
Game Center
Social gaming platform
iAd
Integrated advertising platform
In-App Purchase
Payment inside applications
Human Interface Design
GUI Elements
http://www.teehanlax.com/downloads/iOS_5_GUI_iPhone4S.psd.zip
Storyboard
The app will look like these
App Store Submission
Finally, on the App Store
you app can use this badge!
Everything is here: http://developer.apple.com/ios
https://developer.apple.com/library/ios/#referencelibrary/
GettingStarted/RoadMapiOS/Introduction/Introduction.html
Let’s see some code
DYCODE IS HIRING!
If you think you’re
awesome, either mobile
developer guru or still
early learner, send your
awesome CV to:
hrd@dycode.com
iOS Development - Offline Class for Jasakomer

iOS Development - Offline Class for Jasakomer