SlideShare uma empresa Scribd logo
1 de 30
Developing iphone application's


        Using Xcode to build iOS apps.




                                         By KRISH
Install Xcode

 Join   the iPhone Developer Program
 Download   the lastest version of the iOS (5)
  SDK along with the latest version of Xcode
  from https://developer.apple.com/
 In
   this case, the version of Xcode 4.2
  which includes iOS sdk 5.0
Click on the iOS Dev Center
Download Xcode and iphone
           SDK
Double click on downloaded Xcode Package to
                start the installation.




Install Xcode on your computer
 Aftersuccessfully installed Xcode and
  iphone SDK.
 Launch Xcode from
  /Developer/Application/Xcode




Running Xcode on your computer
Steps

   Choose File > New > New Project.

   Select the project template for your
   iOS or Mac OS X product, and click
   Next.

   Enter the product name and other
   project details, and click Next.

   Specify the project’s location in your
   file system, and click Create.




     Creating a new Project
From the screen appears, choose
create a new Xcode project
Or by choosing New Project from the
File menu at any time
Then choose Template application, pick product from
IOS
Enter the product name and other project details, and click
                         Next.
Specify the project’s location in your file system,



                and click Create.




                     Navigate to a place where you
                     want to keep your project
                     Save as ,the name of the project
                     Click Save



                                 Optional GIT
                                 Source Control if
                                 required check the
                                 box
Click Run
To check
            The project is created
Running a project from Xcode
The Application Life Cycleapplicationthe cycle
                                          The
                                             constitutes
                                                         life

                                                                             sequence of events that
                                                                             occurs between the
                                                                             launch and termination
                                                                             of your application.In
                                                                             iOS, the user launches
                                                                             your application by
                                                                             tapping its icon on the
                                                                             Home screen. Shortly
                                                                             after the tap occurs, the
                                                                             system displays some
                                                                             transitional graphics
                                                                             and proceeds to launch
                                                                             your application by
                                                                             calling its main function.
                                                                             From this point on, the
                                                                             bulk of the initialization
                                                                             work is handed over to
                                                                             UIKit, which loads the
                                                                             application’s user
                                                                             interface and readies its
                                                                             event loop.

This diagram shows the sequence of events that occur from the time the application starts up to the
time it quits. At key points in the application’s life, UIKit sends messages to the application delegate
object to let it know what is happening. During the event loop, UIKit dispatches events to your
application’s custom event handlers.

            The Application Delegate
 Monitoring the high-level behavior of your application is the
responsibility of the application delegate object, which is a custom
object that you provide.

 Delegation is a mechanism used to avoid subclassing complex
UIKit objects, such as the default UIApplication object. Instead of
subclassing and overriding methods, you use the complex object
unmodified and put your custom code inside the delegate object.

  As interesting events occur, the complex object sends messages
to your delegate object.

  We can use these “hooks” to execute your custom code and
implement the behavior you need.

 The application delegate object is responsible for handling
several critical system messages and must be present in every
iOS application.

 The object can be an instance of any class you like, as long as it
App States

       Not running State: The app has not been launched or was running but was terminated
       by the system.

       Inactive state: The app is running in the foreground but is currently not receiving events.
       (It may be executing other code though.) An app usually stays in this state only briefly as
       it transitions to a different state. The only time it stays inactive for any period of time is
       when the user locks the screen or the system prompts the user to respond to some event,
       such as an incoming phone call or SMS message.

       Active state: The app is running in the foreground and is receiving events. This is the
       normal mode for foreground apps.

       Background state: The app is in the background and executing code. Most apps enter
       this state briefly on their way to being suspended. However, an app that requests extra
       execution time may remain in this state for a period of time. In addition, an app being
       launched directly into the background enters this state instead of the inactive state. For
       information about how to execute code while in the background, see “Background
       Execution and Multitasking.”

       Suspended state:The app is in the background but is not executing code. The system
       moves apps to this state automatically and does not notify them before doing so. While
       suspended, an app remains in memory but does not execute any code. When a low-
    Applications running in iOS 4 and latersystemin one purge suspendedstates at any given time. make
       memory condition occurs, the can be may of several different apps without notice to
       more space for the foreground app.
Launching into the active state
Moving from the foreground to the
          background
1. The system detects an incoming
                      phone call or SMS message, or a
                      calendar event occurs.
                      2. The system calls your application
                      delegate’sapplicationWillResignActive:
                      method. The system
                      also disables the delivery of touch
                      events to your application.
                      3. The system displays an alert panel
                      with information about the event. The
                      user can choose to ignore the event or
                      respond to it.
                      4. If the user ignores the event, the
                      system calls your application delegate’s
                      applicationDidBecomeActive: method
                      and resumes the delivery of touch
                      events to your application.
                      5. If the user responds to the event
                      instead of ignoring it, the system calls
                      your application delegate’s
                      applicationDidEnterBackground: method.
                      Your application should move to the
                      background as usual, saving any user
                      data or contextual information needed to
                      restore your application to its current
                      state later.



