Mastering the Project File

66
Mastering the Project File Michele Titolo Sr. Mobile Engineer / Prolific Interactive @micheletitolo Saturday, April 20, 13

description

Do you frequently hear yourself say "Don't touch the project file!", "Who overrode my changes?" or "Where did my file go?" If so, this talk is for you. We constantly put the project file on a pedestal of things-you-do-not-mess-with, but is this much caution really warranted? We'll cover tips, tricks, and solutions to promote harmony between you and your project file.

Transcript of Mastering the Project File

Page 1: Mastering the Project File

Mastering theProject File

Michele TitoloSr. Mobile Engineer / Prolific Interactive

@micheletitolo

Saturday, April 20, 13

Page 2: Mastering the Project File

Hello!

Saturday, April 20, 13

Page 3: Mastering the Project File

Saturday, April 20, 13

Page 4: Mastering the Project File

Saturday, April 20, 13

Page 5: Mastering the Project File

Saturday, April 20, 13

Page 6: Mastering the Project File

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

Saturday, April 20, 13

Page 7: Mastering the Project File

Falling back to patching base and 3-way merge...Auto-merging MyApppp.xcodeproj/project.pbxprojCONFLICT (content): Merge conflict in MyApp.xcodeproj/project.pbxprojFailed to merge in the changes.Patch failed at 0037 launch screen images update

Saturday, April 20, 13

Page 8: Mastering the Project File

It’s not that special

Saturday, April 20, 13

Page 9: Mastering the Project File

Saturday, April 20, 13

Page 10: Mastering the Project File

.xcodeproj

Saturday, April 20, 13

Page 11: Mastering the Project File

It’s a folder

Saturday, April 20, 13

Page 12: Mastering the Project File

Saturday, April 20, 13

Page 13: Mastering the Project File

Saturday, April 20, 13

Page 14: Mastering the Project File

project.xcworkspace

Saturday, April 20, 13

Page 15: Mastering the Project File

another “special” folder

Saturday, April 20, 13

Page 16: Mastering the Project File

Saturday, April 20, 13

Page 17: Mastering the Project File

contents.xcworkspacedata

Saturday, April 20, 13

Page 18: Mastering the Project File

references .xcodeproj

Saturday, April 20, 13

Page 19: Mastering the Project File

xcuserdata

Saturday, April 20, 13

Page 20: Mastering the Project File

Not just in .xcodeproj

Saturday, April 20, 13

Page 21: Mastering the Project File

project.pbxproj

Saturday, April 20, 13

Page 22: Mastering the Project File

it’s a plist

Saturday, April 20, 13

Page 23: Mastering the Project File

a very special plist

Saturday, April 20, 13

Page 24: Mastering the Project File

the heart of your project

Saturday, April 20, 13

Page 25: Mastering the Project File

let’s look inside

Saturday, April 20, 13

Page 26: Mastering the Project File

// !$*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...

Saturday, April 20, 13

Page 27: Mastering the Project File

Saturday, April 20, 13

Page 28: Mastering the Project File

Let’s break it down

Saturday, April 20, 13

Page 29: Mastering the Project File

‘objects’ and ‘root_object’

Saturday, April 20, 13

Page 30: Mastering the Project File

‘objects’

Saturday, April 20, 13

Page 31: Mastering the Project File

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

Saturday, April 20, 13

Page 32: Mastering the Project File

Every object has a UUID

Saturday, April 20, 13

Page 33: Mastering the Project File

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

Saturday, April 20, 13

Page 34: Mastering the Project File

‘root_object’

Saturday, April 20, 13

Page 35: Mastering the Project File

isa = PBXProject;

Saturday, April 20, 13

Page 36: Mastering the Project File

mainGroup = A487DC7415FE5DCD0037E8A3;

Saturday, April 20, 13

Page 37: Mastering the Project File

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

Saturday, April 20, 13

Page 38: Mastering the Project File

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

Saturday, April 20, 13

Page 39: Mastering the Project File

buildConfigurationList = C01FCF4E08A954540054247B

Saturday, April 20, 13

Page 40: Mastering the Project File

PBXAggregateTargetPBXBuildRulePBXContainerItemProxyPBXCopyFilesBuildPhasePBXFileReferencePBXFrameworksBuildPhasePBXGroupPBXHeadersBuildPhasePBXLegacyTargetPBXNativeTarget

PBXProjectPBXReferenceProxyPBXRezBuildPhasePBXShellScriptBuildPhasePBXSourcesBuildPhasePBXTargetDependencyPBXVariantGroupXCBuildConfigurationXCConfigurationListXCVersionGroup

Saturday, April 20, 13

Page 41: Mastering the Project File

Saturday, April 20, 13

Page 42: Mastering the Project File

Saturday, April 20, 13

Page 43: Mastering the Project File

Saturday, April 20, 13

Page 44: Mastering the Project File

XCBuildConfiguration

Saturday, April 20, 13

Page 45: Mastering the Project File

Debug and Release

Saturday, April 20, 13

Page 46: Mastering the Project File

Saturday, April 20, 13

Page 47: Mastering the Project File

Compiler flags

Saturday, April 20, 13

Page 48: Mastering the Project File

buildSettings = {! ALWAYS_SEARCH_USER_PATHS = NO;! "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";! COPY_PHASE_STRIP = NO;! DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";! GCC_DYNAMIC_NO_PIC = NO;! GCC_OPTIMIZATION_LEVEL = 0;! GCC_PRECOMPILE_PREFIX_HEADER = YES;! GCC_PREFIX_HEADER = Prefix.pch;! GCC_WARN_ABOUT_RETURN_TYPE = YES;! GCC_WARN_UNUSED_VALUE = NO;! GCC_WARN_UNUSED_VARIABLE = YES;! INFOPLIST_FILE = Info.plist;! ONLY_ACTIVE_ARCH = NO;! PRODUCT_NAME = MyApp;! SDKROOT = iphoneos;};

Saturday, April 20, 13

Page 49: Mastering the Project File

Project or Target

Saturday, April 20, 13

Page 50: Mastering the Project File

PBXNativeTarget

Saturday, April 20, 13

Page 51: Mastering the Project File

buildConfigurationList

Saturday, April 20, 13

Page 52: Mastering the Project File

buildPhases

Saturday, April 20, 13

Page 53: Mastering the Project File

buildPhases

Saturday, April 20, 13

Page 54: Mastering the Project File

PBXResourcesBuildPhase==

Copy Bundle Resources

Saturday, April 20, 13

Page 55: Mastering the Project File

PBXSourcesBuildPhase==

Compile Sources

Saturday, April 20, 13

Page 56: Mastering the Project File

PBXFrameworksBuildPhase==

Link Binary With Libraries

Saturday, April 20, 13

Page 57: Mastering the Project File

PBXShellScriptBuildPhase==

Run Script

Saturday, April 20, 13

Page 58: Mastering the Project File

The Big Picture

Saturday, April 20, 13

Page 59: Mastering the Project File

Saturday, April 20, 13

Page 60: Mastering the Project File

It’s just a plist

Saturday, April 20, 13

Page 61: Mastering the Project File

How does this make our lives suck less?

Saturday, April 20, 13

Page 62: Mastering the Project File

project.pbxproj -text

Saturday, April 20, 13

Page 63: Mastering the Project File

Make it readable

Saturday, April 20, 13

Page 64: Mastering the Project File

Make it JSON

Saturday, April 20, 13

Page 65: Mastering the Project File

Xcode don’t care

Saturday, April 20, 13

Page 66: Mastering the Project File

The End

Michele Titolo@micheletitolo

Saturday, April 20, 13