Introduction to iphone Development



Similar documents
MA-WA1920: Enterprise iphone and ipad Programming

INTRODUCTION TO IOS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 13 02/22/2011

iphone Objective-C Exercises

Objective C and iphone App

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

Certificates and Application Resigning

App Programming Guide for ios

ios Dev Crib Sheet In the Shadow of C

ios Development Tutorial Nikhil Yadav CSE 40816/60816: Pervasive Health 09/09/2011

An Introduction to Modern Software Development Tools Creating A Simple GUI-Based Tool Appleʼs XCode Version 3.2.6

Your First App Store Submission

ios App Programming Guide

Chapter 1. Introduction to ios Development. Objectives: Touch on the history of ios and the devices that support this operating system.

Application Programming on the Mac COSC346

Backup Buddy. Welcome to Backup Buddy! The simplest, friendliest backup application for the Mac.

ios App for Mobile Website! Documentation!

INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011

Xcode Project Management Guide. (Legacy)

Programming Cocoa with Ruby Create Compelling Mac Apps Using RubyCocoa

Using the Caché Objective-C Binding

Create an ios App using Adobe Flash Side by Side Training, And without using a Mac

Data storage and retrieval in ios

How To Develop An App For Ios (Windows)

Icons: 1024x1024, 512x512, 180x180, 120x120, 114x114, 80x80, 60x60, 58x58, 57x57, 40x40, 29x29

ios App Development for Everyone

Praktikum Entwicklung von Mediensystemen mit ios

Beginner level: Modules 1 to 18. Advanced level: Quick review of modules 1 to 18, then following to module A Simple ios Application

2. About iphone ios 5 Development Essentials. 5. Joining the Apple ios Developer Program

App Distribution Guide

How To Use Ios 5

Start Developing ios Apps Today

PNY DUO-LINK On-The-Go Flash Drive for iphone and ipad. User Manual

ITP 342 Mobile App Development. Notifications

Chapter 1. Xcode Projects

Project Builder for Java. (Legacy)

Dacorum U3A Apple Mac Users Group Agenda TUESDAY 7th July 2015 Time Machine Backups for your MAC & ipad?

Xcode Application note

Networking & Internet

Generate Android App

Learning ios Programming

Praktikum Entwicklung von Mediensystemen mit

Product Guide Nintex. All rights reserved. Errors and omissions excepted.

How to find the MAC address of your computer

FortiClient SSL VPN Client User s Guide

Installation Instructions

Access the TCNJ Palo Alto Networks VPN using the GlobalProtect VPN client

MEAP Edition Manning Early Access Program Hello! ios Development version 14

Protection Service for Business

eggon SDK for ios 7 Integration Instructions

Configuring Secure Wireless (SFUNET-SECURE) for iphone/ipod Touch 2.0

Outlook Data File navigate to the PST file that you want to open, select it and choose OK. The file will now appear as a folder in Outlook.

TakeMySelfie ios App Documentation

MERLIN SERVER. The Quick Start Guide for collaborative project management ProjectWizards GmbH, Melle, Germany. All rights reserved.

ios Team Administration Guide (Legacy)

Setting up RDP on your ipad

BuzzTouch ios Push Notifications

Tag Specification Document

Customize Mobile Apps with MicroStrategy SDK: Custom Security, Plugins, and Extensions

So you want to create an a Friend action

Using Free PGI and Xcode

IOS App Development Training

NASA Workflow Tool. User Guide. September 29, 2010

Maxis BizVoice For iphone User Guide. Version 1.0

geniusport mobility training experts

educ Office Remove & create new Outlook profile

EXTRACTING IOS DATABASE

Total Baby. Backup, Restore and itunes Backup Extraction

Instructions to Sign On and Off of Self Service Applications. Internet Explorer 9 (IE9) Users: Turn Off Compatibility View:

Apple URL Scheme Reference

Access Your Cisco Smart Storage Remotely Via WebDAV

Remote Desktop Solution, (RDS), replacing CITRIX Home Access

Commack UFSD Remote Access for Microsoft Windows Vista, 7 and 8 Apple Macs, ipads, iphones And Android devices

Lab 0 (Setting up your Development Environment) Week 1

Avira Secure Backup INSTALLATION GUIDE. HowTo

Copy Documents from your Computer (H Drive) to a Flash Drive

Managing Macintosh OS-X with Novell ZCM 11.2 Lecture

geniusport mobility training experts

Make and Transfer a Backup

Creating a Custom Class in Xcode

TIPS FOR USING OS X 10.8 MOUNTAIN LION

Mobile Application Development

Gun's & Ammo Tracker. Copyright DERISCO Enterprises

Assistive Application Programming Guide For OS X 2.0

Making and Exporting a Backup

View Controller Programming Guide for ios

Ruby and Python Programming Topics for Mac. (Retired Document)

Windows File Management A Hands-on Class Presented by Edith Einhorn

UNIFIED COMMUNICATIONS POST-MIGRATION INSTRUCTIONS

Instructions for Accessing the Hodges University Virtual Lab

Engage ios App Administrator s Guide

How To Package In Composer (Amd64)

Transcription:

Introduction to iphone Development

Introduction to iphone Development Contents Task 1 2 3 4 Application Runtime Core Architecture and Life-cycles What s in a bundle? The resources in an app bundle Customizing Behavior How does it launch? IPC? Relation with Tools How do we get the app on the phone?

Introduction to iphone Development Contents Task 1 2 3 4 Application Runtime Core Architecture and Life-cycles What s in a bundle? The resources in an app bundle Customizing Behavior How does it launch? IPC? Relation with Tools How do we get the app on the phone?

