├── NoLastUpgradeCheck.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── project.pbxproj ├── README.md ├── Info.plist └── NoLastUpgradeCheck.m /NoLastUpgradeCheck.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | About 2 | ===== 3 | 4 | **NoLastUpgradeCheck** is an Xcode plugin that prevents Xcode 4 from adding or modifying the `LastUpgradeCheck` attribute of the project.pbxproj file. 5 | 6 | This behavior is particularly annoying for people working with different versions of Xcode. The topic was discussed on the xcode-users mailing list: [Xcode keeps altering my project.pbxproj files](https://web.archive.org/web/20180118234553/http://www.cocoabuilder.com/archive/xcode/306543-xcode-keeps-altering-my-project-pbxproj-files.html). 7 | 8 | Installation 9 | ============ 10 | 11 | 1. Open NoLastUpgradeCheck.xcodeproj 12 | 2. Build the project, NoLastUpgradeCheck.xcplugin will be automatically installed into `~/Library/Application Support/Developer/Shared/Xcode/Plug-ins` 13 | 3. Quit Xcode 14 | 4. Relaunch Xcode 15 | -------------------------------------------------------------------------------- /Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ch.pitaya.xcode.${PRODUCT_NAME:identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | ${CURRENT_PROJECT_VERSION} 19 | CFBundleVersion 20 | ${CURRENT_PROJECT_VERSION} 21 | NSPrincipalClass 22 | NoLastUpgradeCheck 23 | XCGCReady 24 | 25 | XCPluginHasUI 26 | 27 | XC4Compatible 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /NoLastUpgradeCheck.m: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2011 Cédric Luthi 3 | // 4 | 5 | #import 6 | #import 7 | 8 | @interface NoLastUpgradeCheck : NSObject 9 | @end 10 | 11 | @implementation NoLastUpgradeCheck 12 | 13 | static void setLastUpgradeCheck(id self, SEL _cmd, id lastUpgradeCheck) 14 | { 15 | // Do nothing! 16 | } 17 | 18 | + (void) pluginDidLoad:(NSBundle *)plugin 19 | { 20 | method_setImplementation(class_getInstanceMethod(NSClassFromString(@"PBXProject"), @selector(setLastUpgradeCheck:)), (IMP)setLastUpgradeCheck); 21 | 22 | NSString *pluginName = [[[plugin bundlePath] lastPathComponent] stringByDeletingPathExtension]; 23 | NSString *version = [plugin objectForInfoDictionaryKey:@"CFBundleVersion"]; 24 | NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; 25 | BOOL isXcode = [bundleIdentifier isEqualToString:@"com.apple.Xcode"] || [bundleIdentifier isEqualToString:@"com.apple.dt.Xcode"]; 26 | if (isXcode) 27 | NSLog(@"%@ %@ loaded successfully", pluginName, version); 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /NoLastUpgradeCheck.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | DA1B5D020E64686800921439 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 089C1672FE841209C02AAC07 /* Foundation.framework */; }; 11 | DA37E2DC0E6291C8001BDFEF /* NoLastUpgradeCheck.m in Sources */ = {isa = PBXBuildFile; fileRef = DA37E2DB0E6291C8001BDFEF /* NoLastUpgradeCheck.m */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXFileReference section */ 15 | 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 16 | 8D5B49B6048680CD000E48DA /* NoLastUpgradeCheck.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NoLastUpgradeCheck.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; }; 17 | 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 18 | DA37E2DB0E6291C8001BDFEF /* NoLastUpgradeCheck.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NoLastUpgradeCheck.m; sourceTree = ""; }; 19 | /* End PBXFileReference section */ 20 | 21 | /* Begin PBXFrameworksBuildPhase section */ 22 | 8D5B49B3048680CD000E48DA /* Frameworks */ = { 23 | isa = PBXFrameworksBuildPhase; 24 | buildActionMask = 2147483647; 25 | files = ( 26 | DA1B5D020E64686800921439 /* Foundation.framework in Frameworks */, 27 | ); 28 | runOnlyForDeploymentPostprocessing = 0; 29 | }; 30 | /* End PBXFrameworksBuildPhase section */ 31 | 32 | /* Begin PBXGroup section */ 33 | 089C166AFE841209C02AAC07 /* QuietXcode */ = { 34 | isa = PBXGroup; 35 | children = ( 36 | DA37E2DB0E6291C8001BDFEF /* NoLastUpgradeCheck.m */, 37 | 089C167CFE841241C02AAC07 /* Resources */, 38 | 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, 39 | 19C28FB8FE9D52D311CA2CBB /* Products */, 40 | ); 41 | name = QuietXcode; 42 | sourceTree = ""; 43 | }; 44 | 089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | 089C1672FE841209C02AAC07 /* Foundation.framework */, 48 | ); 49 | name = "Frameworks and Libraries"; 50 | sourceTree = ""; 51 | }; 52 | 089C167CFE841241C02AAC07 /* Resources */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | 8D5B49B7048680CD000E48DA /* Info.plist */, 56 | ); 57 | name = Resources; 58 | sourceTree = ""; 59 | }; 60 | 19C28FB8FE9D52D311CA2CBB /* Products */ = { 61 | isa = PBXGroup; 62 | children = ( 63 | 8D5B49B6048680CD000E48DA /* NoLastUpgradeCheck.xcplugin */, 64 | ); 65 | name = Products; 66 | sourceTree = ""; 67 | }; 68 | /* End PBXGroup section */ 69 | 70 | /* Begin PBXNativeTarget section */ 71 | 8D5B49AC048680CD000E48DA /* NoLastUpgradeCheck */ = { 72 | isa = PBXNativeTarget; 73 | buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "NoLastUpgradeCheck" */; 74 | buildPhases = ( 75 | 8D5B49B1048680CD000E48DA /* Sources */, 76 | 8D5B49B3048680CD000E48DA /* Frameworks */, 77 | ); 78 | buildRules = ( 79 | ); 80 | dependencies = ( 81 | ); 82 | name = NoLastUpgradeCheck; 83 | productInstallPath = "$(HOME)/Library/Bundles"; 84 | productName = QuietXcode; 85 | productReference = 8D5B49B6048680CD000E48DA /* NoLastUpgradeCheck.xcplugin */; 86 | productType = "com.apple.product-type.bundle"; 87 | }; 88 | /* End PBXNativeTarget section */ 89 | 90 | /* Begin PBXProject section */ 91 | 089C1669FE841209C02AAC07 /* Project object */ = { 92 | isa = PBXProject; 93 | buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "NoLastUpgradeCheck" */; 94 | compatibilityVersion = "Xcode 3.1"; 95 | developmentRegion = English; 96 | hasScannedForEncodings = 1; 97 | knownRegions = ( 98 | English, 99 | Japanese, 100 | French, 101 | German, 102 | ); 103 | mainGroup = 089C166AFE841209C02AAC07 /* QuietXcode */; 104 | projectDirPath = ""; 105 | projectRoot = ""; 106 | targets = ( 107 | 8D5B49AC048680CD000E48DA /* NoLastUpgradeCheck */, 108 | ); 109 | }; 110 | /* End PBXProject section */ 111 | 112 | /* Begin PBXSourcesBuildPhase section */ 113 | 8D5B49B1048680CD000E48DA /* Sources */ = { 114 | isa = PBXSourcesBuildPhase; 115 | buildActionMask = 2147483647; 116 | files = ( 117 | DA37E2DC0E6291C8001BDFEF /* NoLastUpgradeCheck.m in Sources */, 118 | ); 119 | runOnlyForDeploymentPostprocessing = 0; 120 | }; 121 | /* End PBXSourcesBuildPhase section */ 122 | 123 | /* Begin XCBuildConfiguration section */ 124 | 1DEB913B08733D840010E9CD /* Debug */ = { 125 | isa = XCBuildConfiguration; 126 | buildSettings = { 127 | ALWAYS_SEARCH_USER_PATHS = NO; 128 | COPY_PHASE_STRIP = NO; 129 | DEPLOYMENT_LOCATION = YES; 130 | DEPLOYMENT_POSTPROCESSING = YES; 131 | DSTROOT = "$(HOME)"; 132 | GCC_DYNAMIC_NO_PIC = NO; 133 | GCC_ENABLE_FIX_AND_CONTINUE = YES; 134 | GCC_ENABLE_OBJC_GC = supported; 135 | GCC_MODEL_TUNING = G5; 136 | GCC_OPTIMIZATION_LEVEL = 0; 137 | INFOPLIST_FILE = Info.plist; 138 | INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; 139 | LD_RUNPATH_SEARCH_PATHS = /Developer; 140 | PRODUCT_NAME = NoLastUpgradeCheck; 141 | STRIP_INSTALLED_PRODUCT = NO; 142 | WRAPPER_EXTENSION = xcplugin; 143 | }; 144 | name = Debug; 145 | }; 146 | 1DEB913F08733D840010E9CD /* Debug */ = { 147 | isa = XCBuildConfiguration; 148 | buildSettings = { 149 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; 150 | CURRENT_PROJECT_VERSION = 1.0.1; 151 | GCC_C_LANGUAGE_STANDARD = c99; 152 | GCC_OPTIMIZATION_LEVEL = 0; 153 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 154 | GCC_WARN_UNUSED_VARIABLE = YES; 155 | INSTALL_PATH = "$(HOME)/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; 156 | SDKROOT = macosx; 157 | }; 158 | name = Debug; 159 | }; 160 | /* End XCBuildConfiguration section */ 161 | 162 | /* Begin XCConfigurationList section */ 163 | 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "NoLastUpgradeCheck" */ = { 164 | isa = XCConfigurationList; 165 | buildConfigurations = ( 166 | 1DEB913B08733D840010E9CD /* Debug */, 167 | ); 168 | defaultConfigurationIsVisible = 0; 169 | defaultConfigurationName = Debug; 170 | }; 171 | 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "NoLastUpgradeCheck" */ = { 172 | isa = XCConfigurationList; 173 | buildConfigurations = ( 174 | 1DEB913F08733D840010E9CD /* Debug */, 175 | ); 176 | defaultConfigurationIsVisible = 0; 177 | defaultConfigurationName = Debug; 178 | }; 179 | /* End XCConfigurationList section */ 180 | }; 181 | rootObject = 089C1669FE841209C02AAC07 /* Project object */; 182 | } 183 | --------------------------------------------------------------------------------