SlideShare a Scribd company logo
1 of 25
Download to read offline
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

More Related Content

What's hot

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
 

What's hot (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
 

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

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

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

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

Recently uploaded

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
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
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
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
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

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