├── .github └── workflows │ └── ci-mac.yaml ├── .gitignore ├── .travis.yml ├── README.md ├── iMazingAppFixer.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── iMazing App Fixer.xcscheme └── iMazingAppFixer ├── Assets.xcassets └── AppIcon.appiconset │ ├── App-128.png │ ├── App-128@2x.png │ ├── App-16.png │ ├── App-16@2x.png │ ├── App-256.png │ ├── App-256@2x.png │ ├── App-32.png │ ├── App-32@2x.png │ ├── App-512.png │ ├── App-512@2x.png │ └── Contents.json ├── Classes ├── ApplicationDelegate.h ├── ApplicationDelegate.m ├── MainWindowController.h └── MainWindowController.m ├── Info.plist ├── UI └── en.lproj │ ├── MainMenu.xib │ └── MainWindowController.xib ├── iMazingAppFixer-Prefix.pch └── main.m /.github/workflows/ci-mac.yaml: -------------------------------------------------------------------------------- 1 | name: ci-mac 2 | on: [push] 3 | jobs: 4 | ci: 5 | runs-on: macos-latest 6 | strategy: 7 | matrix: 8 | run-config: 9 | - { scheme: 'iMazing App Fixer', configuration: 'Debug', project: 'iMazingAppFixer.xcodeproj', build: 1, analyze: 1, test: 0, info: 1, destination: 'platform=macOS' } 10 | - { scheme: 'iMazing App Fixer', configuration: 'Release', project: 'iMazingAppFixer.xcodeproj', build: 1, analyze: 1, test: 0, info: 1, destination: 'platform=macOS' } 11 | steps: 12 | 13 | - uses: actions/checkout@v1 14 | with: 15 | submodules: 'recursive' 16 | 17 | - uses: macmade/action-xcodebuild@v1.0.0 18 | 19 | - uses: macmade/action-slack@v1.0.0 20 | if: ${{ always() }} 21 | env: 22 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 23 | with: 24 | channel: '#ci' 25 | status: ${{ job.status }} 26 | title: ${{ matrix.run-config[ 'scheme' ] }} - ${{ matrix.run-config[ 'configuration' ] }} 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac Finder 2 | .DS_Store 3 | .Trashes 4 | Icon? 5 | 6 | # Thumbnails 7 | ._* 8 | 9 | # Files that might appear on external disk 10 | .Spotlight-V100 11 | .Trashes 12 | 13 | # Xcode 14 | *.pbxuser 15 | *.mode1v3 16 | *.mode2v3 17 | *.perspectivev3 18 | *.xccheckout 19 | *.profraw 20 | !default.pbxuser 21 | !default.mode1v3 22 | !default.mode2v3 23 | !default.perspectivev3 24 | xcuserdata 25 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | xcode_project: iMazingAppFixer.xcodeproj 3 | xcode_scheme: iMazing App Fixer 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | iMazing App Fixer 2 | ================= 3 | 4 | [![Build Status](https://img.shields.io/github/workflow/status/DigiDNA/iMazingAppFixer/ci-mac?label=macOS&logo=apple)](https://github.com/DigiDNA/iMazingAppFixer/actions/workflows/ci-mac.yaml) 5 | [![Issues](http://img.shields.io/github/issues/DigiDNA/iMazingAppFixer.svg?logo=github)](https://github.com/DigiDNA/iMazingAppFixer/issues) 6 | ![Status](https://img.shields.io/badge/status-legacy-red.svg?logo=git) 7 | ![License](https://img.shields.io/badge/license-mit-brightgreen.svg?logo=open-source-initiative) 8 | [![Contact](https://img.shields.io/badge/follow-@digidna-blue.svg?logo=twitter&style=social)](https://twitter.com/digidna) 9 | 10 | About 11 | ----- 12 | 13 | A small utility for people having issues starting applications on OS X. 14 | Some applications may be incorrectly flagged as damaged by OS X, or even flagged as legacy PowerPC applications. 15 | 16 | The utility lets you select any application and will attempt to repair it. 17 | 18 | The repair process will clear all extended attributes on the application bundle by running: 19 | 20 | xattr -c -r /path/to/application.app 21 | 22 | It will also reset the [LaunchServices] database by running: 23 | 24 | lsregister -kill -r -domain local -domain system -domain user 25 | 26 | Note that `lsregister` is located in the `LaunchServices` system framework. 27 | 28 | License 29 | ------- 30 | 31 | iMazing App Fixer is released under the terms of the MIT License. 32 | 33 | Repository Infos 34 | ---------------- 35 | 36 | Owner: DigiDNA 37 | Web: imazing.com 38 | Blog: imazing.com/blog 39 | Twitter: @DigiDNA 40 | GitHub: github.com/DigiDNA 41 | 42 | [LaunchServices]: https://developer.apple.com/library/prerelease/mac/documentation/Carbon/Conceptual/LaunchServicesConcepts/LSCConcepts/LSCConcepts.html 43 | -------------------------------------------------------------------------------- /iMazingAppFixer.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 059B847B1BD8FB8800B71EFA /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 059B84771BD8FB8800B71EFA /* MainMenu.xib */; }; 11 | 059B847C1BD8FB8800B71EFA /* MainWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 059B84791BD8FB8800B71EFA /* MainWindowController.xib */; }; 12 | 05C868611BD8ED560098BA19 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 05C868601BD8ED560098BA19 /* main.m */; }; 13 | 05C8687A1BD8EE4E0098BA19 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 05C868701BD8EE4E0098BA19 /* Assets.xcassets */; }; 14 | 05C8687B1BD8EE4E0098BA19 /* ApplicationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 05C868731BD8EE4E0098BA19 /* ApplicationDelegate.m */; }; 15 | 05C8687C1BD8EE4E0098BA19 /* MainWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 05C868751BD8EE4E0098BA19 /* MainWindowController.m */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 059B84781BD8FB8800B71EFA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; 20 | 059B847A1BD8FB8800B71EFA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindowController.xib; sourceTree = ""; }; 21 | 05C868591BD8ED560098BA19 /* iMazing App Fixer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iMazing App Fixer.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 05C868601BD8ED560098BA19 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 23 | 05C868701BD8EE4E0098BA19 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 24 | 05C868721BD8EE4E0098BA19 /* ApplicationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationDelegate.h; sourceTree = ""; }; 25 | 05C868731BD8EE4E0098BA19 /* ApplicationDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApplicationDelegate.m; sourceTree = ""; }; 26 | 05C868741BD8EE4E0098BA19 /* MainWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainWindowController.h; sourceTree = ""; }; 27 | 05C868751BD8EE4E0098BA19 /* MainWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainWindowController.m; sourceTree = ""; }; 28 | 05C868761BD8EE4E0098BA19 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | 05F718B21BD929A500FC43A7 /* iMazingAppFixer-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "iMazingAppFixer-Prefix.pch"; sourceTree = ""; }; 30 | /* End PBXFileReference section */ 31 | 32 | /* Begin PBXFrameworksBuildPhase section */ 33 | 05C868561BD8ED560098BA19 /* Frameworks */ = { 34 | isa = PBXFrameworksBuildPhase; 35 | buildActionMask = 2147483647; 36 | files = ( 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 05C868501BD8ED550098BA19 = { 44 | isa = PBXGroup; 45 | children = ( 46 | 05C8685B1BD8ED560098BA19 /* iMazingAppFixer */, 47 | 05C8685A1BD8ED560098BA19 /* Products */, 48 | ); 49 | sourceTree = ""; 50 | }; 51 | 05C8685A1BD8ED560098BA19 /* Products */ = { 52 | isa = PBXGroup; 53 | children = ( 54 | 05C868591BD8ED560098BA19 /* iMazing App Fixer.app */, 55 | ); 56 | name = Products; 57 | sourceTree = ""; 58 | }; 59 | 05C8685B1BD8ED560098BA19 /* iMazingAppFixer */ = { 60 | isa = PBXGroup; 61 | children = ( 62 | 05C868711BD8EE4E0098BA19 /* Classes */, 63 | 05C868771BD8EE4E0098BA19 /* UI */, 64 | 05C868701BD8EE4E0098BA19 /* Assets.xcassets */, 65 | 05C8685F1BD8ED560098BA19 /* Supporting Files */, 66 | ); 67 | path = iMazingAppFixer; 68 | sourceTree = ""; 69 | }; 70 | 05C8685F1BD8ED560098BA19 /* Supporting Files */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 05F718B21BD929A500FC43A7 /* iMazingAppFixer-Prefix.pch */, 74 | 05C868761BD8EE4E0098BA19 /* Info.plist */, 75 | 05C868601BD8ED560098BA19 /* main.m */, 76 | ); 77 | name = "Supporting Files"; 78 | sourceTree = ""; 79 | }; 80 | 05C868711BD8EE4E0098BA19 /* Classes */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 05C868721BD8EE4E0098BA19 /* ApplicationDelegate.h */, 84 | 05C868731BD8EE4E0098BA19 /* ApplicationDelegate.m */, 85 | 05C868741BD8EE4E0098BA19 /* MainWindowController.h */, 86 | 05C868751BD8EE4E0098BA19 /* MainWindowController.m */, 87 | ); 88 | path = Classes; 89 | sourceTree = ""; 90 | }; 91 | 05C868771BD8EE4E0098BA19 /* UI */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 059B84771BD8FB8800B71EFA /* MainMenu.xib */, 95 | 059B84791BD8FB8800B71EFA /* MainWindowController.xib */, 96 | ); 97 | path = UI; 98 | sourceTree = ""; 99 | }; 100 | /* End PBXGroup section */ 101 | 102 | /* Begin PBXNativeTarget section */ 103 | 05C868581BD8ED560098BA19 /* iMazingAppFixer */ = { 104 | isa = PBXNativeTarget; 105 | buildConfigurationList = 05C8686A1BD8ED560098BA19 /* Build configuration list for PBXNativeTarget "iMazingAppFixer" */; 106 | buildPhases = ( 107 | 05C868551BD8ED560098BA19 /* Sources */, 108 | 05C868561BD8ED560098BA19 /* Frameworks */, 109 | 05C868571BD8ED560098BA19 /* Resources */, 110 | ); 111 | buildRules = ( 112 | ); 113 | dependencies = ( 114 | ); 115 | name = iMazingAppFixer; 116 | productName = LSRebuild; 117 | productReference = 05C868591BD8ED560098BA19 /* iMazing App Fixer.app */; 118 | productType = "com.apple.product-type.application"; 119 | }; 120 | /* End PBXNativeTarget section */ 121 | 122 | /* Begin PBXProject section */ 123 | 05C868511BD8ED550098BA19 /* Project object */ = { 124 | isa = PBXProject; 125 | attributes = { 126 | LastUpgradeCheck = 0710; 127 | ORGANIZATIONNAME = "XS-Labs"; 128 | TargetAttributes = { 129 | 05C868581BD8ED560098BA19 = { 130 | CreatedOnToolsVersion = 7.1; 131 | }; 132 | }; 133 | }; 134 | buildConfigurationList = 05C868541BD8ED550098BA19 /* Build configuration list for PBXProject "iMazingAppFixer" */; 135 | compatibilityVersion = "Xcode 3.2"; 136 | developmentRegion = en; 137 | hasScannedForEncodings = 0; 138 | knownRegions = ( 139 | en, 140 | Base, 141 | ); 142 | mainGroup = 05C868501BD8ED550098BA19; 143 | productRefGroup = 05C8685A1BD8ED560098BA19 /* Products */; 144 | projectDirPath = ""; 145 | projectRoot = ""; 146 | targets = ( 147 | 05C868581BD8ED560098BA19 /* iMazingAppFixer */, 148 | ); 149 | }; 150 | /* End PBXProject section */ 151 | 152 | /* Begin PBXResourcesBuildPhase section */ 153 | 05C868571BD8ED560098BA19 /* Resources */ = { 154 | isa = PBXResourcesBuildPhase; 155 | buildActionMask = 2147483647; 156 | files = ( 157 | 05C8687A1BD8EE4E0098BA19 /* Assets.xcassets in Resources */, 158 | 059B847B1BD8FB8800B71EFA /* MainMenu.xib in Resources */, 159 | 059B847C1BD8FB8800B71EFA /* MainWindowController.xib in Resources */, 160 | ); 161 | runOnlyForDeploymentPostprocessing = 0; 162 | }; 163 | /* End PBXResourcesBuildPhase section */ 164 | 165 | /* Begin PBXSourcesBuildPhase section */ 166 | 05C868551BD8ED560098BA19 /* Sources */ = { 167 | isa = PBXSourcesBuildPhase; 168 | buildActionMask = 2147483647; 169 | files = ( 170 | 05C8687C1BD8EE4E0098BA19 /* MainWindowController.m in Sources */, 171 | 05C868611BD8ED560098BA19 /* main.m in Sources */, 172 | 05C8687B1BD8EE4E0098BA19 /* ApplicationDelegate.m in Sources */, 173 | ); 174 | runOnlyForDeploymentPostprocessing = 0; 175 | }; 176 | /* End PBXSourcesBuildPhase section */ 177 | 178 | /* Begin PBXVariantGroup section */ 179 | 059B84771BD8FB8800B71EFA /* MainMenu.xib */ = { 180 | isa = PBXVariantGroup; 181 | children = ( 182 | 059B84781BD8FB8800B71EFA /* en */, 183 | ); 184 | name = MainMenu.xib; 185 | sourceTree = ""; 186 | }; 187 | 059B84791BD8FB8800B71EFA /* MainWindowController.xib */ = { 188 | isa = PBXVariantGroup; 189 | children = ( 190 | 059B847A1BD8FB8800B71EFA /* en */, 191 | ); 192 | name = MainWindowController.xib; 193 | sourceTree = ""; 194 | }; 195 | /* End PBXVariantGroup section */ 196 | 197 | /* Begin XCBuildConfiguration section */ 198 | 05C868681BD8ED560098BA19 /* Debug */ = { 199 | isa = XCBuildConfiguration; 200 | buildSettings = { 201 | ALWAYS_SEARCH_USER_PATHS = NO; 202 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; 203 | CLANG_ANALYZER_DEADCODE_DEADSTORES = YES; 204 | CLANG_ANALYZER_GCD = YES; 205 | CLANG_ANALYZER_MEMORY_MANAGEMENT = YES; 206 | CLANG_ANALYZER_OBJC_ATSYNC = YES; 207 | CLANG_ANALYZER_OBJC_COLLECTIONS = YES; 208 | CLANG_ANALYZER_OBJC_INCOMP_METHOD_TYPES = YES; 209 | CLANG_ANALYZER_OBJC_NSCFERROR = YES; 210 | CLANG_ANALYZER_OBJC_RETAIN_COUNT = YES; 211 | CLANG_ANALYZER_OBJC_SELF_INIT = YES; 212 | CLANG_ANALYZER_OBJC_UNUSED_IVARS = YES; 213 | CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; 214 | CLANG_ANALYZER_SECURITY_INSECUREAPI_GETPW_GETS = YES; 215 | CLANG_ANALYZER_SECURITY_INSECUREAPI_MKSTEMP = YES; 216 | CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; 217 | CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; 218 | CLANG_ANALYZER_SECURITY_INSECUREAPI_UNCHECKEDRETURN = YES; 219 | CLANG_ANALYZER_SECURITY_INSECUREAPI_VFORK = YES; 220 | CLANG_ANALYZER_SECURITY_KEYCHAIN_API = YES; 221 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 222 | CLANG_CXX_LIBRARY = "libc++"; 223 | CLANG_ENABLE_MODULES = YES; 224 | CLANG_ENABLE_MODULE_DEBUGGING = YES; 225 | CLANG_ENABLE_OBJC_ARC = YES; 226 | CLANG_LINK_OBJC_RUNTIME = YES; 227 | CLANG_MODULES_AUTOLINK = YES; 228 | CLANG_STATIC_ANALYZER_MODE = deep; 229 | CLANG_STATIC_ANALYZER_MODE_ON_ANALYZE_ACTION = deep; 230 | CLANG_WARN_ASSIGN_ENUM = YES; 231 | CLANG_WARN_BOOL_CONVERSION = YES; 232 | CLANG_WARN_CONSTANT_CONVERSION = YES; 233 | CLANG_WARN_CXX0X_EXTENSIONS = YES; 234 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 235 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 236 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 237 | CLANG_WARN_EMPTY_BODY = YES; 238 | CLANG_WARN_ENUM_CONVERSION = YES; 239 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; 240 | CLANG_WARN_INT_CONVERSION = YES; 241 | CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION = YES; 242 | CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; 243 | CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; 244 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 245 | CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO; 246 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; 247 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 248 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 249 | CLANG_WARN_UNREACHABLE_CODE = YES; 250 | CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES; 251 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 252 | CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES; 253 | CODE_SIGN_IDENTITY = "-"; 254 | COPY_PHASE_STRIP = NO; 255 | DEBUG_INFORMATION_FORMAT = dwarf; 256 | ENABLE_NS_ASSERTIONS = YES; 257 | ENABLE_STRICT_OBJC_MSGSEND = YES; 258 | ENABLE_TESTABILITY = YES; 259 | GCC_C_LANGUAGE_STANDARD = c11; 260 | GCC_DYNAMIC_NO_PIC = NO; 261 | GCC_ENABLE_CPP_EXCEPTIONS = YES; 262 | GCC_ENABLE_CPP_RTTI = YES; 263 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 264 | GCC_NO_COMMON_BLOCKS = YES; 265 | GCC_OPTIMIZATION_LEVEL = 0; 266 | GCC_PREPROCESSOR_DEFINITIONS = ( 267 | "DEBUG=1", 268 | "$(inherited)", 269 | ); 270 | GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; 271 | GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; 272 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 273 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 274 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 275 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES; 276 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 277 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 278 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 279 | GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES; 280 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 281 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; 282 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; 283 | GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; 284 | GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; 285 | GCC_WARN_INHIBIT_ALL_WARNINGS = NO; 286 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 287 | GCC_WARN_MISSING_PARENTHESES = YES; 288 | GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; 289 | GCC_WARN_PEDANTIC = YES; 290 | GCC_WARN_SHADOW = YES; 291 | GCC_WARN_SIGN_COMPARE = YES; 292 | GCC_WARN_STRICT_SELECTOR_MATCH = YES; 293 | GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; 294 | GCC_WARN_UNDECLARED_SELECTOR = YES; 295 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 296 | GCC_WARN_UNKNOWN_PRAGMAS = YES; 297 | GCC_WARN_UNUSED_FUNCTION = YES; 298 | GCC_WARN_UNUSED_LABEL = YES; 299 | GCC_WARN_UNUSED_PARAMETER = YES; 300 | GCC_WARN_UNUSED_VALUE = YES; 301 | GCC_WARN_UNUSED_VARIABLE = YES; 302 | MACOSX_DEPLOYMENT_TARGET = 10.9; 303 | MTL_ENABLE_DEBUG_INFO = YES; 304 | ONLY_ACTIVE_ARCH = YES; 305 | RUN_CLANG_STATIC_ANALYZER = YES; 306 | SDKROOT = macosx; 307 | }; 308 | name = Debug; 309 | }; 310 | 05C868691BD8ED560098BA19 /* Release */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | ALWAYS_SEARCH_USER_PATHS = NO; 314 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; 315 | CLANG_ANALYZER_DEADCODE_DEADSTORES = YES; 316 | CLANG_ANALYZER_GCD = YES; 317 | CLANG_ANALYZER_MEMORY_MANAGEMENT = YES; 318 | CLANG_ANALYZER_OBJC_ATSYNC = YES; 319 | CLANG_ANALYZER_OBJC_COLLECTIONS = YES; 320 | CLANG_ANALYZER_OBJC_INCOMP_METHOD_TYPES = YES; 321 | CLANG_ANALYZER_OBJC_NSCFERROR = YES; 322 | CLANG_ANALYZER_OBJC_RETAIN_COUNT = YES; 323 | CLANG_ANALYZER_OBJC_SELF_INIT = YES; 324 | CLANG_ANALYZER_OBJC_UNUSED_IVARS = YES; 325 | CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; 326 | CLANG_ANALYZER_SECURITY_INSECUREAPI_GETPW_GETS = YES; 327 | CLANG_ANALYZER_SECURITY_INSECUREAPI_MKSTEMP = YES; 328 | CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; 329 | CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; 330 | CLANG_ANALYZER_SECURITY_INSECUREAPI_UNCHECKEDRETURN = YES; 331 | CLANG_ANALYZER_SECURITY_INSECUREAPI_VFORK = YES; 332 | CLANG_ANALYZER_SECURITY_KEYCHAIN_API = YES; 333 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 334 | CLANG_CXX_LIBRARY = "libc++"; 335 | CLANG_ENABLE_MODULES = YES; 336 | CLANG_ENABLE_MODULE_DEBUGGING = YES; 337 | CLANG_ENABLE_OBJC_ARC = YES; 338 | CLANG_LINK_OBJC_RUNTIME = YES; 339 | CLANG_MODULES_AUTOLINK = YES; 340 | CLANG_STATIC_ANALYZER_MODE = deep; 341 | CLANG_STATIC_ANALYZER_MODE_ON_ANALYZE_ACTION = deep; 342 | CLANG_WARN_ASSIGN_ENUM = YES; 343 | CLANG_WARN_BOOL_CONVERSION = YES; 344 | CLANG_WARN_CONSTANT_CONVERSION = YES; 345 | CLANG_WARN_CXX0X_EXTENSIONS = YES; 346 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 348 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 349 | CLANG_WARN_EMPTY_BODY = YES; 350 | CLANG_WARN_ENUM_CONVERSION = YES; 351 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; 352 | CLANG_WARN_INT_CONVERSION = YES; 353 | CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; 355 | CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; 356 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 357 | CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO; 358 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; 359 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 360 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 361 | CLANG_WARN_UNREACHABLE_CODE = YES; 362 | CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES; 363 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 364 | CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES; 365 | CODE_SIGN_IDENTITY = "-"; 366 | COPY_PHASE_STRIP = NO; 367 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 368 | ENABLE_NS_ASSERTIONS = NO; 369 | ENABLE_STRICT_OBJC_MSGSEND = YES; 370 | GCC_C_LANGUAGE_STANDARD = c11; 371 | GCC_ENABLE_CPP_EXCEPTIONS = YES; 372 | GCC_ENABLE_CPP_RTTI = YES; 373 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 374 | GCC_NO_COMMON_BLOCKS = YES; 375 | GCC_OPTIMIZATION_LEVEL = s; 376 | GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; 377 | GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; 378 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 379 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 380 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 381 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES; 382 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 383 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 384 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 385 | GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES; 386 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 387 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; 388 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; 389 | GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; 390 | GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; 391 | GCC_WARN_INHIBIT_ALL_WARNINGS = NO; 392 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 393 | GCC_WARN_MISSING_PARENTHESES = YES; 394 | GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; 395 | GCC_WARN_PEDANTIC = YES; 396 | GCC_WARN_SHADOW = YES; 397 | GCC_WARN_SIGN_COMPARE = YES; 398 | GCC_WARN_STRICT_SELECTOR_MATCH = YES; 399 | GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; 400 | GCC_WARN_UNDECLARED_SELECTOR = YES; 401 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 402 | GCC_WARN_UNKNOWN_PRAGMAS = YES; 403 | GCC_WARN_UNUSED_FUNCTION = YES; 404 | GCC_WARN_UNUSED_LABEL = YES; 405 | GCC_WARN_UNUSED_PARAMETER = YES; 406 | GCC_WARN_UNUSED_VALUE = YES; 407 | GCC_WARN_UNUSED_VARIABLE = YES; 408 | MACOSX_DEPLOYMENT_TARGET = 10.9; 409 | MTL_ENABLE_DEBUG_INFO = NO; 410 | RUN_CLANG_STATIC_ANALYZER = YES; 411 | SDKROOT = macosx; 412 | }; 413 | name = Release; 414 | }; 415 | 05C8686B1BD8ED560098BA19 /* Debug */ = { 416 | isa = XCBuildConfiguration; 417 | buildSettings = { 418 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 419 | COMBINE_HIDPI_IMAGES = YES; 420 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 421 | GCC_PREFIX_HEADER = "iMazingAppFixer/iMazingAppFixer-Prefix.pch"; 422 | INFOPLIST_FILE = iMazingAppFixer/Info.plist; 423 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 424 | PRODUCT_BUNDLE_IDENTIFIER = com.digidna.iMazingAppFixer; 425 | PRODUCT_NAME = "iMazing App Fixer"; 426 | }; 427 | name = Debug; 428 | }; 429 | 05C8686C1BD8ED560098BA19 /* Release */ = { 430 | isa = XCBuildConfiguration; 431 | buildSettings = { 432 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 433 | COMBINE_HIDPI_IMAGES = YES; 434 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 435 | GCC_PREFIX_HEADER = "iMazingAppFixer/iMazingAppFixer-Prefix.pch"; 436 | INFOPLIST_FILE = iMazingAppFixer/Info.plist; 437 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 438 | PRODUCT_BUNDLE_IDENTIFIER = com.digidna.iMazingAppFixer; 439 | PRODUCT_NAME = "iMazing App Fixer"; 440 | }; 441 | name = Release; 442 | }; 443 | /* End XCBuildConfiguration section */ 444 | 445 | /* Begin XCConfigurationList section */ 446 | 05C868541BD8ED550098BA19 /* Build configuration list for PBXProject "iMazingAppFixer" */ = { 447 | isa = XCConfigurationList; 448 | buildConfigurations = ( 449 | 05C868681BD8ED560098BA19 /* Debug */, 450 | 05C868691BD8ED560098BA19 /* Release */, 451 | ); 452 | defaultConfigurationIsVisible = 0; 453 | defaultConfigurationName = Release; 454 | }; 455 | 05C8686A1BD8ED560098BA19 /* Build configuration list for PBXNativeTarget "iMazingAppFixer" */ = { 456 | isa = XCConfigurationList; 457 | buildConfigurations = ( 458 | 05C8686B1BD8ED560098BA19 /* Debug */, 459 | 05C8686C1BD8ED560098BA19 /* Release */, 460 | ); 461 | defaultConfigurationIsVisible = 0; 462 | defaultConfigurationName = Release; 463 | }; 464 | /* End XCConfigurationList section */ 465 | }; 466 | rootObject = 05C868511BD8ED550098BA19 /* Project object */; 467 | } 468 | -------------------------------------------------------------------------------- /iMazingAppFixer.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iMazingAppFixer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iMazingAppFixer.xcodeproj/xcshareddata/xcschemes/iMazing App Fixer.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DigiDNA/iMazingAppFixer/34cd5c1d382be0f9723b2482ab7fc633802edc66/iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-128.png -------------------------------------------------------------------------------- /iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DigiDNA/iMazingAppFixer/34cd5c1d382be0f9723b2482ab7fc633802edc66/iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-128@2x.png -------------------------------------------------------------------------------- /iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DigiDNA/iMazingAppFixer/34cd5c1d382be0f9723b2482ab7fc633802edc66/iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-16.png -------------------------------------------------------------------------------- /iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DigiDNA/iMazingAppFixer/34cd5c1d382be0f9723b2482ab7fc633802edc66/iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-16@2x.png -------------------------------------------------------------------------------- /iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DigiDNA/iMazingAppFixer/34cd5c1d382be0f9723b2482ab7fc633802edc66/iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-256.png -------------------------------------------------------------------------------- /iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DigiDNA/iMazingAppFixer/34cd5c1d382be0f9723b2482ab7fc633802edc66/iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-256@2x.png -------------------------------------------------------------------------------- /iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DigiDNA/iMazingAppFixer/34cd5c1d382be0f9723b2482ab7fc633802edc66/iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-32.png -------------------------------------------------------------------------------- /iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DigiDNA/iMazingAppFixer/34cd5c1d382be0f9723b2482ab7fc633802edc66/iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-32@2x.png -------------------------------------------------------------------------------- /iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DigiDNA/iMazingAppFixer/34cd5c1d382be0f9723b2482ab7fc633802edc66/iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-512.png -------------------------------------------------------------------------------- /iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DigiDNA/iMazingAppFixer/34cd5c1d382be0f9723b2482ab7fc633802edc66/iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/App-512@2x.png -------------------------------------------------------------------------------- /iMazingAppFixer/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "App-16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "App-16@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "App-32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "App-32@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "App-128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "App-128@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "App-256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "App-256@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "App-512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "App-512@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /iMazingAppFixer/Classes/ApplicationDelegate.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.digidna.net 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | @import Cocoa; 26 | 27 | @class MainWindowController; 28 | 29 | NS_ASSUME_NONNULL_BEGIN 30 | 31 | @interface ApplicationDelegate: NSObject < NSApplicationDelegate > 32 | 33 | @property( atomic, readonly ) MainWindowController * mainWindowController; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /iMazingAppFixer/Classes/ApplicationDelegate.m: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.digidna.net 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | #import "ApplicationDelegate.h" 26 | #import "MainWindowController.h" 27 | 28 | @interface ApplicationDelegate() 29 | 30 | @property( atomic, readwrite, strong ) MainWindowController * mainWindowController; 31 | 32 | - ( void )openDocument: ( id )sender; 33 | 34 | @end 35 | 36 | @implementation ApplicationDelegate 37 | 38 | - ( void )applicationDidFinishLaunching: ( NSNotification * )notification 39 | { 40 | ( void )notification; 41 | 42 | self.mainWindowController = [ MainWindowController new ]; 43 | 44 | [ self openDocument: nil ]; 45 | } 46 | 47 | - ( BOOL )applicationShouldTerminateAfterLastWindowClosed: ( NSApplication * )sender 48 | { 49 | ( void )sender; 50 | 51 | return YES; 52 | } 53 | 54 | - ( void )openDocument: ( id )sender 55 | { 56 | NSOpenPanel * panel; 57 | NSURL * url; 58 | 59 | ( void )sender; 60 | 61 | panel = [ NSOpenPanel new ]; 62 | 63 | panel.canChooseDirectories = NO; 64 | panel.canChooseFiles = YES; 65 | panel.canCreateDirectories = NO; 66 | panel.allowsMultipleSelection = NO; 67 | panel.allowedFileTypes = @[ @"app" ]; 68 | panel.message = @"Please select an application to repair:"; 69 | panel.directoryURL = [ NSURL fileURLWithPath: @"/Applications" ]; 70 | 71 | if( [ panel runModal ] != NSFileHandlingPanelOKButton || panel.URLs.count == 0 ) 72 | { 73 | if( self.mainWindowController.url == nil ) 74 | { 75 | [ NSApp terminate: nil ]; 76 | } 77 | 78 | return; 79 | } 80 | 81 | url = panel.URLs.firstObject; 82 | self.mainWindowController.url = url; 83 | 84 | [ self.mainWindowController.window center ]; 85 | [ self.mainWindowController showWindow: nil ]; 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /iMazingAppFixer/Classes/MainWindowController.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.digidna.net 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | @import Cocoa; 26 | 27 | NS_ASSUME_NONNULL_BEGIN 28 | 29 | @interface MainWindowController: NSWindowController 30 | 31 | @property( atomic, readwrite, strong ) NSURL * url; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /iMazingAppFixer/Classes/MainWindowController.m: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.digidna.net 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | #import "MainWindowController.h" 26 | 27 | @interface MainWindowController() 28 | 29 | @property( atomic, readwrite, assign ) BOOL running; 30 | @property( atomic, readwrite, strong ) NSImage * icon; 31 | @property( atomic, readwrite, strong ) NSString * appName; 32 | @property( atomic, readwrite, strong ) NSString * appVersion; 33 | @property( atomic, readwrite, strong ) NSString * fixButtonTitle; 34 | @property( atomic, readwrite, strong ) NSString * launchButtonTitle; 35 | 36 | - ( IBAction )fix: ( id )sender; 37 | - ( IBAction )launch: ( id )sender; 38 | - ( IBAction )help: ( id )sender; 39 | - ( void )displayError; 40 | - ( BOOL )rebuildLaunchServicesDatabase; 41 | - ( BOOL )clearExtendedAttributes; 42 | 43 | @end 44 | 45 | @implementation MainWindowController 46 | 47 | - ( instancetype )init 48 | { 49 | if( ( self = [ self initWithWindowNibName: NSStringFromClass( [ self class ] ) ] ) ) 50 | { 51 | [ self addObserver: self forKeyPath: @"url" options: NSKeyValueObservingOptionNew context: NULL ]; 52 | } 53 | 54 | return self; 55 | } 56 | 57 | - ( void )dealloc 58 | { 59 | [ self removeObserver: self forKeyPath: @"url" context: NULL ]; 60 | } 61 | 62 | - ( void )windowDidLoad 63 | { 64 | NSString * title; 65 | 66 | [ super windowDidLoad ]; 67 | 68 | title = [ [ [ NSBundle mainBundle ] infoDictionary ] objectForKey: @"CFBundleName" ]; 69 | 70 | self.window.title = ( title ) ? title : @""; 71 | } 72 | 73 | - ( void )observeValueForKeyPath: ( NSString * )keyPath ofObject: ( id )object change: ( NSDictionary * )change context: ( void * )context 74 | { 75 | NSString * path; 76 | NSBundle * bundle; 77 | 78 | if( object == self && [ keyPath isEqualToString: @"url" ] ) 79 | { 80 | path = self.url.path; 81 | 82 | if( path ) 83 | { 84 | bundle = [ NSBundle bundleWithPath: path ]; 85 | 86 | self.icon = [ [ NSWorkspace sharedWorkspace ] iconForFile: path ]; 87 | self.appName = bundle.infoDictionary[ @"CFBundleName" ]; 88 | self.appVersion = bundle.infoDictionary[ @"CFBundleShortVersionString" ]; 89 | self.fixButtonTitle = [ NSString stringWithFormat: @"Repair %@", self.appName ]; 90 | self.launchButtonTitle = [ NSString stringWithFormat: @"Start %@", self.appName ]; 91 | } 92 | else 93 | { 94 | self.icon = nil; 95 | self.appName = @""; 96 | self.appVersion = @""; 97 | self.fixButtonTitle = @""; 98 | self.launchButtonTitle = @""; 99 | } 100 | } 101 | else 102 | { 103 | [ super observeValueForKeyPath: keyPath ofObject: object change: change context: context ]; 104 | } 105 | } 106 | 107 | - ( IBAction )fix: ( id )sender 108 | { 109 | ( void )sender; 110 | 111 | if( self.url == nil ) 112 | { 113 | return; 114 | } 115 | 116 | self.running = YES; 117 | 118 | dispatch_async 119 | ( 120 | dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), 121 | ^( void ) 122 | { 123 | if( [ self clearExtendedAttributes ] == NO ) 124 | { 125 | [ self displayError ]; 126 | 127 | return; 128 | } 129 | 130 | if( [ self rebuildLaunchServicesDatabase ] == NO ) 131 | { 132 | [ self displayError ]; 133 | 134 | return; 135 | } 136 | 137 | dispatch_async 138 | ( 139 | dispatch_get_main_queue(), 140 | ^( void ) 141 | { 142 | NSAlert * alert; 143 | NSWindow * window; 144 | 145 | self.running = NO; 146 | 147 | alert = [ NSAlert new ]; 148 | alert.messageText = @"Application Repaired"; 149 | alert.informativeText = [ NSString stringWithFormat: @"%@ has been successfully repaired and you should now be able to start it.", self.appName ]; 150 | alert.alertStyle = NSInformationalAlertStyle; 151 | 152 | [ alert addButtonWithTitle: @"OK" ]; 153 | 154 | window = self.window; 155 | 156 | if( window ) 157 | { 158 | [ alert beginSheetModalForWindow: window completionHandler: NULL ]; 159 | } 160 | else 161 | { 162 | [ alert runModal ]; 163 | } 164 | } 165 | ); 166 | } 167 | ); 168 | } 169 | 170 | - ( IBAction )launch: ( id )sender 171 | { 172 | NSURL * url; 173 | 174 | ( void )sender; 175 | 176 | url = self.url; 177 | 178 | if( url ) 179 | { 180 | [ [ NSWorkspace sharedWorkspace ] openURL: url ]; 181 | } 182 | } 183 | 184 | - ( IBAction )help: ( id )sender 185 | { 186 | NSURL * url; 187 | 188 | ( void )sender; 189 | 190 | url = [ NSURL URLWithString: @"https://github.com/DigiDNA/iMazingAppFixer" ]; 191 | 192 | [ [ NSWorkspace sharedWorkspace ] openURL: url ]; 193 | } 194 | 195 | - ( void )displayError 196 | { 197 | dispatch_async 198 | ( 199 | dispatch_get_main_queue(), 200 | ^( void ) 201 | { 202 | NSAlert * alert; 203 | NSWindow * window; 204 | 205 | self.running = NO; 206 | 207 | alert = [ NSAlert new ]; 208 | alert.messageText = @"Repaired Failed"; 209 | alert.informativeText = [ NSString stringWithFormat: @"Errors were unfortunately encountered while trying to repair %@.", self.appName ]; 210 | alert.alertStyle = NSInformationalAlertStyle; 211 | 212 | [ alert addButtonWithTitle: @"OK" ]; 213 | 214 | window = self.window; 215 | 216 | if( window ) 217 | { 218 | [ alert beginSheetModalForWindow: window completionHandler: NULL ]; 219 | } 220 | else 221 | { 222 | [ alert runModal ]; 223 | } 224 | } 225 | ); 226 | } 227 | 228 | - ( BOOL )rebuildLaunchServicesDatabase 229 | { 230 | NSTask * task; 231 | 232 | task = [ NSTask new ]; 233 | task.launchPath = @"/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister"; 234 | task.arguments = @[ @"-kill", @"-r", @"-domain", @"local", @"-domain", @"system", @"-domain", @"user" ]; 235 | 236 | [ task launch ]; 237 | [ task waitUntilExit ]; 238 | 239 | return task.terminationStatus == 0; 240 | } 241 | 242 | - ( BOOL )clearExtendedAttributes 243 | { 244 | NSTask * task; 245 | NSString * path = self.url.path; 246 | 247 | if( path == nil ) 248 | { 249 | return NO; 250 | } 251 | 252 | task = [ NSTask new ]; 253 | task.launchPath = @"/usr/bin/xattr"; 254 | task.arguments = @[ @"-c", @"-r", path ]; 255 | 256 | [ task launch ]; 257 | [ task waitUntilExit ]; 258 | 259 | return task.terminationStatus == 0; 260 | } 261 | 262 | @end 263 | -------------------------------------------------------------------------------- /iMazingAppFixer/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0.0 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2015 DigiDNA. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /iMazingAppFixer/UI/en.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | -------------------------------------------------------------------------------- /iMazingAppFixer/UI/en.lproj/MainWindowController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | Press the repair button if you're experiencing issues when trying to run the selected app. 55 | 56 | The repair process will clear any extended attribute on the application and rebuild the LaunchServices database. 57 | 58 | Press the help button for more details about the repair process. 59 | 60 | 61 | 62 | 63 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | NSNegateBoolean 114 | 115 | 116 | 117 | 118 | 119 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /iMazingAppFixer/iMazingAppFixer-Prefix.pch: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.digidna.net 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | @import Cocoa; 26 | 27 | #ifndef NS_ASSUME_NONNULL_BEGIN 28 | #define NS_ASSUME_NONNULL_BEGIN 29 | #endif 30 | 31 | #ifndef NS_ASSUME_NONNULL_END 32 | #define NS_ASSUME_NONNULL_END 33 | #endif 34 | -------------------------------------------------------------------------------- /iMazingAppFixer/main.m: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2015 Jean-David Gadina - www.digidna.net 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | @import Cocoa; 26 | 27 | int main( int argc, const char * argv[] ) 28 | { 29 | return NSApplicationMain( argc, argv ); 30 | } 31 | --------------------------------------------------------------------------------