Application Life-Cycle How your application lives and dies User taps icon on home screen main() UIApplicationMain() Event Loop System requests termination Application actually terminates

main and UIApplicationMain main() Just like any other main functions (C, C++, etc) Creates top-level autorelease pool Starts application with UIApplicationMain UIApplicationMain() Creates instance of UIApplication that is responsible for actually launching your application (loading main Nib file). Takes four parameters: argc, argv, ignore other two.

Application Delegate Monitors high level or critical actions in application Launch Terminate Memory warnings Conforms to Objective-C protocol (all methods optional)

The Main Nib File Remember: archive of objects. One of these objects is your main window. For now, think of the Main Nib file as your interface, as the year progresses, we ll show how to load additional Nib files. Interface elements not in your main Nib file: Status bar Application instance (we ll talk about proxy objects in three weeks)

Event-Handling Cycle System receives event (like mouse movement) System sends event on to your application instance Application instance then forwards the event to the First Responder, who starts sending the event up the chain. This is called the responder chain, and is a pretty advanced topic. Take-away: Event handling is complicated, and all you really need to know is that you can intercept these events to use them (like touchesbegan:withevent:).

Life-Cycle Review User touches icon on home screen System calls main() main() calls UIApplicationMain() UIApplicationMain() creates instance of UIApplication UIApplication instance loads main Nib file, sets up based on application properties UIApplication instance goes into run loop, waiting for and forwarding events to interface elements (instances of UIResponder) User taps home button or does another termination activity UIApplication instance tells your delegate that the application is terminating UIApplicationMain() exits, main() exits, process exits

Sandboxing iphone OS does not give your application free reign like it does on OS X. Your application only has access to a certain part of the file system, something like: /ApplicationRoot/ApplicationID This is a security device preventing a single application from destroying your phone or ipod Touch.

Virtual Memory Virtual memory on the phone is quite interesting. It exists, but not really. It exists in that it gives your application the full virtual 32-bit address space. However, it does not write volatile pages to disk (b/c flash memory only has so many write cycles). Instead, the OS tries to free up nonvolatile memory. Therefore, you should (must) respond to applicationdidreceivememorywarning: in your delegate

Introduction to iphone Development Contents Task 1 2 3 4 Application Runtime Core Architecture and Life-cycles What s in a bundle? The resources in an app bundle Customizing Behavior How does it launch? IPC? Relation with Tools How do we get the app on the phone?

Introduction to iphone Development Contents Task 1 2 3 4 Application Runtime Core Architecture and Life-cycles What s in a bundle? The resources in an app bundle Customizing Behavior How does it launch? IPC? Relation with Tools How do we get the app on the phone?

Application Contents File MyApp Icon.png MainWindow.nib Info.plist myimage.png Settings.bundle Icon-Settings.png Default.png en.lproj, fr.lprog, Other items Description The actual application executable code Your application s home screen icon The main Nib file containing your interface Property list with information about your application A non-localized image or other resource Preference pane for the Settings app Icon for settings application The image to show while your app is launching Localized folders (ignore these for now) that you should ignore for now.

MyApp The compiled, executable code for your application. Actual name is the name of your application bundle minus the.app extension. If your application bundle doesn t have this, you don t actually have an application, you just have a folder of stuff.

Property Lists Used for tons of data serialization in iphone OS and OS X. XML or binary files. When loaded by Cocoa [Touch], the data in the property list gets turned into real objects. <string>hello world!</string> gets turned into an instance of NSString with the contents Hello World!. Same applies for dictionaries (NSDictionary), arrays (NSArray), numbers (NSNumber), dates (NSDate), and data (NSData). Use property list editor in Xcode to edit property lists.

Info.plist Property list containing generic information as well as customized properties for your application. Required information: Display name (CFBundleDisplayName) Identifier (CFBundleIdentifier) iphone app? (LSRequiresIPhoneOS) Main Nib file name (NSMainNibFile) Customized properties Status bar style (UIStatusBarStyle or UIStatusBarHidden) Others

Info.plist and IPC You can do IPC (Inter-Process Communication) on the phone via URL schemes. Register a scheme (like myapp://), and then other apps can call it and your app will get launched, then you handle it. Not true IPC, but close? Use the CFBundleURLTypes key in the Info.plist, then for each type, fill out CFBundleURLName and CFBundleURLSchemes. When application calls your URL scheme, you handle it with your application delegate: application:handleopenurl:

Introduction to iphone Development Contents Task 1 2 3 4 Application Runtime Core Architecture and Life-cycles What s in a bundle? The resources in an app bundle Customizing Behavior How does it launch? IPC? Relation with Tools How do we get the app on the phone?

Introduction to iphone Development Contents Task 1 2 3 4 Application Runtime Core Architecture and Life-cycles What s in a bundle? The resources in an app bundle Customizing Behavior How does it launch? IPC? Relation with Tools How do we get the app on the phone?

Development to Device Write code Build for device Install Sign

Introduction to iphone Development Contents Task 1 2 3 4 Application Runtime Core Architecture and Life-cycles What s in a bundle? The resources in an app bundle Customizing Behavior How does it launch? IPC? Relation with Tools How do we get the app on the phone?

Introduction to iphone Development Contents Task 1 2 3 4 Application Runtime Core Architecture and Life-cycles What s in a bundle? The resources in an app bundle Customizing Behavior How does it launch? IPC? Relation with Tools How do we get the app on the phone?

iphone Application Programming Guide Available on Apple s website