SlideShare una empresa de Scribd logo
1 de 25
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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 a 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 a 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
 

Más 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
 

Más 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
 

Último

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Último (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

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