SlideShare ist ein Scribd-Unternehmen logo
1 von 48
iOS Development

Md. Shakil Ahmed
Software Engineer
Astha it research & consultancy ltd.
Dhaka, Bangladesh


16th October 2011
Introduction
Topic Focus:
- What is iOS & iOS Development?
- iOS Dvelopment tools
- Creating a new iOS application.
- Getting Familiar with Xcode and iOS SDK
- Delegate
- Objective C
- Memory Management
- Crash Reports
- iPhone frameworks
What is iOS & iOS Development?
• iOS stands for iPhone Operating System
• iOS made for iPhone, iPod Touch & iPad
• iOS development is developing applications
  for iOS Devices.
iOS Application
There is three ways to do mobile applications
• Mobile Web Interface
• Develop by Flash
• Develop by the native platform
Mobile Web Applications
• This application is mostly connected, so
  most of the time user can’t handle it
  without internet or cached history
• Javascript provides reach function to
  access some hardware like GPS and other
  devices specific hardware
• Developer doesn’t have much authority
  over the device, tied by the browser.
Flash
• Can be used if the application is all about
  interface
• currently flash can be used to act like real
  application, it has access to camera, GPS...
  Etc
• Performance in not good like the native
  platform.
Native Applications
• You can do what ever you want to do, except
  what the framework doesn’t allow you to do.
Smartphone OS Market Share, Q4
            2010
Needed to develop for iPhone
•   Knowledge of Objective C
•   Mac OS X Intel based machine
•   iPhone Development tools
•   iPhone or iPod touch
iPhone Development tools
• Xcode
Create New Application
1. Open Xcode.
2. Select File→New Project.
3. In the dialog that opens, select iPhone OS, then
   View-Based Application and click Choose.
4. Name the project “HelloWorld” and click Save.
5. At this point, you can build and run (click the
   Build and Go icon in the toolbar). The HelloWorld
   application shows only a blank gray screen when
   run in the Simulator.
Create New Application
Xcode
Xcode
• Compiled Code ->
  your's and
  framework's
• Nib – files: UI---
  elements
• Resources: images,
  sounds.
• Info.plist – file: app
  configuraIon
info.plist
Info.plist in Xcode
nib---file?
• Interface Builder is used for creating Uis
• The interface is stored in a file .n/xib
   – .nib = Next Interface Builder
  – .xib = new version (Interface Builder 3) of
  nib
• The xib file is xml!
nib---file
Nib – files in Interface Builder
icons and images
Life Cycle
Design Pattern: Delegate
• Xcode project template has provided
  UIApplicaIonDelegate for you
• Can implement:
  - applicationDidFinishLaunching
  - applicationWillTerminate
  – applicationDidReceiveMemoryWarning
• One object sends periodically messages to
  another object specified as its delegate
Delegate
#import <UIKit/UIKit.h>
@interface HelloWorldAppDelegate : NSObject
    <UIApplicationDelegate> {
UIWindow *window;
UITextField *mytextfield;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITextField
    *mytextfield;
- (IBAction) userClicked: (id) sender;
@end
Delegate
• nonatomic - single threaded application
• retain - memory management
• IBOutlet - variables to attach to Interface
  Builder objects
• IBAction - methods to attach to Interface
  Builder actions
In Interface Builder
Delegate classes implementation
#import "HelloWorldAppDelegate.h"
@implementation HelloWorldAppDelegate
@synthesize window;
@synthesize mytextfield;
- (IBAction) userClicked: (id) sender
{
NSString* text = [mytextfield text];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hello“
    message:text delegate:nil cancelButtonTitle:@"Ok“
    otherButtonTitles:nil];
[alert show];
[alert release];
}
Delegate classes implementation
- (void)applicationDidFinishLaunching:(UIApplication
   *)application {
// Override point for customization after application
   launch
[window makeKeyAndVisible];
}
- (void)dealloc {
[window release];
[super dealloc];
}
@end
Result
Objective C
• You can consider it Extension for C language
• ObjC add more dynamicity to C Language
• Single inheritance from super class and
  protocols is used as interfaces
• Totally new syntax but still can use C with it.
Objective C
New concepts
  – Class definition
  – Protocol implementation
  – Class messages
  – Many more …
Classes and Objects
• Classes declare the state and behavior
• State (class data) is instance variables
• Behavior is methods
Class and instance methods
• Instances responds to “Instance methods”
  1. -(id)init;
  2. -(char*)getName;
• Class responds to “Static methods”
  1. +(id)alloc;
  2. +(char*)getClassName;
