Xcode 4Tout en douceur
David Bonnet - Mai 2011
• Session CocoaHeads de Paris :
«Hello Xcode 4» du 14 Avril 2011
• Apple : «Xcode 4 - Transition Guide»
• Apple WWDC 2010 :
«Session 307 Introducing Xcode4»
«Session 312 What’s new in the LLVM Compiler»
«Session 313 LLVM Technologies in Depth»
• Retour d’expérience
CarMusic
iPod avec des gestes intuitifs
CarMusic
Lancement de toute votre bibliothèque en aléatoire d’un simple toucher
Navigation sur l’album en cours de lecture en glissant vers le haut ou le bas
AirPlay et compatibilité avec les Docks
Xcode 4
Schemes
Interface Builder Intégré
LLVM 2.0
Workspaces
SCM
Nouveau Debugger
Fenêtre Unique
Fix-It Issues
Onglets
Templates
Recherche avancée
Fenêtre Utilitaire
Navigateur
Live Issues
Editeur de Versions
AssistantInstruments
Xcode 4
Xcode 4 - Preview ?
Bonus #1Déinstallation «propre»
sudo <Developer>/Library/uninstall-devtools --mode=xcodedir
Où <Developer> est l’emplacement d’installation du SDK
Bonus #1Déinstallation «propre»
sudo <Developer>/Library/uninstall-devtools --mode=xcodedir
Où <Developer> est l’emplacement d’installation du SDK
sudo mv <Developer> /Xcode3
les plus de ce nouveau joujou...
Editeur
Navigateur
Navigateur
Editeur
Navigateur
Navigateur
Editeur
Navigateur
Navigateur
Editeur
Deboggeur
Deboggeur
Editeur
Navigateur
Navigateur
Editeur
Deboggeur
Deboggeur
Editeur
Navigateur
Navigateur
Editeur
Deboggeur
Deboggeur
Utilitaires
Navigateur
Navigateur
Editeur
Navigateur
Editeur
Utilitaires
Navigateur
Editeur
Deboggeur
Utilitaires
Navigateur
Naviguer parmi vos fichiers
Parcourir les entités
Rechercher
Lister les anomalies
Lister les Threads / Queues
Breakpoints
Commentaires
Les derniers modifiés
Seulement les fichiers avec un statut SCM
Non sauvegardés
Champ de filtrage
Ajouter un fichier
Editeur
Editeur standard
Assistant Versions
Affichage ou non des panneaux
Organizer
Assistant
Versions
Versions - Blame
Versions - Liste
Interface Builder
Défauts ?
Incompatible avec les anciens plugins
Encore très lourd à exécuter
Utilitaires
Mais aussi...
Mais aussi...
Démo
Nouvelle application avec Xcode4
de Xcode 3 au dernier né d’Apple...
Configurations
Targets
De Xcode3 à Xcode4
Cross-project Referenceswith Target dependencies
Configurations
Targets
De Xcode3 à Xcode4
Cross-project Referenceswith Target dependencies{A EVITER}
Projet principal
Librairie perso 1
Librairie perso 2
{
Projet Xcode3{project.pbxproj
<user>.pbxuser
<user>.perspectivev3
Projet Xcode3ouvert sous Xcode4
{project.pbxproj
<user>.pbxuser
<user>.perspectivev3
project.xcworkspace
xcuserdata
Projet Xcode3ouvert sous Xcode4
{project.pbxproj
<user>.pbxuser
<user>.perspectivev3
project.xcworkspace
xcuserdata
xcshareddata
Schemes
Schemes {Build
Run
Test
Profile
Analyse
Archive
LLVM et LLDB
GCC
LLVM-GCC
LLVM 2.0
Fix-it Issues with Clang
• Compilation plus rapide
• LLVM Optimizer pour OpenCL (MacOS X)
• Amélioration de 25% pour CoreImage !
• OpenGL et MacRuby sont aussi optimisés
LLVM
GDB ?
• Plus rapide, moins gourmand
• Meilleure intégration avec Xcode
• Basé sur Clang
• Syntaxe plus simple
• Intégration de Python
LLDB Concrètement
Console
Console
Editeur
Console
Editeur
Variables
Console
Editeur
Variables
Threads / Queues
Quelques raccourcis...
Xcode 4 Keyboard Shortcuts
Xcode App Shortcuts
⌘, ⌘H ⌥⌘H ⌘Q
File
⌘T⇧⌘T
⌘N⇧⌘N⌃⌘N⌥⌘N⌥⌘A ⌘O⇧⌘O⌃⌘O
⌘W ⌥⌘W ⇧⌘W⌥⇧⌘W⌃⌘W
⌘S ⌥⌘S⌥⇧⌘S ⇧⌘S⌥⌘C ⌥⌘X
⌃⌥⌘X⌃⌘S⇧⌘P⌘P
Edit ⌘Z ⇧⌘Z ⌘X
⌘C ⌘V⌥⌘V
⌥⇧⌘V⌘D
⌘A⇧⌘F
⌥⇧⌘F⌘F
⌥⌘F⌘G
⇧⌘G⌘E
⇧⌘E⌥⌘J⌥⌘L
⌃⇧⌘T⌘:
View ⌘1⌘2⌘3⌘4⌘5⌘6⌘7⌘0⌘↩
⌥⌘↩⌥⇧⌘↩
⌃1⌃2
⌃⌘2⌃3
⌃⌘3⌃4⌃5⌃6⌃7
⌃⇧⌘W⌥⇧⌘Z⇧⌘Y
Created by Colin Wheeler 2/25/08Updated 3/9/2011 for [email protected]
PreferencesHide XcodeHide OthersQuit Xcode
New TabNew Window
New FileNew Project
New WorkspaceNew Group
Add FilesOpen
Open Quickly...Open This Quickly...
Close WindowClose All Windows
Close TabClose Other TabsClose Document
SaveSave All
Save MultipleSave As
Commit...Update....Update All
Create SnapshotPage Setup
UndoRedo
CutCopyPaste
Paste SpecialPaste and Match Style
DuplicateSelect All
Find in Workspace...Find & Replace in Workspace...
FindFind and Replace...
Find NextFind Previous
Use Selection for FindUse Selection for Replace
Filter in NavigatorFilter in Library
Show FontsShow Spelling & Grammar
ProjectSymbolSearch
IssueDebug
BreakpointLog
Show NavigatorStandardAssistant
VersionShow Related Items
Show Previous HistoryShow Previous Files History
Show Next HistoryShow Next Files History
Show Top Level ItemsShow Group Files
Show Document ItemsShow Issues
Remove Assistant EditorReset Editor
Show Debug Area
Navigate⇧⌘J⌥⌘,⌥⌘<⌥⌘.⌥⌘>⌘J
⌃⌘→⌃⌥⌘→
⌃⌥⇧⌘→⌃⌘←
⌃⌥⌘←⌃⌥⇧⌘←
⇧⌘L⌃⌘D
⌃⌥⌘D⌃⌥⇧⌘D
⌘'⌃⌘'⌘"
⌃⌘"
Reveal in Project NavigatorOpen In...Open In...
Move Focus to Next AreaMove Focus to Previous Area
Move Focus to Editor...Go Forward
Go Forward (option)Go Forward (shift + option)
Go BackGo Back (option)
Go Back (shift + option)Jump to SelectionJump to Definition
Jump to Definition (option)Jump to Definition (shift + option)
Jump to Next IssueFix Next Issue
Jump to Previous IssueFix Previous Issue
Navigate for Source Code⌃⌘↑
⌃⌥⌘↑⌃⌥⇧⌘↑
⌃⌘↓⌃⌥⌘↓
⌃⌥⇧⌘↓⌘L⌃/⌃?
Jump to Next CounterpartJump to Next Counterpart (option)
Jump to Next Counterpart (shift + option)Jump to Previous Counterpart
Jump to Previous Counterpart (option)Jump to Previous Counterpart (shift + option)
Jump To...Jump to Next Placeholder
Jump to Previous Placeholder
Editor Menu for Data Model⌃⌘A⌃⌘R
Add AttributeAdd Relationship
Editor Menu for Hex⌥⇧⌘OOverwrite Mode
Editor Menu for Interface Builder⌘[⌘]⌘=⌘_⌘|
Align Left EdgesAlign Right Edges
Size to FitAdd Horizontal Guide
Add Vertical Guide
Editor Menu for PDF⌥⌘↓⌥⌘↑
Next PagePrevious Page
Editor Menu for Scripting Definition⌘+⌘-
Make Text BiggerMake Text Smaller
Editor Menu for Source Code⌃Space⌃⌘E⌃⌘F⌃⌘M
⌃I⌘]⌘[
⌥⌘[⌥⌘]⌘/
⌥⌘←⌥⌘→
⌥⇧⌘←⌥⇧⌘→⌃⇧⌘←⌃⇧⌘→
Show CompletionsEdit All in ScopeFix all in ScopeShow All Issues
Re-IndentShift Right
Shift LeftMove Line Up
Move Line DownComment Selection
FoldUnfold
Fold Methods & FunctionsUnfold Methods & Functions
Fold Comment BlocksUnfold Comment Blocks
Product Menu⌘R
⌥⌘R⌘U
⌥⌘U⌘I
⌥⌘I⇧⌘B
⌥⇧⌘B⇧⌘R⇧⌘U⇧⌘I⌃⌘R⌃⌘U⌃⌘I⌘B
⇧⌘K⌥⇧⌘K
⌘.⌃⌘Y
F7F6F8
⌃⇧F7⌃F7
⌃⇧F6⌃F6⌘\⌘Y⌘K⌘<
RunRun...
TestTest...Profile
Profile...Analyze
Analyze...Build for Running
Build for TestingBuild for Profiling
Run Without BuildingTest Without Building
Profile Without BuildingBuild
CleanClean Build Folder...
StopPause
Step IntoStep OverStep Out
Step Into ThreadStep Into Instruction
Step Over ThreadStep Over Instruction
Add Breakpoint at Current LineActivate Breakpoints
Clear ConsoleEdit Scheme...
Window Menu⌘M⌘}⌘{
⇧⌘1⇧⌘2
MinimizeSelect Next Tab
Select Previous TabWelcome to Xcode
Organizer
Help Menu⌥⌘?⌃⌘?⌃⌥⌘/
Documentation and API ReferenceQuick Help for Selected Item
Search Documentation for Selected Text
Code Completion⌃>⌃.
F5, ⌥⎋
Select Previous CompletionSelect Next Completion
Show Completion List
TextMove to Beginning of Document ⌘↑
Move Left ←Move Right Extending Selection ⇧→
Move Backward Extending Selection ⌃⇧BMove Up ⌃P, ↑
Move Down ↓,⌃NMove to Beginning of Paragraph Extending Selection ⌃⇧A
Move Subword Forward Extending Selection ⌃⇧→Move to Beginning of Document Extending Selection ⇧↖,⇧⌘↑
Move Down Extending Selection ⌃⇧N,⇧↓Move word backward extending selection ⌃⌥⇧B
Move word forward extending selection ⌃⌥⇧FMove Subword Forward ⌃→
Move to Beginning of Paragraph ⌃AMove to end of Document extending Selection ⇧⌘↓,⇧↘
Page up Extending Selection ⇧⇞Move Subword Backward ⌃←
Move Word Right ⌥→Move Right →
Move to Right End of Line Extending Selection ⇧⌘→Move Paragraph Backward Extending Selection ⌥⇧↑
Move Word Right Extending Selection ⌥⇧→Move Left Extending Selection ⇧←
Move to Left End of Line Extending Selection ⇧⌘←Move word backward ⌃⌥B
Move to Right End of Line ⌘→Move Backward ⌃B
Move Forward ⌃FMove to Left End of Line ⌘←
Page Down ⌥⇟,⌃VPage Up ⌥⇞
Move up Extending Selection ⇧↑,⌃⇧PMove Forward Extending Selection ⌃⇧F
Move to End of Document ⌘↓Page Down Extending Selection ⇧⇟, ⌃⇧V
Move Word Left ⌥←Move word forward ⌃⌥F
Move Word Left Extending Selection ⌥⇧←Move Subword Backward Extending Selection ⌃⇧←Move Paragraph Forward Extending Selection ⌥⇧↓
Move to end of Paragraph ⌃EMove to end of Paragraph Extending Selection ⌃⇧E
Move Paragraph Backward ⌥↑Move Paragraph Forward ⌥↓
Select to Mark ⌃X⌃MDelete to Mark ⌃W
Set Mark ⌃@Swap with Mark ⌃X⌃X
Yank ⌃YDelete to end of Paragraph ⌃K
Delete Word Forward ⌥⌦Delete Subword Forward ⌃⌦
Delete Forward ⌃D,⌦Delete ClrLn
Delete Subword Backward ⌃⌫Delete to Beginning of Line ⌘⌫
Delete Backward ⌃H,⌫,Delete Word Backward ⌃⌥⌫, ⌥⌫,⌥
Make Text Writing Direction Left to Right ⌃⌥⌘→Make Base Writing Direction Natural ⌃⌘↓
Make Base Writing Direction Right to Left ⌃⌘←Make Text Writing Direction Natural ⌃⌥⌘↓
Make Base Writing Direction Left to Right ⌃⌘→Make Text Writing Direction Right to Left ⌃⌥⌘←
Center Selection of Visible Area ⌃LScroll Page up ⌃↑, ⇞
Scroll to Beginning of Document ↖Scroll Page Down ⇟,⌃↓
Scroll to end of Document ↘Transpose ⌃T
Insert Newline ↩,⌤,Insert Newline and Leave Selection Before It ⌃O
Insert Tab without Extra Action ⌥⇥Insert Double Quote without Extra Action ⌃"
Insert Backtab ⇤Insert Newline without Extra Action ⌥↩,⌥⌤,⌥
Insert Slash ⌃/Insert Single Quote without Extra Action ⌃'
Insert Line Break ⌃↩,⌃⌤,⌃Insert Tab ⇥
Cancel ⎋, ⌘.Select Previous Completion ⌃>
Select Next Completion ⌃.Show Completion List F5, ⌥⎋
Xcode 4 Keyboard Shortcuts
Xcode App Shortcuts
⌘, ⌘H ⌥⌘H ⌘Q
File
⌘T⇧⌘T
⌘N⇧⌘N⌃⌘N⌥⌘N⌥⌘A ⌘O⇧⌘O⌃⌘O
⌘W ⌥⌘W ⇧⌘W⌥⇧⌘W⌃⌘W
⌘S ⌥⌘S⌥⇧⌘S ⇧⌘S⌥⌘C ⌥⌘X
⌃⌥⌘X⌃⌘S⇧⌘P⌘P
Edit ⌘Z ⇧⌘Z ⌘X
⌘C ⌘V⌥⌘V
⌥⇧⌘V⌘D
⌘A⇧⌘F
⌥⇧⌘F⌘F
⌥⌘F⌘G
⇧⌘G⌘E
⇧⌘E⌥⌘J⌥⌘L
⌃⇧⌘T⌘:
View ⌘1⌘2⌘3⌘4⌘5⌘6⌘7⌘0⌘↩
⌥⌘↩⌥⇧⌘↩
⌃1⌃2
⌃⌘2⌃3
⌃⌘3⌃4⌃5⌃6⌃7
⌃⇧⌘W⌥⇧⌘Z⇧⌘Y
Created by Colin Wheeler 2/25/08Updated 3/9/2011 for [email protected]
PreferencesHide XcodeHide OthersQuit Xcode
New TabNew Window
New FileNew Project
New WorkspaceNew Group
Add FilesOpen
Open Quickly...Open This Quickly...
Close WindowClose All Windows
Close TabClose Other TabsClose Document
SaveSave All
Save MultipleSave As
Commit...Update....Update All
Create SnapshotPage Setup
UndoRedo
CutCopyPaste
Paste SpecialPaste and Match Style
DuplicateSelect All
Find in Workspace...Find & Replace in Workspace...
FindFind and Replace...
Find NextFind Previous
Use Selection for FindUse Selection for Replace
Filter in NavigatorFilter in Library
Show FontsShow Spelling & Grammar
ProjectSymbolSearch
IssueDebug
BreakpointLog
Show NavigatorStandardAssistant
VersionShow Related Items
Show Previous HistoryShow Previous Files History
Show Next HistoryShow Next Files History
Show Top Level ItemsShow Group Files
Show Document ItemsShow Issues
Remove Assistant EditorReset Editor
Show Debug Area
Navigate⇧⌘J⌥⌘,⌥⌘<⌥⌘.⌥⌘>⌘J
⌃⌘→⌃⌥⌘→
⌃⌥⇧⌘→⌃⌘←
⌃⌥⌘←⌃⌥⇧⌘←
⇧⌘L⌃⌘D
⌃⌥⌘D⌃⌥⇧⌘D
⌘'⌃⌘'⌘"
⌃⌘"
Reveal in Project NavigatorOpen In...Open In...
Move Focus to Next AreaMove Focus to Previous Area
Move Focus to Editor...Go Forward
Go Forward (option)Go Forward (shift + option)
Go BackGo Back (option)
Go Back (shift + option)Jump to SelectionJump to Definition
Jump to Definition (option)Jump to Definition (shift + option)
Jump to Next IssueFix Next Issue
Jump to Previous IssueFix Previous Issue
Navigate for Source Code⌃⌘↑
⌃⌥⌘↑⌃⌥⇧⌘↑
⌃⌘↓⌃⌥⌘↓
⌃⌥⇧⌘↓⌘L⌃/⌃?
Jump to Next CounterpartJump to Next Counterpart (option)
Jump to Next Counterpart (shift + option)Jump to Previous Counterpart
Jump to Previous Counterpart (option)Jump to Previous Counterpart (shift + option)
Jump To...Jump to Next Placeholder
Jump to Previous Placeholder
Editor Menu for Data Model⌃⌘A⌃⌘R
Add AttributeAdd Relationship
Editor Menu for Hex⌥⇧⌘OOverwrite Mode
Editor Menu for Interface Builder⌘[⌘]⌘=⌘_⌘|
Align Left EdgesAlign Right Edges
Size to FitAdd Horizontal Guide
Add Vertical Guide
Editor Menu for PDF⌥⌘↓⌥⌘↑
Next PagePrevious Page
Editor Menu for Scripting Definition⌘+⌘-
Make Text BiggerMake Text Smaller
Editor Menu for Source Code⌃Space⌃⌘E⌃⌘F⌃⌘M
⌃I⌘]⌘[
⌥⌘[⌥⌘]⌘/
⌥⌘←⌥⌘→
⌥⇧⌘←⌥⇧⌘→⌃⇧⌘←⌃⇧⌘→
Show CompletionsEdit All in ScopeFix all in ScopeShow All Issues
Re-IndentShift Right
Shift LeftMove Line Up
Move Line DownComment Selection
FoldUnfold
Fold Methods & FunctionsUnfold Methods & Functions
Fold Comment BlocksUnfold Comment Blocks
Product Menu⌘R
⌥⌘R⌘U
⌥⌘U⌘I
⌥⌘I⇧⌘B
⌥⇧⌘B⇧⌘R⇧⌘U⇧⌘I⌃⌘R⌃⌘U⌃⌘I⌘B
⇧⌘K⌥⇧⌘K
⌘.⌃⌘Y
F7F6F8
⌃⇧F7⌃F7
⌃⇧F6⌃F6⌘\⌘Y⌘K⌘<
RunRun...
TestTest...Profile
Profile...Analyze
Analyze...Build for Running
Build for TestingBuild for Profiling
Run Without BuildingTest Without Building
Profile Without BuildingBuild
CleanClean Build Folder...
StopPause
Step IntoStep OverStep Out
Step Into ThreadStep Into Instruction
Step Over ThreadStep Over Instruction
Add Breakpoint at Current LineActivate Breakpoints
Clear ConsoleEdit Scheme...
Window Menu⌘M⌘}⌘{
⇧⌘1⇧⌘2
MinimizeSelect Next Tab
Select Previous TabWelcome to Xcode
Organizer
Help Menu⌥⌘?⌃⌘?⌃⌥⌘/
Documentation and API ReferenceQuick Help for Selected Item
Search Documentation for Selected Text
Code Completion⌃>⌃.
F5, ⌥⎋
Select Previous CompletionSelect Next Completion
Show Completion List
TextMove to Beginning of Document ⌘↑
Move Left ←Move Right Extending Selection ⇧→
Move Backward Extending Selection ⌃⇧BMove Up ⌃P, ↑
Move Down ↓,⌃NMove to Beginning of Paragraph Extending Selection ⌃⇧A
Move Subword Forward Extending Selection ⌃⇧→Move to Beginning of Document Extending Selection ⇧↖,⇧⌘↑
Move Down Extending Selection ⌃⇧N,⇧↓Move word backward extending selection ⌃⌥⇧B
Move word forward extending selection ⌃⌥⇧FMove Subword Forward ⌃→
Move to Beginning of Paragraph ⌃AMove to end of Document extending Selection ⇧⌘↓,⇧↘
Page up Extending Selection ⇧⇞Move Subword Backward ⌃←
Move Word Right ⌥→Move Right →
Move to Right End of Line Extending Selection ⇧⌘→Move Paragraph Backward Extending Selection ⌥⇧↑
Move Word Right Extending Selection ⌥⇧→Move Left Extending Selection ⇧←
Move to Left End of Line Extending Selection ⇧⌘←Move word backward ⌃⌥B
Move to Right End of Line ⌘→Move Backward ⌃B
Move Forward ⌃FMove to Left End of Line ⌘←
Page Down ⌥⇟,⌃VPage Up ⌥⇞
Move up Extending Selection ⇧↑,⌃⇧PMove Forward Extending Selection ⌃⇧F
Move to End of Document ⌘↓Page Down Extending Selection ⇧⇟, ⌃⇧V
Move Word Left ⌥←Move word forward ⌃⌥F
Move Word Left Extending Selection ⌥⇧←Move Subword Backward Extending Selection ⌃⇧←Move Paragraph Forward Extending Selection ⌥⇧↓
Move to end of Paragraph ⌃EMove to end of Paragraph Extending Selection ⌃⇧E
Move Paragraph Backward ⌥↑Move Paragraph Forward ⌥↓
Select to Mark ⌃X⌃MDelete to Mark ⌃W
Set Mark ⌃@Swap with Mark ⌃X⌃X
Yank ⌃YDelete to end of Paragraph ⌃K
Delete Word Forward ⌥⌦Delete Subword Forward ⌃⌦
Delete Forward ⌃D,⌦Delete ClrLn
Delete Subword Backward ⌃⌫Delete to Beginning of Line ⌘⌫
Delete Backward ⌃H,⌫,Delete Word Backward ⌃⌥⌫, ⌥⌫,⌥
Make Text Writing Direction Left to Right ⌃⌥⌘→Make Base Writing Direction Natural ⌃⌘↓
Make Base Writing Direction Right to Left ⌃⌘←Make Text Writing Direction Natural ⌃⌥⌘↓
Make Base Writing Direction Left to Right ⌃⌘→Make Text Writing Direction Right to Left ⌃⌥⌘←
Center Selection of Visible Area ⌃LScroll Page up ⌃↑, ⇞
Scroll to Beginning of Document ↖Scroll Page Down ⇟,⌃↓
Scroll to end of Document ↘Transpose ⌃T
Insert Newline ↩,⌤,Insert Newline and Leave Selection Before It ⌃O
Insert Tab without Extra Action ⌥⇥Insert Double Quote without Extra Action ⌃"
Insert Backtab ⇤Insert Newline without Extra Action ⌥↩,⌥⌤,⌥
Insert Slash ⌃/Insert Single Quote without Extra Action ⌃'
Insert Line Break ⌃↩,⌃⌤,⌃Insert Tab ⇥
Cancel ⎋, ⌘.Select Previous Completion ⌃>
Select Next Completion ⌃.Show Completion List F5, ⌥⎋
Disponible sur http://cocoasamurai.blogspot.com/2011/03/xcode-4-
keyboard-shortcuts-now.html
Passage du header à l’implémentation :Pomme+Ctrl+Haut/Bas
Passage du header à l’implémentation :Pomme+Ctrl+Haut/Bas
Ouverture d’un nouvel Onglet :Pomme+T
Passage du header à l’implémentation :Pomme+Ctrl+Haut/Bas
Lancement de l’application :Pomme+R
Pomme+ENTER n’existe plus !
Ouverture d’un nouvel Onglet :Pomme+T
DémoArchivage d’un projet
Bonus #2Conversion de apparchive en xcarchive
http://stackoverflow.com/questions/5060228/can-we-import-apparchive-bundles-in-xcode-4
Script MacRuby réalisé parDave Dunkin
Des Questions ?
Merci de votre attention
CocoaHeads #2http://cocoaheads.fr
[email protected]@cocoaheads.fr
Pratiques de développement itératif
Xcode 4 - Tout en Douceur
Mail : [email protected]
Web : www.ripplemotion.fr
Mail : [email protected]
App : CarMusic
Recommended