SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
Xcode
Basics and Beyond



    cocoaheads.be
Foreword
• The goals of this talk are
  • to give some starting points
  • to present somewhat more specific details of interest


• It is not an exhaustive presentation of Xcode

• For more information on a specific subject, please
 refer to any of the following:
  • Documentation
  • Mailing Lists / Forums
  • Google
Background
• What is Xcode?
  • Appleʼs IDE for Mac and iPhone/iPad development
• History
  • Roots in NeXTStep, late 80ʼs, early 90ʼs (PB)
  • Introduced in 2003, as a replacement for good old Project
    Builder
  • Evolves over time, now at version 3.2 (April 2010)
• How to get it?
  • Comes with Snow Leopard DVD
  • Available for free from ADC (online registration)
Main Features
• Build System (~Makefile)
  • dependencies, command-line, distributed build across
    network, configuration of app targets, compiler integration...
• Source Code Editor
  • Code completion and coloring, symbol indexing,
    navigation, ...
• Debugger
  • Tight gdb integration, step by step, runtime variable
    inspection, remote debug...
• Documentation
  • Contextual help, guides, reference.
• Organizer
  • Projects repository + Device browser
Basics
Introduction
• What is an App? (developer point of view)
                                MyApp.app/
                                 Contents/
                                  MacOS/
                                     MyApp
                        B         Resources/
                        U            MyApp.icns
                        I            image1.tiff
                        L            en.lproj/
                        D                MainWindow.nib
                                     fr.lproj/
                                         MainWindow.nib
Creating an App: Fast Start
• Keep head out of water, dive only when needed.
• Create a Project from a Template
  • Many pre-configured project. Use them as starting point.




• Build and Run. There you go.
Xcode Project
• Anatomy of an Xcode project


      Target A: Framework            Target B: Application

              Sources                        Sources
             .m, .h, .py                    .m, .h, .py

              Resources                      Resources
      .tiff, .aiff, .png, .strings   .tiff, .aiff, .png, .strings
                    etc.                           etc.
Targets
• You need one to build an app, framework, library
• Basically, a target keeps track of
  • all needed files (sources, resources),
  • external library dependencies,
  • settings to build
• A target is composed of “Build Phases”
  • Sequence of operation to create a product
     • Compile sources + Link
     • Copy resources in app bundle
     • etc.
Build Settings
• Configuration of target, compiler, linker settings...
• Inheritance (order is important)
  • Command Line
  • Target
  • Project
• 2 Common Configurations: Debug & Release
  • Debug
     • Removes code optimization (runs slower)
     • Debugging symbols
     • Builds only one architecture
  • Release
     • Optimizes code (runs faster)
     • Removes debugging symbols
     • Builds as universal binary
  • Define new ones for iPhone (Ad Hoc, App Store Distribution)
Demo #1
Beyond Basics
Focus on Efficiency
• Make all you can to be productive.