Handling application interruptions
Event-Handling System
The pattern defines not only the roles objects play
  in the application, it defines the way objects
  communicate with each other.
MVC is central to a good design for a Cocoa
 application.




             Model-View-Controller
View controllers are a vital link between an app’s
data and its visual appearance. Whenever an iOS app
displays a user interface, the displayed content is
managed by a view controller or a group of view
controllers coordinating with each other. Therefore,
view controllers provide the skeletal framework on
which you build your apps.
     iOS provides many built-in view controller classes
to support standard user interface pieces, such as
navigation and tab bars. As part of developing an app,
you also implement one or more custom controllers to
display the content specific to your app.



              About View Controllers
view objects are the main way your application interacts with the user,
they have many responsibilities.Here are just a few:
                  
                   Layout and subview management.
                      
                       Drawing and animation
                           
                             Event handling




                      About Views
 Layered views in the Clock application
 View autoresizing mask constants
Demo
Questions?
Thanks

Mais conteúdo relacionado

Destaque

Social media analytics as a service: tools from GATE
Social media analytics as a service: tools from GATESocial media analytics as a service: tools from GATE
Social media analytics as a service: tools from GATEDiana Maynard
 
iOS Platform & Architecture
iOS Platform & ArchitectureiOS Platform & Architecture
iOS Platform & Architecturekrishguttha
 
Do we really know what people mean when they tweet?
Do we really know what people mean when they tweet?Do we really know what people mean when they tweet?
Do we really know what people mean when they tweet?Diana Maynard
 
Practical Opinion Mining for Social Media
Practical Opinion Mining for Social MediaPractical Opinion Mining for Social Media
Practical Opinion Mining for Social MediaDiana Maynard
 
Text Analysis and Semantic Search with GATE
Text Analysis and Semantic Search with GATEText Analysis and Semantic Search with GATE
Text Analysis and Semantic Search with GATEDiana Maynard
 
Multimodal opinion mining from social media
Multimodal opinion mining from social mediaMultimodal opinion mining from social media
Multimodal opinion mining from social mediaDiana Maynard
 
Disability and Adventure Travel: the Double-Edged Sword
Disability and Adventure Travel: the Double-Edged SwordDisability and Adventure Travel: the Double-Edged Sword
Disability and Adventure Travel: the Double-Edged SwordDiana Maynard
 
Automotive air conditioning system chapter 1
Automotive air conditioning system chapter 1Automotive air conditioning system chapter 1
Automotive air conditioning system chapter 1norsyukriah
 

Destaque (9)

Social media analytics as a service: tools from GATE
Social media analytics as a service: tools from GATESocial media analytics as a service: tools from GATE
Social media analytics as a service: tools from GATE
 
iOS Platform & Architecture
iOS Platform & ArchitectureiOS Platform & Architecture
iOS Platform & Architecture
 
Do we really know what people mean when they tweet?
Do we really know what people mean when they tweet?Do we really know what people mean when they tweet?
Do we really know what people mean when they tweet?
 
Practical Opinion Mining for Social Media
Practical Opinion Mining for Social MediaPractical Opinion Mining for Social Media
Practical Opinion Mining for Social Media
 
Text Analysis and Semantic Search with GATE
Text Analysis and Semantic Search with GATEText Analysis and Semantic Search with GATE
Text Analysis and Semantic Search with GATE
 
Multimodal opinion mining from social media
Multimodal opinion mining from social mediaMultimodal opinion mining from social media
Multimodal opinion mining from social media
 
Disability and Adventure Travel: the Double-Edged Sword
Disability and Adventure Travel: the Double-Edged SwordDisability and Adventure Travel: the Double-Edged Sword
Disability and Adventure Travel: the Double-Edged Sword
 
Automotive air conditioning system chapter 1
Automotive air conditioning system chapter 1Automotive air conditioning system chapter 1
Automotive air conditioning system chapter 1
 
Su, ao vt 13
Su, ao vt 13Su, ao vt 13
Su, ao vt 13
 

