i phone udvikling best brains

Post on 30-Apr-2015

579 Views

Category:

Education

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Slides til Iphone foredraget den 06.09.11

TRANSCRIPT

iPhone Development

onsdag den 7. september 2011

Agenda

• Requirements

• The Objective C Programming Language

•Cocoa Touch & Basic Design Patterns

•Apple Developer Tools

•Apple Developer Portal

• Resources

onsdag den 7. september 2011

Who am I?

onsdag den 7. september 2011

Hvem er jeg?

• Freelance udvikler i Barkode ApS & Bigger

•Objective C, Java, Python

•Udvikler af “Risteriet”, “MitNykredit”iPhone applikationerne

•Arbejder p.t. på en ny universal app for Infopaq International A/S

•Mac fanboy!

onsdag den 7. september 2011

Hvorfor iOS Platformen?

•Nysgerrig efter en ny platform.

• en ny platform

• en ny type device

•Andre problemstillinger end Enterprise Java

• Et “nyt” programmeringssprog og et nyt framework.

•Mac fanboy!

onsdag den 7. september 2011

onsdag den 7. september 2011

Risteriet• Primært tænkt som reklame for et

mindre kafferisteri i det indre København.

• Benyttede frameworks:

• Core Location

• MapKit

• MediaKit

• JSON (eksternt framework)

• Core Animation

onsdag den 7. september 2011

onsdag den 7. september 2011

Mit Nykredit• Nykredits Mobile Bank

• Ekstremt hurtigt udviklet

• Udvalgte benyttede frameworks:

• Core Location / MapKit

• MediaKit

• Core Animation og en del custom UIView’s

• Valuta beregner

• Pinkode husker

• Diverse tabeller

• ...

• Webservices

onsdag den 7. september 2011

Mit Nykredit• Nykredits Mobile Bank

• Ekstremt hurtigt udviklet

• Udvalgte benyttede frameworks:

• Core Location / MapKit

• MediaKit

• Core Animation og en del custom UIView’s

• Valuta beregner

• Pinkode husker

• Diverse tabeller

• ...

• Webservices

onsdag den 7. september 2011

Requirements

onsdag den 7. september 2011

Get a Mac!

• En Mac computer og helst et iOS device

•Medlem af Apples iOS Developer Program - $99

• Installering af SDK og Developer Tools

• “Live by the rules defined by the mothership”

onsdag den 7. september 2011

The Objective C Programming Language

onsdag den 7. september 2011

Objective C• Superset til C og derfor kan man benytte C og C++

• Objekt orienteret (1986) og baseret på message passing ala Smalltalk.

• Udvidet i 2006 med properties, garbage collection og fast enumeration etc.

• Memory Management

• OSX - Garbage Collection.

• iOS - explicit memory management (reference counting) (iOS 3/4).

• “Automatic Reference Counting” (iOS 5)

onsdag den 7. september 2011

Objective C Syntax 1/3@interface classname : superclassname{ // instance variables}

@property (nonatomic, retain) inst_type inst_name; + classMethod1;+ (return_type)classMethod2;+ (return_type)classMethod3:(param1_type)param1_varName; - (return_type)instanceMethod1:(param1_type)param1_varName andOtherParameter:(param2_type)param2_varName;

- (return_type)instanceMethod2WithParameter:(param1_type)param1_varName andOtherParameter:(param2_type)param2_varName;

@end

onsdag den 7. september 2011

Objective C Syntax 2/3@implementation classname

@synthesize type_name;

+ (return_type)classMethod{ // implementation}- (return_type)instanceMethod2WithParameter:(param1_type)param1_varName andOtherParameter:(param2_type)param2_varName { // implementation}@end

onsdag den 7. september 2011

Objective C Syntax 3/3@implementation ClientsMapViewController

@synthesize titleBar, mapView;

#pragma mark -#pragma mark Lifecycle

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.- (void)viewDidLoad { [super viewDidLoad];!! UIImageView *background = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 44)] autorelease];! background.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;! background.image = [UIImage imageNamed:@"dark_wood_tile"];! [self.titleBar addSubview:background];! // Sending the image to the back ensures that the text isn't shadowed by the image! [self.titleBar sendSubviewToBack:background];

! UIFont *font = [UIFont fontWithName:@"Lobster 1.4" size:17];! UILabel *header = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];! header.text = @"Clients in the center of Copenhagen";! header.font = font;! header.textAlignment = UITextAlignmentCenter;! header.textColor = [UIColor whiteColor];! header.backgroundColor = [UIColor clearColor];! self.titleBar.topItem.titleView = header;!...

}...

onsdag den 7. september 2011

Cocoa Touch &

Basic Design Patterns

onsdag den 7. september 2011

Cocoa TouchSelected Frameworks

• Core Audio

• Open AL

• Media Library

• AV Foundation

• Core Data

• SQLite

• Core Animation

• Open GL ES

• Quartz 2D

