SlideShare a Scribd company logo
1 of 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!

More Related Content

What's hot

Android SDK Tutorial | Edureka
Android SDK Tutorial | EdurekaAndroid SDK Tutorial | Edureka
Android SDK Tutorial | EdurekaEdureka!
 
Native Apps vs. Web Apps – What Is the Better Choice?
Native Apps vs. Web Apps – What Is the Better Choice?Native Apps vs. Web Apps – What Is the Better Choice?
Native Apps vs. Web Apps – What Is the Better Choice?ChromeInfo Technologies
 
Mobile Application Development: Hybrid, Native and Mobile Web Apps
Mobile Application Development: Hybrid, Native and Mobile Web AppsMobile Application Development: Hybrid, Native and Mobile Web Apps
Mobile Application Development: Hybrid, Native and Mobile Web AppsPaul Sons
 
Flutter session 01
Flutter session 01Flutter session 01
Flutter session 01DSC IEM
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The BasicsMike Desjardins
 
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 app development
Android app developmentAndroid app development
Android app developmentTanmoy Roy
 
Introduction to Mobile Application Development
Introduction to Mobile Application DevelopmentIntroduction to Mobile Application Development
Introduction to Mobile Application DevelopmentTharindu Dassanayake
 
Native, Web or Hybrid Mobile App Development?
Native, Web or Hybrid Mobile App Development?Native, Web or Hybrid Mobile App Development?
Native, Web or Hybrid Mobile App Development?Sura Gonzalez
 
Development of Mobile Application -PPT
Development of Mobile Application -PPTDevelopment of Mobile Application -PPT
Development of Mobile Application -PPTDhivya T
 
Android app development ppt
Android app development pptAndroid app development ppt
Android app development pptsaitej15
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidzeelpatel0504
 
iOS Development - A Beginner Guide
iOS Development - A Beginner GuideiOS Development - A Beginner Guide
iOS Development - A Beginner GuideAndri Yadi
 

What's hot (20)

Android SDK Tutorial | Edureka
Android SDK Tutorial | EdurekaAndroid SDK Tutorial | Edureka
Android SDK Tutorial | Edureka
 
PPT on iOS
PPT on iOS PPT on iOS
PPT on iOS
 
Native Apps vs. Web Apps – What Is the Better Choice?
Native Apps vs. Web Apps – What Is the Better Choice?Native Apps vs. Web Apps – What Is the Better Choice?
Native Apps vs. Web Apps – What Is the Better Choice?
 
What is Flutter
What is FlutterWhat is Flutter
What is Flutter
 
Mobile Application Development: Hybrid, Native and Mobile Web Apps
Mobile Application Development: Hybrid, Native and Mobile Web AppsMobile Application Development: Hybrid, Native and Mobile Web Apps
Mobile Application Development: Hybrid, Native and Mobile Web Apps
 
Flutter session 01
Flutter session 01Flutter session 01
Flutter session 01
 
Flutter
FlutterFlutter
Flutter
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The Basics
 
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...
 
Android app development
Android app developmentAndroid app development
Android app development
 
Introduction to android testing
Introduction to android testingIntroduction to android testing
Introduction to android testing
 
Introduction to Mobile Application Development
Introduction to Mobile Application DevelopmentIntroduction to Mobile Application Development
Introduction to Mobile Application Development
 
Flutter
FlutterFlutter
Flutter
 
Native, Web or Hybrid Mobile App Development?
Native, Web or Hybrid Mobile App Development?Native, Web or Hybrid Mobile App Development?
Native, Web or Hybrid Mobile App Development?
 
Development of Mobile Application -PPT
Development of Mobile Application -PPTDevelopment of Mobile Application -PPT
Development of Mobile Application -PPT
 
Hybrid mobile app
Hybrid mobile appHybrid mobile app
Hybrid mobile app
 
Android app development ppt
Android app development pptAndroid app development ppt
Android app development ppt
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
iOS Development - A Beginner Guide
iOS Development - A Beginner GuideiOS Development - A Beginner Guide
iOS Development - A Beginner Guide
 
Introduction to flutter
Introduction to flutter Introduction to flutter
Introduction to flutter
 

Viewers also liked

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
 

Viewers also liked (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
 

Similar to 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
 

Similar to 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
 

More from 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
 

Recently uploaded

ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 

Recently uploaded (20)

ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 

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.