Message syntax (calling methods)
• Function calling in Objective C called message,
  this is to give more dynamicity to the language,
  some times if the method is not implemented the
  calling result will be nil = null
  – [objectOfClass functionName];
  – [objectOfClass functionName:Arg1];
• Calling staic method
  – [Class functionName];
  – [Class functionName:Arg1];
Objective C
• Dot Syntax
  – It is only working in Objective C 2.0
  – It is only used for properties of object
• Dynamic Casting
  – Using type “id” , id is pointer to void “C Style
    void*”
  – id object = [Class new];
• Static casting
  – Class* object = [Class new];
Objective C
•   nil is equivalents to null
•   Objective C Class has no operators overloading
•   Objective C Class has no constructors or destructors
•   Boolean type is, BOOL
     – YES is TRUE
     – NO is FALSE
Memory Management
Rules :
You only release or autorelease objects you
  own.
• If you own the object by alloc, copy or retain,
  you have to release or autorelease
• If the object is not owned by you, don’t call
  release or autorelease
Memory Management
Memory Management
Local Variable
• Always release or autorelease in the same
  scope
Crash Reports
Crash Types
•   EXC_BAD_ACCESS (SIGBUS or SIGSEGV)
•   EXC_CRASH (SIGABRT)
•   Low Memory
•   00000020
iPhone frameworks
•   Foundation          MapKit
•   UIKit               IOKit
•   CoreGrphics
                        MediaPlayer
•   CFNetwork
                        AddressBook
•   CoreLocation
                        MobileCoreSerivces
•   CoreData
•   ExternalAccessory   OpenGL

•   GameKit             Security

                        StoreKit
                                      And many more
CoreData
Core Location & MapKit
Multitasking
• Available in iOS 4.
iPhone Development
• It is true that Objective C is not as strong as
  any other language but the huge coverage of
  frameworks that is provided by Apple makes it
  Ok to use such SDK.
Thanks!

Weitere ähnliche Inhalte

Was ist angesagt?

iOS Architecture
iOS ArchitectureiOS Architecture
iOS ArchitectureJacky Lian
 
Mobile Application Design & Development
Mobile Application Design & DevelopmentMobile Application Design & Development
Mobile Application Design & DevelopmentRonnie Liew
 
Development of Mobile Application -PPT
Development of Mobile Application -PPTDevelopment of Mobile Application -PPT
Development of Mobile Application -PPTDhivya T
 
Introduction to Android ppt
Introduction to Android pptIntroduction to Android ppt
Introduction to Android pptTaha Malampatti
 
Mobile application development ppt
Mobile application development pptMobile application development ppt
Mobile application development ppttirupathinews
 
Swift Tutorial For Beginners | Swift Programming Tutorial | IOS App Developme...
Swift Tutorial For Beginners | Swift Programming Tutorial | IOS App Developme...Swift Tutorial For Beginners | Swift Programming Tutorial | IOS App Developme...
Swift Tutorial For Beginners | Swift Programming Tutorial | IOS App Developme...Edureka!
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application DevelopmentBenny Skogberg
 
iOS Development - A Beginner Guide
iOS Development - A Beginner GuideiOS Development - A Beginner Guide
iOS Development - A Beginner GuideAndri Yadi
 
Android app development ppt
Android app development pptAndroid app development ppt
Android app development pptsaitej15
 
Kotlin for Android Development
Kotlin for Android DevelopmentKotlin for Android Development
Kotlin for Android DevelopmentSpeck&Tech
 
Swift in SwiftUI
Swift in SwiftUISwift in SwiftUI
Swift in SwiftUIBongwon Lee
 
Introduction to mobile application development
Introduction to mobile application developmentIntroduction to mobile application development
Introduction to mobile application developmentChandan Maurya
 

Was ist angesagt? (20)

iOS Architecture
iOS ArchitectureiOS Architecture
iOS Architecture
 
DOT Net overview
DOT Net overviewDOT Net overview
DOT Net overview
 
Android studio ppt
Android studio pptAndroid studio ppt
Android studio ppt
 
Mobile Application Design & Development
Mobile Application Design & DevelopmentMobile Application Design & Development
Mobile Application Design & Development
 
Android Training
Android TrainingAndroid Training
Android Training
 
Development of Mobile Application -PPT
Development of Mobile Application -PPTDevelopment of Mobile Application -PPT
Development of Mobile Application -PPT
 
Introduction to Android ppt
Introduction to Android pptIntroduction to Android ppt
Introduction to Android ppt
 
