Mastering the Project File (AltConf)

91
Mastering the Project File @micheletitolo Thursday, June 5, 14

description

 

Transcript of Mastering the Project File (AltConf)

Page 1: Mastering the Project File (AltConf)

Mastering theProject File

@micheletitolo

Thursday, June 5, 14

Page 2: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 3: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 4: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 5: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 6: Mastering the Project File (AltConf)

<<<<<<< HEAD! ! ! ! A487DC9215FE5DCD0037E8A3 /* AppDelegate.h */,! ! ! ! A487DC9315FE5DCD0037E8A3 /* AppDelegate.m */,! ! ! ! D9CA01C11720AD7D00CBD2B2 /* View Controllers */,=======! ! ! ! D9CA01B71720AC3000CBD2B2 /* Base */,! ! ! ! D9CA01BB1720AC3C00CBD2B2 /* Controllers */,>>>>>>> new_ratings

Thursday, June 5, 14

Page 7: Mastering the Project File (AltConf)

Falling back to patching base and 3-way merge...Auto-merging MyApp.xcodeproj/project.pbxprojCONFLICT (content): Merge conflict in ! MyApp.xcodeproj/project.pbxprojFailed to merge in the changes.Patch failed at 0037 Launch screen images updateThe copy of the patch that failed is found in:! /tmp/git/.git/rebase-apply/patch

Thursday, June 5, 14

Page 8: Mastering the Project File (AltConf)

It’s not that special

Thursday, June 5, 14

Page 9: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 10: Mastering the Project File (AltConf)

.xcodeproj

Thursday, June 5, 14

Page 11: Mastering the Project File (AltConf)

It’s a folder

Thursday, June 5, 14

Page 12: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 13: Mastering the Project File (AltConf)

Two kinds of files

Thursday, June 5, 14

Page 14: Mastering the Project File (AltConf)

Plist and XML

Thursday, June 5, 14

Page 15: Mastering the Project File (AltConf)

All the settings

Thursday, June 5, 14

Page 16: Mastering the Project File (AltConf)

Schemes, too

Thursday, June 5, 14

Page 17: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 18: Mastering the Project File (AltConf)

project.xcworkspace

Thursday, June 5, 14

Page 19: Mastering the Project File (AltConf)

another “special” folder

Thursday, June 5, 14

Page 20: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 21: Mastering the Project File (AltConf)

contents.xcworkspacedata

Thursday, June 5, 14

Page 22: Mastering the Project File (AltConf)

references .xcodeproj

Thursday, June 5, 14

Page 23: Mastering the Project File (AltConf)

<?xml version="1.0" encoding="UTF-8"?><Workspace version = "1.0"> <FileRef location = "self:MyApp.xcodeproj"> </FileRef></Workspace>

Thursday, June 5, 14

Page 24: Mastering the Project File (AltConf)

Not just in .xcodeproj

Thursday, June 5, 14

Page 25: Mastering the Project File (AltConf)

project.pbxproj

Thursday, June 5, 14

Page 26: Mastering the Project File (AltConf)

it’s a plist

Thursday, June 5, 14

Page 27: Mastering the Project File (AltConf)

a very special plist

Thursday, June 5, 14

Page 28: Mastering the Project File (AltConf)

the heart of your project

Thursday, June 5, 14

Page 29: Mastering the Project File (AltConf)

let’s look inside

Thursday, June 5, 14

Page 30: Mastering the Project File (AltConf)

// !$*UTF8*$!{! archiveVersion = 1;! classes = {! };! objectVersion = 46;! objects = {