• Bonjour

•Webkit

• BSD Sockets

• Address Book

• Core Location

• Map Kit

• Store Kit

• Event Kit

• Game Kit

• Core Image

• UI Kit

onsdag den 7. september 2011

Model-View-Controller

Controller

Model View

Update Changes

UpdateChanges

Controller Coordination

Model Data View Display

onsdag den 7. september 2011

Delegate Pattern

• Formål: En delegate er et objekt, der får muligheden for at reagere på ændringer i eller påvirke adfærden hos et andet objekt.

• I Cocoa og Cocoa Touch benyttes følgende navne konvention for delegate metoder:

• should

• will

• did

onsdag den 7. september 2011

Apple Developer Tools

onsdag den 7. september 2011

Xcode 4

• Source code editor

• Compiler (LLVM & GCC)

• Debugger (LLDB & GDB)

• Static Analysis

• SCM (Git, Subversion)

• DocViewer (Dokumentation)

onsdag den 7. september 2011

Xcode 4• Plus

• Static Analysis (http://clang-analyzer.llvm.org/)

• Markant lettere at uploade til iTunes Connect og tilføje devices end tidligere

• Git integration

• Minus

• Desværre stadigvæk lidt buggy

• Refactoring?

onsdag den 7. september 2011

Interface Builder

• GUI Builder til hhv. iOS og OSX programmer.

• Interface designet gemmes i XIB filer og kompileres til NIB - realt en serialisering af objekter.

• Utroligt simpelt men stærkt.

onsdag den 7. september 2011

iOS Simulator

• Til hurtig afvikling af dine programmer - men ikke devicet da simulator og device ikke er 100% ens.

• Understøtter flere typer af SDKs samt Retina display og iPad.

onsdag den 7. september 2011

Instruments

• Instruments er din ven!

• Bruges til at finde memory leaks, og over releases (NSZombie)

• Bruges også til at optimere performance, finde flaskehalse eller afvikling af automation scripts.

onsdag den 7. september 2011

Demo

onsdag den 7. september 2011

Apple Developer Portal

onsdag den 7. september 2011

Provisioning Portal• Configure Profile

• Certificates

• Signering af App før den kan afvikles på et device

• Devices

• 100 devices

• AppID

• Bruges bla. til In App Purchases, Push Notification, Hardware Accessory, Game Center & iCloud

onsdag den 7. september 2011

Provisioning Portal• Download & Install

• Development Provisioning Profile indeholder:

• Development Certificates

• Unique Device Identifiers

• App ID.

• Build & Go

• Ad hoc distribution - beta builds

• AppStore distribution - production builds

onsdag den 7. september 2011

iTunes Connect

• Produktet oprettes i AppStore via iTunes Connect

• Beskrivelse af produktet samt keywords

• Kategori

• Screen Shots

• Tilgængelighed (lande)

onsdag den 7. september 2011

iTunes Connect

•Customer Reviews

•Crash reports

• Financial reports

• Sales/Trends

•Manage Users

onsdag den 7. september 2011

One more thing...

onsdag den 7. september 2011

The new kid on the block• AppCode fra Jetbrains

• Bygger på Jetbrains IntelliJ framework

• Refactoring kendt fra Jetbrains andre produkter så som IntelliJ, PyCharm, RubyMine etc.

• Integration med andre (D)VCS

• Plugin ecosystem

• Kræver at Xcode og SDK allerede er installeret

onsdag den 7. september 2011

Resources

onsdag den 7. september 2011

Online• Google Group - cocoa-unbound

http://groups.google.com/group/cocoa-unbound/

• Cocoa With Love - bloghttp://cocoawithlove.com/

• Cocoa is my girlfriend -bloghttp://www.cimgf.com/

• Apple Developer Connection Forum

• CocoaDev - wikihttp://cocoadev.com/

• Cocoa Dev Centralhttp://cocoadevcentral.com/

• Der findes en del fine frameworks på Githubhttp://github.com

onsdag den 7. september 2011

Offline

COMPANION eBOOK SEE LAST PAGE FOR DETAILS ON $10 eBOOK VERSION

US $39.99

Shelve inMac Development

User level:Intermediate–Advancedwww.apress.com

SOURCE CODE ONLINE

BOOKS FOR PROFESSIONALS BY PROFESSIONALS®

ISBN 978-1-4302-2369-6

9 781430223696

53999

this print for content only—size & color not accurate

CYANMAGENTA

YELLOWBLACK

PANTONE 123 C

SPOT MATTE

RELA

TED

TITL

ES

• Learn Objective-C, the language of native Mac and iPhone apps, by leveragingthe Java programming skills you already have.

• Learn to use Apple’s development environment, including just enough Cocoaand Xcode. It’s the professional’s express route to Mac and iPhone developerpro!ciency.

• Learn by working through the exercises and then keep returning for referenceand further study. You’ll !nd everything conveniently organized so you canreference techniques by design pattern.

We all love Java, but Mac OS X is looking awfully cool these days and iPhone OS de-velopment is the most exciting new environment since, well…, since Java! If only

there were a way to avoid learning objective-C. If you’re a Javahead, you probably know a lot more about objective-C than you think. The two languages are full of similarities and that’s why we’ve published Learn Objective-C for Java Developers, your shortcut to Mac and iphone development productivity.

Both languages are object-oriented, use similar inheritance models, string classes, garbage collection, serialization, threads, introspection, and communications. They also embrace proven design patterns like Model-View-Controller and property accessors. You’re already a good portion of the way there and you haven’t even opened this book!

We’ll show you how to use what you know about Java to understand and become quickly pro!cient in Objective-C. Most important, we’ll show you how to take advantage of features unique to Objective-C and incorporate them into your designs. Don’t waste your hard-earned Java knowledge by starting over in kindergarten. Move yourself to the head of the class and catapult over the Objective-C learning curve. You’ll be writing Mac OS X and iPhone apps faster than you ever imagined possible.

James Bucanek has over 25 years of experience in software and systems development.Having made the transition to Mac OS X many years ago, he has never looked back.

Bucanek

Learn Objective-C for Java Developers

CompanioneBookAvailable

Turn Java Expertise into Mac OS X and iPhone App Productivity

Learn Objective-C for

Java DevelopersJames Bucanek

Trim: 7.5 x 9.25 spine =0.96875" 520 page count

COMPANION eBOOK SEE LAST PAGE FOR DETAILS ON $10 eBOOK VERSION

US $39.99

Shelve in: Mobile Computing/Mac Development

User level: Intermediate–Advancedwww.apress.com

SOURCE CODE ONLINE

BOOKS FOR PROFESSIONALS BY PROFESSIONALS®

this print for content only—size & color not accurate

CYAN MAGENTA

YELLOW BLACK PANTONE 123 C

SPOT MATTE

ISBN 978-1-4302-2505-8

9 781430 225058

53999

Interested in iPhone development? Want to learn more? Whether you’re a self taught iPhone dev or have just made your way through the pages of

Beginning iPhone 3 Development, we’ve got a great new book for you.

More iPhone 3 Development: Tackling iPhone SDK 3 digs deep into Apple’s latest SDK, with bestselling authors Dave Mark and Je! LaMarche explaining things as only they can, covering topics like Core Data, peer-to-peer networking us-ing GameKit and network streams, working with data from the web, MapKit, in-application e-mail, and more. All the concepts and APIs are clearly laid out and come complete with code snippets you can customize for use in your most ambitious apps.

More iPhone 3 Development continues right where Beginning iPhone 3 Develop-ment left o!, starting with a series of chapters devoted to Core Data, Apple’s new standard for iPhone Persistence. Je! and Dave step you through the key concepts of Core Data, including techniques and tips speci"cally for writing Large-Scale Applications. For writing professional iPhone apps, you’ll want to embrace Core Data,.

The depth and breadth of Core Data coverage alone is worth the price of ad-mission, but there’s so much more. This book covers a variety of networking mechanisms, from GameKit’s relatively simple BlueTooth peer-to-peer model, to the addition of Bonjour discovery and network streams, through the com-plexity of acquiring information through Web File Access. Dave and Je! also take you through advanced topics, such as Concurrent Programming and techniques for Debugging.

Your knowledge of iPhone app creation can’t be considered complete until you’ve mastered all the knowledge imparted and techniques revealed in More iPhone 3 Development.

Dave Mark is a long-time Mac developer and author and has written a num-ber of books on Macintosh development, including Learn C on the Macintosh, The Macintosh Programming Primer series, and Ultimate Mac Programming. His blog can be found at www.davemark.com.

Je! LaMarche is a longtime Mac developer, and Apple iPhone Developer. With over 20 years of programming experience, he’s written on Cocoa and Objective-C for MacTech Magazine, as well as articles for Apple’s Developer Technical Services website. He has experience working in Enterprise software, both as a developer for PeopleSoft starting in the late 1990s, and then later as an independent consultant.

Trim: 7.5 x 9.25 spine = 0.000" 000 page count

MarkMore iPhone 3 Developm

ent

CompanioneBookAvailable

More Great iPhone API Coverage, Depth, and Insight

MoreiPhone 3 Development

Tackling iPhone SDK 3Dave Mark | Jeff LaMarche

RELA

TED

TIT

LES

By the best-selling authors of

Beginning

iPhone Development

onsdag den 7. september 2011

NSCoder Night• NSCoder Night Copenhagen

• Onsdag kl. 19-22

• RETRO NørrebroJægersborggade 142200 København N

• Twitter @copenhagencocoa

onsdag den 7. september 2011

Efficiency

onsdag den 7. september 2011

Simplified

onsdag den 7. september 2011

BARKODE

onsdag den 7. september 2011

top related