Android ppt
Android ppt Android ppt
Android ppt
 
Mobile application development ppt
Mobile application development pptMobile application development ppt
Mobile application development ppt
 
Swift Tutorial For Beginners | Swift Programming Tutorial | IOS App Developme...
Swift Tutorial For Beginners | Swift Programming Tutorial | IOS App Developme...Swift Tutorial For Beginners | Swift Programming Tutorial | IOS App Developme...
Swift Tutorial For Beginners | Swift Programming Tutorial | IOS App Developme...
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
PPT on iOS
PPT on iOS PPT on iOS
PPT on iOS
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
iOS Development - A Beginner Guide
iOS Development - A Beginner GuideiOS Development - A Beginner Guide
iOS Development - A Beginner Guide
 
Android app development ppt
Android app development pptAndroid app development ppt
Android app development ppt
 
Android Widget
Android WidgetAndroid Widget
Android Widget
 
Kotlin for Android Development
Kotlin for Android DevelopmentKotlin for Android Development
Kotlin for Android Development
 
Swift in SwiftUI
Swift in SwiftUISwift in SwiftUI
Swift in SwiftUI
 
iOS PPT
iOS PPTiOS PPT
iOS PPT
 
Introduction to mobile application development
Introduction to mobile application developmentIntroduction to mobile application development
Introduction to mobile application development
 

Andere mochten auch

Maven basics (Android & IntelliJ)
Maven basics (Android & IntelliJ)Maven basics (Android & IntelliJ)
Maven basics (Android & IntelliJ)Hussain Mansoor
 
First Steps in iOS Development
First Steps in iOS DevelopmentFirst Steps in iOS Development
First Steps in iOS DevelopmentSasha Goldshtein
 
How & where to start iOS development?
How & where to start iOS development?How & where to start iOS development?
How & where to start iOS development?Kazi Mohammad Ekram
 
CoreData - there is an ORM you can like!
CoreData - there is an ORM you can like!CoreData - there is an ORM you can like!
CoreData - there is an ORM you can like!Tomáš Jukin
 
Core Data without headaches
Core Data without headachesCore Data without headaches
Core Data without headachesAbraham Barrera
 
iOS 10 & XCode 8, Swift 3.0 features and changes
iOS 10 & XCode 8, Swift 3.0 features and changesiOS 10 & XCode 8, Swift 3.0 features and changes
iOS 10 & XCode 8, Swift 3.0 features and changesManjula Jonnalagadda
 

Andere mochten auch (9)

The Race to the Middle
The Race to the MiddleThe Race to the Middle
The Race to the Middle
 
Maven basics (Android & IntelliJ)
Maven basics (Android & IntelliJ)Maven basics (Android & IntelliJ)
Maven basics (Android & IntelliJ)
 
Data perisistence in iOS
Data perisistence in iOSData perisistence in iOS
Data perisistence in iOS
 
First Steps in iOS Development
First Steps in iOS DevelopmentFirst Steps in iOS Development
First Steps in iOS Development
 
How & where to start iOS development?
How & where to start iOS development?How & where to start iOS development?
How & where to start iOS development?
 
CoreData - there is an ORM you can like!
CoreData - there is an ORM you can like!CoreData - there is an ORM you can like!
CoreData - there is an ORM you can like!
 
Core Data without headaches
Core Data without headachesCore Data without headaches
Core Data without headaches
 
Intro to iOS Development
Intro to iOS DevelopmentIntro to iOS Development
Intro to iOS Development
 
iOS 10 & XCode 8, Swift 3.0 features and changes
iOS 10 & XCode 8, Swift 3.0 features and changesiOS 10 & XCode 8, Swift 3.0 features and changes
iOS 10 & XCode 8, Swift 3.0 features and changes
 

Ähnlich wie Ios development

iOS Development Survival Guide for the .NET Guy
iOS Development Survival Guide for the .NET GuyiOS Development Survival Guide for the .NET Guy
iOS Development Survival Guide for the .NET GuyNick Landry
 
Image Processing and Computer Vision in iPhone and iPad
Image Processing and Computer Vision in iPhone and iPadImage Processing and Computer Vision in iPhone and iPad
Image Processing and Computer Vision in iPhone and iPadOge Marques
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application SecurityEgor Tolstoy
 
Ruxmon April 2014 - Introduction to iOS Penetration Testing
Ruxmon April 2014 - Introduction to iOS Penetration TestingRuxmon April 2014 - Introduction to iOS Penetration Testing
Ruxmon April 2014 - Introduction to iOS Penetration Testingeightbit
 