/* Begin PBXBuildFile section */! ! 8A9D5590A3E24AC297598750 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef...! ! D94D3E72170B80FB00EA401C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; f...! ! D94D3E74170B80FB00EA401C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFi...! ! D94D3E76170B80FB00EA401C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuild...! ! D94D3E7C170B80FB00EA401C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; ...! ! D94D3E7E170B80FB00EA401C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D94...! ! D94D3E82170B80FB00EA401C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRe...! ! D94D3E84170B80FB00EA401C /* Default.png in Resources */ = {isa = PBXBuildFile; fileRe...! ! D94D3E86170B80FB00EA401C /* [email protected] in Resources */ = {isa = PBXBuildFile; fil...! ! D94D3E88170B80FB00EA401C /* [email protected] in Resources */ = {isa = PBXBuildFile...

Thursday, June 5, 14

Page 31: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 32: Mastering the Project File (AltConf)

Let’s break it down

Thursday, June 5, 14

Page 33: Mastering the Project File (AltConf)

‘objects’ and ‘root_object’

Thursday, June 5, 14

Page 34: Mastering the Project File (AltConf)

‘objects’

Thursday, June 5, 14

Page 35: Mastering the Project File (AltConf)

objects = {D94D3E72170B80FB00EA401C = {...};D94D3E74170B80FB00EA401C = {...};D94D3E76170B80FB00EA401C = {...};532ABB3011D5647300D29D20 = {...};532ABB3111D5647300D29D20 = {...};532ABB3211D5647300D29D20 = {...};532ABB3311D5647300D29D20 = {...};};

Thursday, June 5, 14

Page 36: Mastering the Project File (AltConf)

Every object has a UID

Thursday, June 5, 14

Page 37: Mastering the Project File (AltConf)

objects = {532ABB3011D5647300D29D20 = {...};532ABB3111D5647300D29D20 = {...};532ABB3211D5647300D29D20 = {...};532ABB3311D5647300D29D20 = {...};};

0123

Thursday, June 5, 14

Page 38: Mastering the Project File (AltConf)

‘root_object’

Thursday, June 5, 14

Page 39: Mastering the Project File (AltConf)

04A4CCDA164D5E0400FB5950 /* Project object */ = {! isa = PBXProject;! attributes = {! ! CLASSPREFIX = MRT;! ! LastUpgradeCheck = 0450;! ! ORGANIZATIONNAME = "Michele Titolo";! };! buildConfigurationList = 04A4CCDD164D5E0400FB5950;! compatibilityVersion = "Xcode 3.2";! developmentRegion = English;! hasScannedForEncodings = 0;! knownRegions = (! ! en,! );! mainGroup = 04A4CCD8164D5E0400FB5950;! productRefGroup = 04A4CCE4164D5E0400FB5950 /* Products */;! projectDirPath = "";! projectRoot = "";! targets = (! ! 04A4CCE2164D5E0400FB5950 /* MyApp */,! ! D9D2509C173AB9AD0046F074 /* MyApp Test */,! ! D9E6BA6A177CDB9C00C98B08 /* MyApp KIF */,! );};

Thursday, June 5, 14

Page 40: Mastering the Project File (AltConf)

04A4CCDA164D5E0400FB5950 /* Project object */ = {! isa = PBXProject;! attributes = {! ! CLASSPREFIX = MRT;! ! LastUpgradeCheck = 0450;! ! ORGANIZATIONNAME = "Michele Titolo";! };! buildConfigurationList = 04A4CCDD164D5E0400FB5950;! compatibilityVersion = "Xcode 3.2";! developmentRegion = English;! hasScannedForEncodings = 0;! knownRegions = (! ! en,! );! mainGroup = 04A4CCD8164D5E0400FB5950;! productRefGroup = 04A4CCE4164D5E0400FB5950 /* Products */;! projectDirPath = "";! projectRoot = "";! targets = (! ! 04A4CCE2164D5E0400FB5950 /* MyApp */,! ! D9D2509C173AB9AD0046F074 /* MyApp Test */,! ! D9E6BA6A177CDB9C00C98B08 /* MyApp KIF */,! );};

isa

mainGroup

targets

buildConfigurationList

Thursday, June 5, 14

Page 41: Mastering the Project File (AltConf)

isa = PBXProject;

Thursday, June 5, 14

Page 42: Mastering the Project File (AltConf)

mainGroup = A487DC7415FE5DCD0037E8A3;

Thursday, June 5, 14

Page 43: Mastering the Project File (AltConf)

targets = (! 1D6058900D05DD3D006BFB54 /* MyApp */,! D94C698916E6E808002BDD31 /* MyApp Test */,! D9E1D32A16E6FCC100C0524D /* MyApp Pro */,);

Thursday, June 5, 14

Page 44: Mastering the Project File (AltConf)

projectReferences = (! {! ! ProductGroup = D94C698116E6E7DE002BDD31 /* Products */;! ! ProjectRef = D94C698016E6E7DE002BDD31 /* KIF.xcodeproj */;! },);

Thursday, June 5, 14

Page 45: Mastering the Project File (AltConf)

buildConfigurationList = C01FCF4E08A954540054247B

Thursday, June 5, 14

Page 46: Mastering the Project File (AltConf)

Classes

Thursday, June 5, 14

Page 47: Mastering the Project File (AltConf)

PBXAggregateTargetPBXBuildRulePBXContainerItemProxyPBXCopyFilesBuildPhasePBXFileReferencePBXFrameworksBuildPhasePBXGroupPBXHeadersBuildPhasePBXLegacyTargetPBXNativeTarget

PBXProjectPBXReferenceProxyPBXResourcesBuildPhasePBXShellScriptBuildPhasePBXSourcesBuildPhasePBXTargetDependencyPBXVariantGroupXCBuildConfigurationXCConfigurationListXCVersionGroup

Thursday, June 5, 14

Page 48: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 49: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 50: Mastering the Project File (AltConf)

XCBuildConfiguration

Thursday, June 5, 14

Page 51: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 52: Mastering the Project File (AltConf)

Debug and Release

Thursday, June 5, 14

Page 53: Mastering the Project File (AltConf)

Compiler flags

Thursday, June 5, 14

Page 54: Mastering the Project File (AltConf)

04A4CD07164D5E0400FB5950 /* Debug */ = {! isa = XCBuildConfiguration;! baseConfigurationReference = 4B98CBDFD81F4259923E97CE;! buildSettings = {! ! CODE_SIGN_IDENTITY = "iPhone Developer";! ! "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";! ! GCC_PRECOMPILE_PREFIX_HEADER = YES;! ! GCC_PREFIX_HEADER = "MyApp/MyApp-Prefix.pch";! ! GCC_VERSION = com.apple.compilers.llvm.clang.1_0;! ! INFOPLIST_FILE = "MyApp/MyApp-Info.plist";! ! PRODUCT_NAME = "$(TARGET_NAME)";! ! PROVISIONING_PROFILE = "";! ! "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";! ! WRAPPER_EXTENSION = app;! };! name = Debug;};

PROVISIONING_PROFILEPRODUCT_NAMEINFOPLIST_FILEGCC_VERSION

CODE_SIGN_IDENTITY

name

Thursday, June 5, 14

Page 55: Mastering the Project File (AltConf)

Swift

Thursday, June 5, 14

Page 56: Mastering the Project File (AltConf)

SWIFT_OBJC_BRIDGING_HEADER = "MyApp-Bridging-Header.h";SWIFT_OPTIMIZATION_LEVEL = "-Onone";

Thursday, June 5, 14

Page 57: Mastering the Project File (AltConf)

Project or Target

Thursday, June 5, 14

Page 58: Mastering the Project File (AltConf)

PBXNativeTarget

Thursday, June 5, 14

Page 59: Mastering the Project File (AltConf)

04A4CCE2164D5E0400FB5950 /* MyApp */ = {! isa = PBXNativeTarget;! buildConfigurationList = 04A4CD06164D5E0400FB5950 /* Build configuration list for PBXNativeTarget "MyApp" */;! buildPhases = (! ! 29390B06A9D3479F9566AA27 /* Check Pods Manifest.lock */,! ! 04A4CCDF164D5E0400FB5950 /* Sources */,! ! 04A4CCE0164D5E0400FB5950 /* Frameworks */,! ! 04A4CCE1164D5E0400FB5950 /* Resources */,! ! F3BAB5EA93C24AE18A4EE832 /* Copy Pods Resources */,! );! buildRules = ();! dependencies = ();! name = MyApp;! productName = MyApp;! productReference = 04A4CCE3164D5E0400FB5950 /* MyApp.app */;! productType = "com.apple.product-type.application";};

buildPhases

name

buildConfigurationList

productName

Thursday, June 5, 14

Page 60: Mastering the Project File (AltConf)

Build phase types

Thursday, June 5, 14

Page 61: Mastering the Project File (AltConf)

PBXResourcesBuildPhase==

Copy Bundle Resources

Thursday, June 5, 14

Page 62: Mastering the Project File (AltConf)

PBXSourcesBuildPhase==

Compile Sources

Thursday, June 5, 14

Page 63: Mastering the Project File (AltConf)

PBXFrameworksBuildPhase==

Link Binary With Libraries

Thursday, June 5, 14

Page 64: Mastering the Project File (AltConf)

PBXShellScriptBuildPhase==

Run Script

Thursday, June 5, 14

Page 65: Mastering the Project File (AltConf)

F3BAB5EA93C24AE18A4EE832 /* Copy Pods Resources */ = {! isa = PBXShellScriptBuildPhase;! buildActionMask = 2147483647;! files = ();! inputPaths = ();! name = "Copy Pods Resources";! outputPaths = ();! runOnlyForDeploymentPostprocessing = 0;! shellPath = /bin/sh;! shellScript = "\"${SRCROOT}/Pods/Pods-resources.sh\"\n";};

shellScript

Thursday, June 5, 14

Page 66: Mastering the Project File (AltConf)

xcuserdata

Thursday, June 5, 14

Page 67: Mastering the Project File (AltConf)

User-specific info

Thursday, June 5, 14

Page 68: Mastering the Project File (AltConf)

.xcuserdatad

Thursday, June 5, 14

Page 69: Mastering the Project File (AltConf)

Schemes & breakpoints

Thursday, June 5, 14

Page 70: Mastering the Project File (AltConf)

xcschememanagement.plist

Thursday, June 5, 14

Page 71: Mastering the Project File (AltConf)

MyApp.xcscheme

Thursday, June 5, 14

Page 72: Mastering the Project File (AltConf)

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict>! <key>SchemeUserState</key>! <dict>! ! <key>MyApp.xcscheme_^#shared#^_</key>! ! <dict>! ! ! <key>orderHint</key>! ! ! <integer>1</integer>! ! </dict>! </dict>! <key>SuppressBuildableAutocreation</key>! <dict>! ! <key>1D6058900D05DD3D006BFB54</key>! ! <dict>! ! ! <key>primary</key>! ! ! <true/>! ! </dict>! </dict></dict></plist>

MyApp.xcscheme_^#shared#^_

Thursday, June 5, 14

Page 73: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 74: Mastering the Project File (AltConf)

.gitignore’d

Thursday, June 5, 14

Page 75: Mastering the Project File (AltConf)

xcshareddata

Thursday, June 5, 14

Page 76: Mastering the Project File (AltConf)

.xcschemes

Thursday, June 5, 14

Page 77: Mastering the Project File (AltConf)

xml

Thursday, June 5, 14

Page 78: Mastering the Project File (AltConf)

Don’t .gitignore

Thursday, June 5, 14

Page 79: Mastering the Project File (AltConf)

The Big Picture

Thursday, June 5, 14

Page 80: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 81: Mastering the Project File (AltConf)

.pbxproj: It’s just a plist

Thursday, June 5, 14

Page 82: Mastering the Project File (AltConf)

.xcworkspace: It’s XML

Thursday, June 5, 14

Page 83: Mastering the Project File (AltConf)

xcshareddata: Has plists

Thursday, June 5, 14

Page 84: Mastering the Project File (AltConf)

xcuserdata: Has plists

Thursday, June 5, 14

Page 85: Mastering the Project File (AltConf)

Thursday, June 5, 14

Page 86: Mastering the Project File (AltConf)

git

Thursday, June 5, 14

Page 87: Mastering the Project File (AltConf)

Merge Conflicts

Thursday, June 5, 14

Page 88: Mastering the Project File (AltConf)

project.pbxproj

Thursday, June 5, 14

Page 89: Mastering the Project File (AltConf)

1. Check the comments

Thursday, June 5, 14

Page 90: Mastering the Project File (AltConf)

2. Pick 1 UID

Thursday, June 5, 14

Page 91: Mastering the Project File (AltConf)

3. Rebase early and often

Thursday, June 5, 14