Último

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Último (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Getting started with Xocde & iPhone development

  • 1. Developing iphone application's Using Xcode to build iOS apps. By KRISH
  • 2. Install Xcode  Join the iPhone Developer Program  Download the lastest version of the iOS (5) SDK along with the latest version of Xcode from https://developer.apple.com/  In this case, the version of Xcode 4.2 which includes iOS sdk 5.0
  • 3. Click on the iOS Dev Center
  • 4. Download Xcode and iphone SDK
  • 5. Double click on downloaded Xcode Package to start the installation. Install Xcode on your computer
  • 6.  Aftersuccessfully installed Xcode and iphone SDK.  Launch Xcode from /Developer/Application/Xcode Running Xcode on your computer
  • 7. Steps  Choose File > New > New Project.  Select the project template for your iOS or Mac OS X product, and click Next.  Enter the product name and other project details, and click Next.  Specify the project’s location in your file system, and click Create. Creating a new Project
  • 8. From the screen appears, choose create a new Xcode project
  • 9. Or by choosing New Project from the File menu at any time
  • 10. Then choose Template application, pick product from IOS
  • 11. Enter the product name and other project details, and click Next.
  • 12. Specify the project’s location in your file system,  and click Create. Navigate to a place where you want to keep your project Save as ,the name of the project Click Save Optional GIT Source Control if required check the box
  • 13. Click Run To check The project is created
  • 14. Running a project from Xcode
  • 15. The Application Life Cycleapplicationthe cycle The constitutes life sequence of events that occurs between the launch and termination of your application.In iOS, the user launches your application by tapping its icon on the Home screen. Shortly after the tap occurs, the system displays some transitional graphics and proceeds to launch your application by calling its main function. From this point on, the bulk of the initialization work is handed over to UIKit, which loads the application’s user interface and readies its event loop. This diagram shows the sequence of events that occur from the time the application starts up to the time it quits. At key points in the application’s life, UIKit sends messages to the application delegate object to let it know what is happening. During the event loop, UIKit dispatches events to your application’s custom event handlers.
  • 16. The Application Delegate Monitoring the high-level behavior of your application is the responsibility of the application delegate object, which is a custom object that you provide.  Delegation is a mechanism used to avoid subclassing complex UIKit objects, such as the default UIApplication object. Instead of subclassing and overriding methods, you use the complex object unmodified and put your custom code inside the delegate object.  As interesting events occur, the complex object sends messages to your delegate object.  We can use these “hooks” to execute your custom code and implement the behavior you need.  The application delegate object is responsible for handling several critical system messages and must be present in every iOS application.  The object can be an instance of any class you like, as long as it
  • 17. App States  Not running State: The app has not been launched or was running but was terminated by the system.  Inactive state: The app is running in the foreground but is currently not receiving events. (It may be executing other code though.) An app usually stays in this state only briefly as it transitions to a different state. The only time it stays inactive for any period of time is when the user locks the screen or the system prompts the user to respond to some event, such as an incoming phone call or SMS message.  Active state: The app is running in the foreground and is receiving events. This is the normal mode for foreground apps.  Background state: The app is in the background and executing code. Most apps enter this state briefly on their way to being suspended. However, an app that requests extra execution time may remain in this state for a period of time. In addition, an app being launched directly into the background enters this state instead of the inactive state. For information about how to execute code while in the background, see “Background Execution and Multitasking.”  Suspended state:The app is in the background but is not executing code. The system moves apps to this state automatically and does not notify them before doing so. While suspended, an app remains in memory but does not execute any code. When a low- Applications running in iOS 4 and latersystemin one purge suspendedstates at any given time. make memory condition occurs, the can be may of several different apps without notice to more space for the foreground app.
  • 18. Launching into the active state
  • 19. Moving from the foreground to the background
  • 20. 1. The system detects an incoming phone call or SMS message, or a calendar event occurs. 2. The system calls your application delegate’sapplicationWillResignActive: method. The system also disables the delivery of touch events to your application. 3. The system displays an alert panel with information about the event. The user can choose to ignore the event or respond to it. 4. If the user ignores the event, the system calls your application delegate’s applicationDidBecomeActive: method and resumes the delivery of touch events to your application. 5. If the user responds to the event instead of ignoring it, the system calls your application delegate’s applicationDidEnterBackground: method. Your application should move to the background as usual, saving any user data or contextual information needed to restore your application to its current state later. Handling application interruptions
  • 22. The pattern defines not only the roles objects play in the application, it defines the way objects communicate with each other. MVC is central to a good design for a Cocoa application. Model-View-Controller
  • 23. View controllers are a vital link between an app’s data and its visual appearance. Whenever an iOS app displays a user interface, the displayed content is managed by a view controller or a group of view controllers coordinating with each other. Therefore, view controllers provide the skeletal framework on which you build your apps. iOS provides many built-in view controller classes to support standard user interface pieces, such as navigation and tab bars. As part of developing an app, you also implement one or more custom controllers to display the content specific to your app. About View Controllers
  • 24.
  • 25. view objects are the main way your application interacts with the user, they have many responsibilities.Here are just a few:  Layout and subview management.  Drawing and animation  Event handling About Views
  • 26.  Layered views in the Clock application
  • 28. Demo