Xcode, Basics and Beyond
Xcode, Basics and BeyondXcode, Basics and Beyond
Xcode, Basics and Beyondrsebbe
 
iOS Development - Offline Class for Jasakomer
iOS Development - Offline Class for JasakomeriOS Development - Offline Class for Jasakomer
iOS Development - Offline Class for JasakomerAndri Yadi
 
C# on the iPhone with MonoTouch Glasgow
C# on the iPhone with MonoTouch GlasgowC# on the iPhone with MonoTouch Glasgow
C# on the iPhone with MonoTouch GlasgowChris Hardy
 
OWASP Melbourne - Introduction to iOS Application Penetration Testing
OWASP Melbourne - Introduction to iOS Application Penetration TestingOWASP Melbourne - Introduction to iOS Application Penetration Testing
OWASP Melbourne - Introduction to iOS Application Penetration Testingeightbit
 
Никита Корчагин - Introduction to Apple iOS Development.
Никита Корчагин - Introduction to Apple iOS Development.Никита Корчагин - Introduction to Apple iOS Development.
Никита Корчагин - Introduction to Apple iOS Development.DataArt
 
Italian Alt.Net Conference MonoTouch Session
Italian Alt.Net Conference MonoTouch SessionItalian Alt.Net Conference MonoTouch Session
Italian Alt.Net Conference MonoTouch SessionChris Hardy
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and SecurityKelwin Yang
 
Enterprise iPad Development Without Notes
Enterprise iPad Development Without NotesEnterprise iPad Development Without Notes
Enterprise iPad Development Without Notesjaxarcsig
 
I Phone Development Presentation
I Phone Development PresentationI Phone Development Presentation
I Phone Development PresentationAessam
 
Java- Java tech overview- Mazenet solution
Java- Java tech overview- Mazenet solutionJava- Java tech overview- Mazenet solution
Java- Java tech overview- Mazenet solutionMazenetsolution
 
Exploring Your Apple M1 devices with Open Source Tools
Exploring Your Apple M1 devices with Open Source ToolsExploring Your Apple M1 devices with Open Source Tools
Exploring Your Apple M1 devices with Open Source ToolsKoan-Sin Tan
 
Bootstrapping iPhone Development
Bootstrapping iPhone DevelopmentBootstrapping iPhone Development
Bootstrapping iPhone DevelopmentThoughtWorks
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Gil Irizarry
 
C# On The iPhone with MonoTouch at DDD8
C# On The iPhone with MonoTouch at DDD8C# On The iPhone with MonoTouch at DDD8
C# On The iPhone with MonoTouch at DDD8Chris Hardy
 
FI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS BasicsFI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS BasicsPetr Dvorak
 

Ähnlich wie Ios development (20)

iOS Development Survival Guide for the .NET Guy
iOS Development Survival Guide for the .NET GuyiOS Development Survival Guide for the .NET Guy
iOS Development Survival Guide for the .NET Guy
 
Image Processing and Computer Vision in iPhone and iPad
Image Processing and Computer Vision in iPhone and iPadImage Processing and Computer Vision in iPhone and iPad
Image Processing and Computer Vision in iPhone and iPad
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
 
Ruxmon April 2014 - Introduction to iOS Penetration Testing
Ruxmon April 2014 - Introduction to iOS Penetration TestingRuxmon April 2014 - Introduction to iOS Penetration Testing
Ruxmon April 2014 - Introduction to iOS Penetration Testing
 
Xcode, Basics and Beyond
Xcode, Basics and BeyondXcode, Basics and Beyond
Xcode, Basics and Beyond
 
iOS Development - Offline Class for Jasakomer
iOS Development - Offline Class for JasakomeriOS Development - Offline Class for Jasakomer
iOS Development - Offline Class for Jasakomer
 
C# on the iPhone with MonoTouch Glasgow
C# on the iPhone with MonoTouch GlasgowC# on the iPhone with MonoTouch Glasgow
C# on the iPhone with MonoTouch Glasgow
 
OWASP Melbourne - Introduction to iOS Application Penetration Testing
OWASP Melbourne - Introduction to iOS Application Penetration TestingOWASP Melbourne - Introduction to iOS Application Penetration Testing
OWASP Melbourne - Introduction to iOS Application Penetration Testing
 
Никита Корчагин - Introduction to Apple iOS Development.
Никита Корчагин - Introduction to Apple iOS Development.Никита Корчагин - Introduction to Apple iOS Development.
Никита Корчагин - Introduction to Apple iOS Development.
 