• Efficient Navigation (Key / Mouse)
• Code Reuse through Cross Project Depʼs
• Editor Scripts
• Config Files
• Smart Debugging
• Task Automation
Efficient Navigation
• Keyboard Navigation
  •   Cmd-Double-Click, Opt-Double-Click: go to def. / go to doc.
  •   Cmd-0: Project window
  •   Cmd-Shift-E: Maximize Editor
  •   Cmd-B: Build, Cmd-Shift-B: Show build results
  •   Cmd-R: Run, Cmd-Shift-R: Show run window
  •   Cmd-Y: Debug, Cmd-Shift-Y: Show debugger
  •   Cmd-Ctrl-O: Show Organizer Window
  •   Opt-Cmd-Up: switch to header/source
  •   Cmd-=: Next Warning/Error
  •   Cmd-`: Next Window
Efficient Navigation
• You can customize Xcode shortcuts in the Prefs

• Custom Shortcuts
  • Cmd-T: Open Quickly (same as Text Mate)
     • then type file name or function name !
  • ESC: complete, Opt-ESC: code sense complete
     • then F1 to move cursor to arg
  • Opt-Cmd-Left/Right: previous/next focus point (+Ctrl for file)
  • Opt-Cmd-Down: Pop Symbol PopUp (alphabetically sorted !)
Demo #2
Code Re-use
• Your project may depend on another. Example:
  • Framework: CompanyBase.framework
     • Has common categories to Cocoa types
     • Handles license and About Panels
     • ...
  • App1, App2 depend on CompanyBase.framework


• To get it to build automatically then:
  • Import CompanyBase.xcodeproj into App1.xcodeproj
  • Setup target dependency + link + copy build phase

• Configuration names (Debug, Release) are passed along
Demo #3
Smart Debugging
• Interactive Debugger
  • Step by step, variable inspection (hover)
• gdb command invocation
  • po, print, call
  • Useful: apropos word, help command
• Fix and Continue (Mac only!)
  • Change code while program is running
  • No need to restart
• Customizing variable display: Data Formatters
  • Ex: x={$VAR.translation[0]}:v, y={$VAR.translation[1]}:v
  • This is global
  • To revert to original, just delete your stuff
Demo #4
Task Automation
• The main idea is:
  ★ “Fix a bug, then deploy your app with 3 mouse clicks”


• Wouldnʼt it be great if you could automatically
  •   remove headers of embedded framework
  •   prepare signed zip (Sparkle)
  •   have embedded PSDs converted to PNG
  •   encrypt embedded Core Image kernels
  •   upload your app to the server and deploy it


• Well, you can.
Demo #5 (last one)
Happy (X)coding !


web: 	

 	

 www.creaceed.com
email: 	

	

 raphael@creaceed.com
                                     cocoaheads.be
twitter: 	

 @rsebbe

Contenu connexe

Tendances

An overview of mobile html + java script frameworks
An overview of mobile html + java script frameworksAn overview of mobile html + java script frameworks
An overview of mobile html + java script frameworksSasha dos Santos
 
iOS Coding Best Practices
iOS Coding Best PracticesiOS Coding Best Practices
iOS Coding Best PracticesJean-Luc David
 
Pentesting iOS Apps - Runtime Analysis and Manipulation
Pentesting iOS Apps - Runtime Analysis and ManipulationPentesting iOS Apps - Runtime Analysis and Manipulation
Pentesting iOS Apps - Runtime Analysis and ManipulationAndreas Kurtz
 
ios-mobile-app-development-intro
ios-mobile-app-development-introios-mobile-app-development-intro
ios-mobile-app-development-introRemesh Govind M
 
Lesson 02 - React Native Development Environment Setup
Lesson 02 - React Native Development Environment SetupLesson 02 - React Native Development Environment Setup
Lesson 02 - React Native Development Environment SetupUniversity of Catania
 
FirefoxOS and its use of Linux (a deep dive into Gonk architecture)
FirefoxOS and its use of Linux (a deep dive into Gonk architecture)FirefoxOS and its use of Linux (a deep dive into Gonk architecture)
FirefoxOS and its use of Linux (a deep dive into Gonk architecture)Aimee Maree Forsstrom
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application SecurityEgor Tolstoy
 
App forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with IonicApp forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with Ionicrobgalvinjr
 
Xamarin forms introduction by Taswar Bhatti and Ahmed Assad
Xamarin forms introduction by Taswar Bhatti and Ahmed AssadXamarin forms introduction by Taswar Bhatti and Ahmed Assad
Xamarin forms introduction by Taswar Bhatti and Ahmed AssadTaswar Bhatti
 
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
 
Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript Serge van den Oever
 
IONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App DevelopmentIONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App DevelopmentMalan Amarasinghe
 
Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1Purvik Rana
 

Tendances (20)

An overview of mobile html + java script frameworks
An overview of mobile html + java script frameworksAn overview of mobile html + java script frameworks
An overview of mobile html + java script frameworks
 
iOS Coding Best Practices
iOS Coding Best PracticesiOS Coding Best Practices
iOS Coding Best Practices
 
Pentesting iOS Apps - Runtime Analysis and Manipulation
Pentesting iOS Apps - Runtime Analysis and ManipulationPentesting iOS Apps - Runtime Analysis and Manipulation
Pentesting iOS Apps - Runtime Analysis and Manipulation
 
ios-mobile-app-development-intro
ios-mobile-app-development-introios-mobile-app-development-intro
ios-mobile-app-development-intro
 
How to become iPhone developer
How to become iPhone developerHow to become iPhone developer
How to become iPhone developer
 
Lesson 02 - React Native Development Environment Setup
Lesson 02 - React Native Development Environment SetupLesson 02 - React Native Development Environment Setup
Lesson 02 - React Native Development Environment Setup
 
FirefoxOS and its use of Linux (a deep dive into Gonk architecture)
FirefoxOS and its use of Linux (a deep dive into Gonk architecture)FirefoxOS and its use of Linux (a deep dive into Gonk architecture)
FirefoxOS and its use of Linux (a deep dive into Gonk architecture)
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
 
App forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with IonicApp forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with Ionic
 
PDE builds or Maven
PDE builds or MavenPDE builds or Maven
PDE builds or Maven
 
Xamarin forms introduction by Taswar Bhatti and Ahmed Assad
Xamarin forms introduction by Taswar Bhatti and Ahmed AssadXamarin forms introduction by Taswar Bhatti and Ahmed Assad
Xamarin forms introduction by Taswar Bhatti and Ahmed Assad
 
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
 
Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript
 
Firefox os
Firefox osFirefox os
Firefox os
 
Firefox os ppt
Firefox os pptFirefox os ppt
Firefox os ppt
 
IONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App DevelopmentIONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App Development
 
Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1
 
Cross-Platform Development
Cross-Platform DevelopmentCross-Platform Development
Cross-Platform Development
 
Presentation1
Presentation1Presentation1
Presentation1
 
Android - Anroid Pproject
Android - Anroid PprojectAndroid - Anroid Pproject
Android - Anroid Pproject
 

Similaire à Xcode, Basics and Beyond

iPhone Development Tools
iPhone Development ToolsiPhone Development Tools
iPhone Development ToolsOmar Cafini
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
Mobeers waterloo-2011
Mobeers waterloo-2011Mobeers waterloo-2011
Mobeers waterloo-2011Brian LeRoux
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformAndrew Ferrier
 
ChrisSchilling_SideProjects
ChrisSchilling_SideProjectsChrisSchilling_SideProjects
ChrisSchilling_SideProjectsChris Schilling
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsJohn M. Wargo
 
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
 
Doug McCune - Using Open Source Flex and ActionScript Projects
Doug McCune - Using Open Source Flex and ActionScript ProjectsDoug McCune - Using Open Source Flex and ActionScript Projects
Doug McCune - Using Open Source Flex and ActionScript ProjectsDoug McCune
 
The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012Jan Jongboom
 
Next Step, Android Studio!
Next Step, Android Studio!Next Step, Android Studio!
Next Step, Android Studio!Édipo Souza
 
Mobile Fest 2018. Алексей Лизенко. Make your project great again
Mobile Fest 2018. Алексей Лизенко. Make your project great againMobile Fest 2018. Алексей Лизенко. Make your project great again
Mobile Fest 2018. Алексей Лизенко. Make your project great againMobileFest2018
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...Heiko Voigt
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesAndy_Gaskell
 
Neev Open Source Contributions
Neev Open Source ContributionsNeev Open Source Contributions
Neev Open Source ContributionsNeev Technologies
 
Rise of the hybrids
Rise of the hybridsRise of the hybrids
Rise of the hybridsOron Ben Zvi
 

Similaire à Xcode, Basics and Beyond (20)

iPhone Development Tools
iPhone Development ToolsiPhone Development Tools
iPhone Development Tools
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Mobeers waterloo-2011
Mobeers waterloo-2011Mobeers waterloo-2011
Mobeers waterloo-2011
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst Platform
 
ChrisSchilling_SideProjects
ChrisSchilling_SideProjectsChrisSchilling_SideProjects
ChrisSchilling_SideProjects
 
Zend Code in ZF 2.0
Zend Code in ZF 2.0Zend Code in ZF 2.0
Zend Code in ZF 2.0
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile Apps
 
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
 
Doug McCune - Using Open Source Flex and ActionScript Projects
Doug McCune - Using Open Source Flex and ActionScript ProjectsDoug McCune - Using Open Source Flex and ActionScript Projects
Doug McCune - Using Open Source Flex and ActionScript Projects
 
The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012
 
iOS Application Exploitation
iOS Application ExploitationiOS Application Exploitation
iOS Application Exploitation
 
Next Step, Android Studio!
Next Step, Android Studio!Next Step, Android Studio!
Next Step, Android Studio!
 
React nativebeginner1
React nativebeginner1React nativebeginner1
React nativebeginner1
 
Xamarin v.Now
Xamarin v.NowXamarin v.Now
Xamarin v.Now
 
Mobile Fest 2018. Алексей Лизенко. Make your project great again
Mobile Fest 2018. Алексей Лизенко. Make your project great againMobile Fest 2018. Алексей Лизенко. Make your project great again
Mobile Fest 2018. Алексей Лизенко. Make your project great again
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiences
 
Neev Open Source Contributions
Neev Open Source ContributionsNeev Open Source Contributions
Neev Open Source Contributions
 
Rise of the hybrids
Rise of the hybridsRise of the hybrids
Rise of the hybrids
 
Citibank
CitibankCitibank
Citibank
 

Plus de rsebbe

Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Codersebbe
 
Advanced Imaging on iOS
Advanced Imaging on iOSAdvanced Imaging on iOS
Advanced Imaging on iOSrsebbe
 
iOS 7 URL Session & Motion FX APIs
iOS 7 URL Session & Motion FX APIsiOS 7 URL Session & Motion FX APIs
iOS 7 URL Session & Motion FX APIsrsebbe
 
CeedMath & CeedGL, Let's talk 3D...
CeedMath & CeedGL, Let's talk 3D...CeedMath & CeedGL, Let's talk 3D...
CeedMath & CeedGL, Let's talk 3D...rsebbe
 
Blocks & GCD
Blocks & GCDBlocks & GCD
Blocks & GCDrsebbe
 
Designing an Objective-C Framework about 3D
Designing an Objective-C Framework about 3DDesigning an Objective-C Framework about 3D
Designing an Objective-C Framework about 3Drsebbe
 
Computer-aided Diagnosis of Pulmonary Embolism in Opacified CT Images
Computer-aided Diagnosis of Pulmonary Embolism in Opacified CT ImagesComputer-aided Diagnosis of Pulmonary Embolism in Opacified CT Images
Computer-aided Diagnosis of Pulmonary Embolism in Opacified CT Imagesrsebbe
 

Plus de rsebbe (7)

Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Code
 
Advanced Imaging on iOS
Advanced Imaging on iOSAdvanced Imaging on iOS
Advanced Imaging on iOS
 
iOS 7 URL Session & Motion FX APIs
iOS 7 URL Session & Motion FX APIsiOS 7 URL Session & Motion FX APIs
iOS 7 URL Session & Motion FX APIs
 
CeedMath & CeedGL, Let's talk 3D...
CeedMath & CeedGL, Let's talk 3D...CeedMath & CeedGL, Let's talk 3D...
CeedMath & CeedGL, Let's talk 3D...
 
Blocks & GCD
Blocks & GCDBlocks & GCD
Blocks & GCD
 
Designing an Objective-C Framework about 3D
Designing an Objective-C Framework about 3DDesigning an Objective-C Framework about 3D
Designing an Objective-C Framework about 3D
 
Computer-aided Diagnosis of Pulmonary Embolism in Opacified CT Images
Computer-aided Diagnosis of Pulmonary Embolism in Opacified CT ImagesComputer-aided Diagnosis of Pulmonary Embolism in Opacified CT Images
Computer-aided Diagnosis of Pulmonary Embolism in Opacified CT Images
 

Dernier

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 

Dernier (20)

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 

Xcode, Basics and Beyond

  • 1. Xcode Basics and Beyond cocoaheads.be
  • 2. Foreword • The goals of this talk are • to give some starting points • to present somewhat more specific details of interest • It is not an exhaustive presentation of Xcode • For more information on a specific subject, please refer to any of the following: • Documentation • Mailing Lists / Forums • Google
  • 3. Background • What is Xcode? • Appleʼs IDE for Mac and iPhone/iPad development • History • Roots in NeXTStep, late 80ʼs, early 90ʼs (PB) • Introduced in 2003, as a replacement for good old Project Builder • Evolves over time, now at version 3.2 (April 2010) • How to get it? • Comes with Snow Leopard DVD • Available for free from ADC (online registration)
  • 4. Main Features • Build System (~Makefile) • dependencies, command-line, distributed build across network, configuration of app targets, compiler integration... • Source Code Editor • Code completion and coloring, symbol indexing, navigation, ... • Debugger • Tight gdb integration, step by step, runtime variable inspection, remote debug... • Documentation • Contextual help, guides, reference. • Organizer • Projects repository + Device browser
  • 6. Introduction • What is an App? (developer point of view) MyApp.app/ Contents/ MacOS/ MyApp B Resources/ U MyApp.icns I image1.tiff L en.lproj/ D MainWindow.nib fr.lproj/ MainWindow.nib
  • 7. Creating an App: Fast Start • Keep head out of water, dive only when needed. • Create a Project from a Template • Many pre-configured project. Use them as starting point. • Build and Run. There you go.
  • 8.
  • 9. Xcode Project • Anatomy of an Xcode project Target A: Framework Target B: Application Sources Sources .m, .h, .py .m, .h, .py Resources Resources .tiff, .aiff, .png, .strings .tiff, .aiff, .png, .strings etc. etc.
  • 10. Targets • You need one to build an app, framework, library • Basically, a target keeps track of • all needed files (sources, resources), • external library dependencies, • settings to build • A target is composed of “Build Phases” • Sequence of operation to create a product • Compile sources + Link • Copy resources in app bundle • etc.
  • 11. Build Settings • Configuration of target, compiler, linker settings... • Inheritance (order is important) • Command Line • Target • Project • 2 Common Configurations: Debug & Release • Debug • Removes code optimization (runs slower) • Debugging symbols • Builds only one architecture • Release • Optimizes code (runs faster) • Removes debugging symbols • Builds as universal binary • Define new ones for iPhone (Ad Hoc, App Store Distribution)
  • 12.
  • 15. Focus on Efficiency • Make all you can to be productive. • Efficient Navigation (Key / Mouse) • Code Reuse through Cross Project Depʼs • Editor Scripts • Config Files • Smart Debugging • Task Automation
  • 16. Efficient Navigation • Keyboard Navigation • Cmd-Double-Click, Opt-Double-Click: go to def. / go to doc. • Cmd-0: Project window • Cmd-Shift-E: Maximize Editor • Cmd-B: Build, Cmd-Shift-B: Show build results • Cmd-R: Run, Cmd-Shift-R: Show run window • Cmd-Y: Debug, Cmd-Shift-Y: Show debugger • Cmd-Ctrl-O: Show Organizer Window • Opt-Cmd-Up: switch to header/source • Cmd-=: Next Warning/Error • Cmd-`: Next Window
  • 17. Efficient Navigation • You can customize Xcode shortcuts in the Prefs • Custom Shortcuts • Cmd-T: Open Quickly (same as Text Mate) • then type file name or function name ! • ESC: complete, Opt-ESC: code sense complete • then F1 to move cursor to arg • Opt-Cmd-Left/Right: previous/next focus point (+Ctrl for file) • Opt-Cmd-Down: Pop Symbol PopUp (alphabetically sorted !)
  • 19. Code Re-use • Your project may depend on another. Example: • Framework: CompanyBase.framework • Has common categories to Cocoa types • Handles license and About Panels • ... • App1, App2 depend on CompanyBase.framework • To get it to build automatically then: • Import CompanyBase.xcodeproj into App1.xcodeproj • Setup target dependency + link + copy build phase • Configuration names (Debug, Release) are passed along
  • 21. Smart Debugging • Interactive Debugger • Step by step, variable inspection (hover) • gdb command invocation • po, print, call • Useful: apropos word, help command • Fix and Continue (Mac only!) • Change code while program is running • No need to restart • Customizing variable display: Data Formatters • Ex: x={$VAR.translation[0]}:v, y={$VAR.translation[1]}:v • This is global • To revert to original, just delete your stuff
  • 23. Task Automation • The main idea is: ★ “Fix a bug, then deploy your app with 3 mouse clicks” • Wouldnʼt it be great if you could automatically • remove headers of embedded framework • prepare signed zip (Sparkle) • have embedded PSDs converted to PNG • encrypt embedded Core Image kernels • upload your app to the server and deploy it • Well, you can.
  • 25. Happy (X)coding ! web: www.creaceed.com email: raphael@creaceed.com cocoaheads.be twitter: @rsebbe