Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Alcatraz internals

Alcatraz internals

Talk given on NSLondon, April 2014

1a8210be06c7e4e4add04eb95ea7964c?s=128

Marin Usalj

April 29, 2014
Tweet

More Decks by Marin Usalj

Other Decks in Programming

Transcript

  1. Alcatraz the package manager for Xcode

  2. None
  3. how does this even

  4. ~/Library/Application\ Support\ /Developer/Shared/Xcode/Plug-ins

  5. ./Plug-ins VVDocumenter.xcplugin BeginningOfLine.xcplugin OMColorSense.xcplugin BBUFullIssueNavigator.xcplugin

  6. ZOMG ! PLUGINS!!!!11!! <3 <3

  7. None
  8. + (void)pluginDidLoad:(NSBundle *)plugin { ! if ([currentApplicationName isEqual:@"Xcode"]) { static

    dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ sharedPlugin = [[self alloc] initWithBundle:plugin]; }); } ! }
  9. Everything’s terrible Sincerely, FileMerge.app

  10. + (void)pluginDidLoad:(NSBundle *)plugin { ! if ([currentApplicationName isEqual:@"Xcode"]) { static

    dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ sharedPlugin = [[self alloc] initWithBundle:plugin]; }); } ! }
  11. aapl

  12. I’ll need you to come in tommmmoroooow

  13. and add these DVTPlugInCompatibility UUIDs

  14. that’d be GRRREEEEEAT

  15. Cou … l ..dn’t ww we use. Semantic Versioning?

  16. Oh, almost forgot…

  17. I’ll need you to stop filling radars

  18. and crashing Xcode

  19. otherwise we’ll disable plugins entirely

  20. THANKS

  21. Xcode UUID 5.0 640F884E-CE55-4B40-87C0-8869546CAB7A 5.0.1 640F884E-CE55-4B40-87C0-8869546CAB7A 5.1 A2E4D43F-41F4-4FB9-BB94-7177011C9AED 5.1.1 A2E4D43F-41F4-4FB9-BB94-7177011C9AED

  22. Xcode UUID 5.0 640F884E-CE55-4B40-87C0-8869546CAB7A YOUR PLUGIN 5.1 A2E4D43F-41F4-4FB9-BB94-7177011C9AED

  23. Xcode UUID 5.0 640F884E-CE55-4B40-87C0-8869546CAB7A YOUR PLUGIN 5.1 A2E4D43F-41F4-4FB9-BB94-7177011C9AED 6.0 BASDSDII-JWM3-2987-KKHH-82890MSEBUEM

  24. internals

  25. None
  26. Color scheme Templates Xcode Plugin

  27. Color scheme Templates Xcode Plugin

  28. -name -description -iconName -remotePath -isInstalled -screenshotPath ATZPackage.h

  29. @implementation ATZColorScheme ! - (ATZInstaller *)installer { return [ATZColorSchemeInstaller sharedInstaller];

    } ! - (NSString *)type { return COLOR_SCHEME; } ! - (BOOL)requiresRestart { return YES; } ! - (NSString *)extension { return DVTCOLORSCHEME; } ! - (NSString *)iconName { return COLOR_SCHEME_ICON_NAME; } ! @end
  30. @implementation ATZPlugin @synthesize requiresRestart; ! - (ATZInstaller *)installer { return

    [ATZPluginInstaller sharedInstaller]; } ! - (NSString *)type { return PLUGIN; } ! - (NSString *)extension { return XCPLUGIN; } ! - (NSString *)iconName { return PLUGIN_ICON_NAME; } ! @end
  31. @implementation ATZTemplate ! - (ATZInstaller *)installer { @throw [NSException exceptionWithName:@"Abstract

    template" reason:@"Please use one of ATZTemplate subclasses" userInfo:nil]; } ! - (NSString *)type { return nil; } ! - (BOOL)requiresRestart { return NO; } ! - (NSString *)extension { return XCTEMPLATE; } ! - (NSString *)iconName { return TEMPLATE_ICON_NAME; } ! @end
  32. ATZInstaller.h -installPackage:progress:completion: -updatePackage:progress:completion: -removePackage:progress:completion: ! -isPackageInstalled:

  33. ATZInstaller.h ATZColorSchemeInstaller.h ATZTemplateInstaller.h ATZPluginInstaller.h

  34. ATZPluginInstaller.h

  35. ATZTemplateInstaller.h

  36. ATZColorSchemeInstaller.h

  37. updates

  38. git fetch git reset —hard

  39. None
  40. git yolo

  41. how do we update Alcatraz?

  42. Alcatraz is just a plugin

  43. ALCATRAZ USES ALCATRAZ TO UPDATE ALCATRAZ

  44. roadmap

  45. NDA

  46. May 2013

  47. Mar 2014

  48. NDA

  49. CocoaPods

  50. the band

  51. @kattrali KEYBOARDS KEYBOARDS

  52. @jurre KEYBOARDS KEYBOARDS

  53. many awesome contributors THE ORCHESTRA

  54. thank you Marin Usalj @supermarin | supermar.in