Italian Alt.Net Conference MonoTouch Session
Italian Alt.Net Conference MonoTouch SessionItalian Alt.Net Conference MonoTouch Session
Italian Alt.Net Conference MonoTouch Session
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
Enterprise iPad Development Without Notes
Enterprise iPad Development Without NotesEnterprise iPad Development Without Notes
Enterprise iPad Development Without Notes
 
I Phone Development Presentation
I Phone Development PresentationI Phone Development Presentation
I Phone Development Presentation
 
Java- Java tech overview- Mazenet solution
Java- Java tech overview- Mazenet solutionJava- Java tech overview- Mazenet solution
Java- Java tech overview- Mazenet solution
 
Exploring Your Apple M1 devices with Open Source Tools
Exploring Your Apple M1 devices with Open Source ToolsExploring Your Apple M1 devices with Open Source Tools
Exploring Your Apple M1 devices with Open Source Tools
 
Bootstrapping iPhone Development
Bootstrapping iPhone DevelopmentBootstrapping iPhone Development
Bootstrapping iPhone Development
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
 
iOS Application Exploitation
iOS Application ExploitationiOS Application Exploitation
iOS Application Exploitation
 
C# On The iPhone with MonoTouch at DDD8
C# On The iPhone with MonoTouch at DDD8C# On The iPhone with MonoTouch at DDD8
C# On The iPhone with MonoTouch at DDD8
 
FI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS BasicsFI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS Basics
 

Mehr von Shakil Ahmed (20)

Algorithm
AlgorithmAlgorithm
Algorithm
 
B-tree & R-tree
B-tree & R-treeB-tree & R-tree
B-tree & R-tree
 
Advanced data structure
Advanced data structureAdvanced data structure
Advanced data structure
 
Prototype pattern
Prototype patternPrototype pattern
Prototype pattern
 
Observer pattern
Observer patternObserver pattern
Observer pattern
 
Mediator pattern
Mediator patternMediator pattern
Mediator pattern
 
Flyweight pattern
Flyweight patternFlyweight pattern
Flyweight pattern
 
Facade pattern
Facade patternFacade pattern
Facade pattern
 
Composite pattern
Composite patternComposite pattern
Composite pattern
 
Command pattern
Command patternCommand pattern
Command pattern
 
Chain of responsibility
Chain of responsibilityChain of responsibility
Chain of responsibility
 
Builder pattern
Builder patternBuilder pattern
Builder pattern
 
Bridge pattern
Bridge patternBridge pattern
Bridge pattern
 
Adapter pattern
Adapter patternAdapter pattern
Adapter pattern
 
Proxy pattern
Proxy patternProxy pattern
Proxy pattern
 
iOS 5
iOS 5iOS 5
iOS 5
 
Graph
GraphGraph
Graph
 
Lowest common ancestor
Lowest common ancestorLowest common ancestor
Lowest common ancestor
 
Segment tree
Segment treeSegment tree
Segment tree
 
Tree & bst
Tree & bstTree & bst
Tree & bst
 

Kürzlich hochgeladen

Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesShubhangi Sonawane
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 

Kürzlich hochgeladen (20)

Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 

Ios development

  • 1. iOS Development Md. Shakil Ahmed Software Engineer Astha it research & consultancy ltd. Dhaka, Bangladesh 16th October 2011
  • 2. Introduction Topic Focus: - What is iOS & iOS Development? - iOS Dvelopment tools - Creating a new iOS application. - Getting Familiar with Xcode and iOS SDK - Delegate - Objective C - Memory Management - Crash Reports - iPhone frameworks
  • 3. What is iOS & iOS Development? • iOS stands for iPhone Operating System • iOS made for iPhone, iPod Touch & iPad • iOS development is developing applications for iOS Devices.
  • 4. iOS Application There is three ways to do mobile applications • Mobile Web Interface • Develop by Flash • Develop by the native platform
  • 5. Mobile Web Applications • This application is mostly connected, so most of the time user can’t handle it without internet or cached history • Javascript provides reach function to access some hardware like GPS and other devices specific hardware • Developer doesn’t have much authority over the device, tied by the browser.
  • 6. Flash • Can be used if the application is all about interface • currently flash can be used to act like real application, it has access to camera, GPS... Etc • Performance in not good like the native platform.
  • 7. Native Applications • You can do what ever you want to do, except what the framework doesn’t allow you to do.
  • 8. Smartphone OS Market Share, Q4 2010
  • 9.
  • 10.
  • 11. Needed to develop for iPhone • Knowledge of Objective C • Mac OS X Intel based machine • iPhone Development tools • iPhone or iPod touch
  • 13. Create New Application 1. Open Xcode. 2. Select File→New Project. 3. In the dialog that opens, select iPhone OS, then View-Based Application and click Choose. 4. Name the project “HelloWorld” and click Save. 5. At this point, you can build and run (click the Build and Go icon in the toolbar). The HelloWorld application shows only a blank gray screen when run in the Simulator.
  • 15. Xcode
  • 16. Xcode • Compiled Code -> your's and framework's • Nib – files: UI--- elements • Resources: images, sounds. • Info.plist – file: app configuraIon
  • 19. nib---file? • Interface Builder is used for creating Uis • The interface is stored in a file .n/xib – .nib = Next Interface Builder – .xib = new version (Interface Builder 3) of nib • The xib file is xml!
  • 21. Nib – files in Interface Builder
  • 24. Design Pattern: Delegate • Xcode project template has provided UIApplicaIonDelegate for you • Can implement: - applicationDidFinishLaunching - applicationWillTerminate – applicationDidReceiveMemoryWarning • One object sends periodically messages to another object specified as its delegate
  • 25. Delegate #import <UIKit/UIKit.h> @interface HelloWorldAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; UITextField *mytextfield; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet UITextField *mytextfield; - (IBAction) userClicked: (id) sender; @end
  • 26. Delegate • nonatomic - single threaded application • retain - memory management • IBOutlet - variables to attach to Interface Builder objects • IBAction - methods to attach to Interface Builder actions
  • 28. Delegate classes implementation #import "HelloWorldAppDelegate.h" @implementation HelloWorldAppDelegate @synthesize window; @synthesize mytextfield; - (IBAction) userClicked: (id) sender { NSString* text = [mytextfield text]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hello“ message:text delegate:nil cancelButtonTitle:@"Ok“ otherButtonTitles:nil]; [alert show]; [alert release]; }
  • 29. Delegate classes implementation - (void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after application launch [window makeKeyAndVisible]; } - (void)dealloc { [window release]; [super dealloc]; } @end
  • 31. Objective C • You can consider it Extension for C language • ObjC add more dynamicity to C Language • Single inheritance from super class and protocols is used as interfaces • Totally new syntax but still can use C with it.
  • 32. Objective C New concepts – Class definition – Protocol implementation – Class messages – Many more …
  • 33. Classes and Objects • Classes declare the state and behavior • State (class data) is instance variables • Behavior is methods
  • 34. Class and instance methods • Instances responds to “Instance methods” 1. -(id)init; 2. -(char*)getName; • Class responds to “Static methods” 1. +(id)alloc; 2. +(char*)getClassName;
  • 35. Message syntax (calling methods) • Function calling in Objective C called message, this is to give more dynamicity to the language, some times if the method is not implemented the calling result will be nil = null – [objectOfClass functionName]; – [objectOfClass functionName:Arg1]; • Calling staic method – [Class functionName]; – [Class functionName:Arg1];
  • 36. Objective C • Dot Syntax – It is only working in Objective C 2.0 – It is only used for properties of object • Dynamic Casting – Using type “id” , id is pointer to void “C Style void*” – id object = [Class new]; • Static casting – Class* object = [Class new];
  • 37. Objective C • nil is equivalents to null • Objective C Class has no operators overloading • Objective C Class has no constructors or destructors • Boolean type is, BOOL – YES is TRUE – NO is FALSE
  • 38. Memory Management Rules : You only release or autorelease objects you own. • If you own the object by alloc, copy or retain, you have to release or autorelease • If the object is not owned by you, don’t call release or autorelease
  • 40. Memory Management Local Variable • Always release or autorelease in the same scope
  • 42. Crash Types • EXC_BAD_ACCESS (SIGBUS or SIGSEGV) • EXC_CRASH (SIGABRT) • Low Memory • 00000020
  • 43. iPhone frameworks • Foundation MapKit • UIKit IOKit • CoreGrphics MediaPlayer • CFNetwork AddressBook • CoreLocation MobileCoreSerivces • CoreData • ExternalAccessory OpenGL • GameKit Security StoreKit And many more
  • 45. Core Location & MapKit
  • 47. iPhone Development • It is true that Objective C is not as strong as any other language but the huge coverage of frameworks that is provided by Apple makes it Ok to use such SDK.