├── .gitignore ├── CodeGenTestApp ├── Base.lproj │ └── Main.storyboard ├── CGTAAppDelegate.h ├── CGTAAppDelegate.m ├── CGTADetailViewController.h ├── CGTADetailViewController.m ├── CGTAImagesCatalog+RuntimeHackery.h ├── CGTAImagesCatalog+RuntimeHackery.m ├── CGTAMasterViewController.h ├── CGTAMasterViewController.m ├── CodeGenTestApp-Info.plist ├── CodeGenTestApp-Prefix.pch ├── CodeGenTestApp.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── Derived Sources │ └── .gitignore ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Argentina.imageset │ │ ├── Argentina.png │ │ └── Contents.json │ ├── Australia.imageset │ │ ├── Australia.png │ │ └── Contents.json │ ├── Austria.imageset │ │ ├── Austria.png │ │ └── Contents.json │ ├── Belgium.imageset │ │ ├── Belgium.png │ │ └── Contents.json │ ├── Brazil.imageset │ │ ├── Brazil.png │ │ └── Contents.json │ ├── Cameroon.imageset │ │ ├── Cameroon.png │ │ └── Contents.json │ ├── Canada.imageset │ │ ├── Canada.png │ │ └── Contents.json │ ├── Chile.imageset │ │ ├── Chile.png │ │ └── Contents.json │ ├── China.imageset │ │ ├── China.png │ │ └── Contents.json │ ├── Denmark.imageset │ │ ├── Contents.json │ │ └── Denmark.png │ ├── Finland.imageset │ │ ├── Contents.json │ │ └── Finland.png │ ├── France.imageset │ │ ├── Contents.json │ │ └── France.png │ ├── Germany.imageset │ │ ├── Contents.json │ │ └── Germany.png │ ├── Greece.imageset │ │ ├── Contents.json │ │ └── Greece.png │ ├── Hong Kong.imageset │ │ ├── Contents.json │ │ └── Hong Kong.png │ ├── Hungary.imageset │ │ ├── Contents.json │ │ └── Hungary.png │ ├── Iceland.imageset │ │ ├── Contents.json │ │ └── Iceland.png │ ├── India.imageset │ │ ├── Contents.json │ │ └── India.png │ ├── Indonesia.imageset │ │ ├── Contents.json │ │ └── Indonesia.png │ ├── Ireland.imageset │ │ ├── Contents.json │ │ └── Ireland.png │ ├── Israel.imageset │ │ ├── Contents.json │ │ └── Israel.png │ ├── Italy.imageset │ │ ├── Contents.json │ │ └── Italy.png │ ├── Japan.imageset │ │ ├── Contents.json │ │ └── Japan.png │ ├── LaunchImage.launchimage │ │ └── Contents.json │ ├── Malaysia.imageset │ │ ├── Contents.json │ │ └── Malaysia.png │ ├── Mexico.imageset │ │ ├── Contents.json │ │ └── Mexico.png │ ├── Netherlands.imageset │ │ ├── Contents.json │ │ └── Netherlands.png │ ├── New Zealand.imageset │ │ ├── Contents.json │ │ └── New Zealand.png │ ├── Norway.imageset │ │ ├── Contents.json │ │ └── Norway.png │ ├── Pakistan.imageset │ │ ├── Contents.json │ │ └── Pakistan.png │ ├── Palestine.imageset │ │ ├── Contents.json │ │ └── Palestine.png │ ├── Peru.imageset │ │ ├── Contents.json │ │ └── Peru.png │ ├── Poland.imageset │ │ ├── Contents.json │ │ └── Poland.png │ ├── Portugal.imageset │ │ ├── Contents.json │ │ └── Portugal.png │ ├── Puerto Rico.imageset │ │ ├── Contents.json │ │ └── Puerto Rico.png │ ├── Romania.imageset │ │ ├── Contents.json │ │ └── Romania.png │ ├── Russia.imageset │ │ ├── Contents.json │ │ └── Russia.png │ ├── Saudi Arabia.imageset │ │ ├── Contents.json │ │ └── Saudi Arabia.png │ ├── Singapore.imageset │ │ ├── Contents.json │ │ └── Singapore.png │ ├── South Africa.imageset │ │ ├── Contents.json │ │ └── South Africa.png │ ├── South Korea.imageset │ │ ├── Contents.json │ │ └── South Korea.png │ ├── Spain.imageset │ │ ├── Contents.json │ │ └── Spain.png │ ├── Sweden.imageset │ │ ├── Contents.json │ │ └── Sweden.png │ ├── Switzerland.imageset │ │ ├── Contents.json │ │ └── Switzerland.png │ ├── Thailand.imageset │ │ ├── Contents.json │ │ └── Thailand.png │ ├── Turkey.imageset │ │ ├── Contents.json │ │ └── Turkey.png │ ├── UK.imageset │ │ ├── Contents.json │ │ └── UK.png │ ├── USA.imageset │ │ ├── Contents.json │ │ └── USA.png │ ├── Ukraine.imageset │ │ ├── Contents.json │ │ └── Ukraine.png │ ├── Uruguay.imageset │ │ ├── Contents.json │ │ └── Uruguay.png │ └── Venezuela.imageset │ │ ├── Contents.json │ │ └── Venezuela.png ├── Test App.clr ├── en.lproj │ └── InfoPlist.strings └── main.m ├── Documentation ├── colorpicker.png └── storyboardhaters.png ├── LICENSE ├── README.md ├── Shared ├── CGUCodeGenTool.h └── CGUCodeGenTool.m ├── assetgen ├── AGCatalogParser.h ├── AGCatalogParser.m ├── assetgen-Prefix.pch └── main.m ├── codegenutils.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── colordump ├── CDColorListDumper.h ├── CDColorListDumper.m ├── colordump-Prefix.pch └── main.m └── identifierconstants ├── IDStoryboardDumper.h ├── IDStoryboardDumper.m ├── identifierconstants-Prefix.pch └── main.m /.gitignore: -------------------------------------------------------------------------------- 1 | xcuserdata 2 | .DS_Store 3 | *.xccheckout 4 | -------------------------------------------------------------------------------- /CodeGenTestApp/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /CodeGenTestApp/CGTAAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGTAAppDelegate.h 3 | // CodeGenTestApp 4 | // 5 | // Created by Jim Puls on 2/3/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | 11 | @interface CGTAAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /CodeGenTestApp/CGTAAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // CGTAAppDelegate.m 3 | // CodeGenTestApp 4 | // 5 | // Created by Jim Puls on 2/3/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CGTAAppDelegate.h" 11 | 12 | @implementation CGTAAppDelegate 13 | @end 14 | -------------------------------------------------------------------------------- /CodeGenTestApp/CGTADetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGTADetailViewController.h 3 | // CodeGenTestApp 4 | // 5 | // Created by Jim Puls on 2/3/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | 11 | @interface CGTADetailViewController : UIViewController 12 | 13 | @property (nonatomic, strong) UIImage *image; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /CodeGenTestApp/CGTADetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CGTADetailViewController.m 3 | // CodeGenTestApp 4 | // 5 | // Created by Jim Puls on 2/3/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CGTADetailViewController.h" 11 | #import "CGTATestAppColorList.h" 12 | 13 | 14 | @interface CGTADetailViewController () 15 | 16 | @property (nonatomic, strong) IBOutlet UIImageView *imageView; 17 | 18 | @end 19 | 20 | 21 | @implementation CGTADetailViewController 22 | 23 | - (void)setImage:(UIImage *)image; 24 | { 25 | _image = image; 26 | [self updateView]; 27 | } 28 | 29 | - (void)viewDidLoad; 30 | { 31 | [self updateView]; 32 | 33 | CAGradientLayer *layer = [CAGradientLayer layer]; 34 | layer.startPoint = CGPointMake(0.5, 0.5); 35 | layer.endPoint = CGPointMake(0.5, 1.0); 36 | 37 | layer.colors = @[(id)[UIColor whiteColor].CGColor, (id)[CGTATestAppColorList tealColor].CGColor]; 38 | layer.frame = self.view.layer.bounds; 39 | [self.view.layer insertSublayer:layer atIndex:0]; 40 | } 41 | 42 | - (void)updateView; 43 | { 44 | self.imageView.image = self.image; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /CodeGenTestApp/CGTAImagesCatalog+RuntimeHackery.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGTAImagesCatalog+RuntimeHackery.h 3 | // codegenutils 4 | // 5 | // Created by Jim Puls on 2/3/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CGTAImagesCatalog.h" 11 | 12 | @interface CGTAImagesCatalog (RuntimeHackery) 13 | 14 | + (NSArray *)allImages; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /CodeGenTestApp/CGTAImagesCatalog+RuntimeHackery.m: -------------------------------------------------------------------------------- 1 | // 2 | // CGTAImagesCatalog+RuntimeHackery.m 3 | // codegenutils 4 | // 5 | // Created by Jim Puls on 2/3/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CGTAImagesCatalog+RuntimeHackery.h" 11 | 12 | #import 13 | #import 14 | 15 | 16 | @implementation CGTAImagesCatalog (RuntimeHackery) 17 | 18 | + (NSArray *)allImages; 19 | { 20 | NSMutableArray *images = [NSMutableArray array]; 21 | unsigned int count; 22 | Method *methods = class_copyMethodList(object_getClass(self), &count); 23 | for (unsigned int index = 0; index < count; index++) { 24 | if (sel_isEqual(method_getName(methods[index]), _cmd)) { 25 | continue; 26 | } 27 | id image = method_invoke(self, methods[index]); 28 | [images addObject:image]; 29 | } 30 | free(methods); 31 | return images; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /CodeGenTestApp/CGTAMasterViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGTAMasterViewController.h 3 | // CodeGenTestApp 4 | // 5 | // Created by Jim Puls on 2/3/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | 11 | @interface CGTAMasterViewController : UICollectionViewController 12 | @end 13 | -------------------------------------------------------------------------------- /CodeGenTestApp/CGTAMasterViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CGTAMasterViewController.m 3 | // CodeGenTestApp 4 | // 5 | // Created by Jim Puls on 2/3/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CGTAMasterViewController.h" 11 | #import "CGTADetailViewController.h" 12 | #import "CGTAImagesCatalog+RuntimeHackery.h" 13 | #import "CGTAMainStoryboardIdentifiers.h" 14 | 15 | 16 | @interface CGTAFlagCollectionViewCell : UICollectionViewCell 17 | 18 | @property (nonatomic, weak) IBOutlet UIImageView *imageView; 19 | 20 | @end 21 | 22 | 23 | @interface CGTAMasterViewController () 24 | 25 | @property (nonatomic, weak) IBOutlet UISlider *cellSizeSlider; 26 | @property (nonatomic, strong) NSArray *flagImages; 27 | 28 | @end 29 | 30 | 31 | @implementation CGTAMasterViewController 32 | 33 | #pragma mark - NSObject 34 | 35 | - (void)awakeFromNib; 36 | { 37 | [self sliderValueChanged:self.cellSizeSlider]; 38 | } 39 | 40 | #pragma mark - UIViewController 41 | 42 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender; 43 | { 44 | if ([segue.identifier isEqualToString:CGTAMainStoryboardTapOnFlagIdentifier]) { 45 | CGTADetailViewController *detailViewController = segue.destinationViewController; 46 | detailViewController.image = ((CGTAFlagCollectionViewCell *)sender).imageView.image; 47 | } 48 | } 49 | 50 | #pragma mark - Private methods 51 | 52 | - (IBAction)sliderValueChanged:(UISlider *)sender; 53 | { 54 | float newValue = sender.value; 55 | UICollectionViewFlowLayout *layout = (UICollectionViewFlowLayout *)self.collectionView.collectionViewLayout; 56 | layout.itemSize = CGSizeMake(newValue, newValue); 57 | } 58 | 59 | - (NSArray *)flagImages; 60 | { 61 | NSArray *allFlagImages = nil; 62 | 63 | // Initial version: full of strings that you have to type correctly! 64 | // Misspell any of these and your app will crash on trying to add `nil` to an array. 65 | allFlagImages = @[[UIImage imageNamed:@"USA"], [UIImage imageNamed:@"Canada"], [UIImage imageNamed:@"UK"], [UIImage imageNamed:@"Australia"]]; 66 | 67 | // New version: get the properly compiler-checked spelling from the image catalog. 68 | allFlagImages = @[[CGTAImagesCatalog usaImage], [CGTAImagesCatalog canadaImage], [CGTAImagesCatalog ukImage], [CGTAImagesCatalog australiaImage]]; 69 | 70 | // But really, why not use a little runtime hackery because we can? 71 | return [CGTAImagesCatalog allImages]; 72 | } 73 | 74 | #pragma mark - UICollectionViewDataSource 75 | 76 | - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView; 77 | { 78 | return 1; 79 | } 80 | 81 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section; 82 | { 83 | return self.flagImages.count; 84 | } 85 | 86 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath; 87 | { 88 | CGTAFlagCollectionViewCell *cell = (CGTAFlagCollectionViewCell *)[collectionView dequeueReusableCellWithReuseIdentifier:CGTAMainStoryboardImageCellIdentifier forIndexPath:indexPath]; 89 | cell.imageView.image = self.flagImages[indexPath.item]; 90 | return cell; 91 | } 92 | 93 | @end 94 | 95 | 96 | @implementation CGTAFlagCollectionViewCell 97 | @end 98 | -------------------------------------------------------------------------------- /CodeGenTestApp/CodeGenTestApp-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.squareup.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UIStatusBarTintParameters 34 | 35 | UINavigationBar 36 | 37 | Style 38 | UIBarStyleDefault 39 | Translucent 40 | 41 | 42 | 43 | UISupportedInterfaceOrientations 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /CodeGenTestApp/CodeGenTestApp-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /CodeGenTestApp/CodeGenTestApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A83878DA18A0367C00B386D6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A89D8FE617CFFDCE0077F2B5 /* Foundation.framework */; }; 11 | A83878DC18A0367C00B386D6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A83878DB18A0367C00B386D6 /* CoreGraphics.framework */; }; 12 | A83878E418A0367C00B386D6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A83878E218A0367C00B386D6 /* InfoPlist.strings */; }; 13 | A881852618A9B512002803FC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A881852518A9B512002803FC /* UIKit.framework */; }; 14 | A881853918A9B609002803FC /* CGTAAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A83878E918A0367C00B386D6 /* CGTAAppDelegate.m */; }; 15 | A881853A18A9B614002803FC /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A83878F418A0367C00B386D6 /* Images.xcassets */; }; 16 | A881853C18A9B622002803FC /* CGTAMasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A83878EF18A0367C00B386D6 /* CGTAMasterViewController.m */; }; 17 | A881853D18A9B622002803FC /* CGTADetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A83878F218A0367C00B386D6 /* CGTADetailViewController.m */; }; 18 | A881853E18A9B622002803FC /* CGTAImagesCatalog.m in Sources */ = {isa = PBXBuildFile; fileRef = A838791518A0455E00B386D6 /* CGTAImagesCatalog.m */; }; 19 | A881853F18A9B622002803FC /* CGTAMainStoryboardIdentifiers.m in Sources */ = {isa = PBXBuildFile; fileRef = A838793218A0557E00B386D6 /* CGTAMainStoryboardIdentifiers.m */; }; 20 | A881854018A9B622002803FC /* CGTATestAppColorList.m in Sources */ = {isa = PBXBuildFile; fileRef = A838791918A04AB300B386D6 /* CGTATestAppColorList.m */; }; 21 | A881854118A9B622002803FC /* CGTAImagesCatalog+RuntimeHackery.m in Sources */ = {isa = PBXBuildFile; fileRef = A838793518A05B6D00B386D6 /* CGTAImagesCatalog+RuntimeHackery.m */; }; 22 | A881854218A9B622002803FC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A83878E518A0367C00B386D6 /* main.m */; }; 23 | A881854418A9B663002803FC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A83878EB18A0367C00B386D6 /* Main.storyboard */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | A881852D18A9B520002803FC /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = A881852718A9B520002803FC /* codegenutils.xcodeproj */; 30 | proxyType = 2; 31 | remoteGlobalIDString = A89D8FE317CFFDCE0077F2B5; 32 | remoteInfo = assetgen; 33 | }; 34 | A881852F18A9B520002803FC /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = A881852718A9B520002803FC /* codegenutils.xcodeproj */; 37 | proxyType = 2; 38 | remoteGlobalIDString = A885F89B17DA8C7A00A29164; 39 | remoteInfo = colordump; 40 | }; 41 | A881853118A9B520002803FC /* PBXContainerItemProxy */ = { 42 | isa = PBXContainerItemProxy; 43 | containerPortal = A881852718A9B520002803FC /* codegenutils.xcodeproj */; 44 | proxyType = 2; 45 | remoteGlobalIDString = A838791F18A04BF700B386D6; 46 | remoteInfo = identifierconstants; 47 | }; 48 | A881853318A9B53F002803FC /* PBXContainerItemProxy */ = { 49 | isa = PBXContainerItemProxy; 50 | containerPortal = A881852718A9B520002803FC /* codegenutils.xcodeproj */; 51 | proxyType = 1; 52 | remoteGlobalIDString = A89D8FE217CFFDCE0077F2B5; 53 | remoteInfo = assetgen; 54 | }; 55 | A881853518A9B53F002803FC /* PBXContainerItemProxy */ = { 56 | isa = PBXContainerItemProxy; 57 | containerPortal = A881852718A9B520002803FC /* codegenutils.xcodeproj */; 58 | proxyType = 1; 59 | remoteGlobalIDString = A885F89A17DA8C7A00A29164; 60 | remoteInfo = colordump; 61 | }; 62 | A881853718A9B53F002803FC /* PBXContainerItemProxy */ = { 63 | isa = PBXContainerItemProxy; 64 | containerPortal = A881852718A9B520002803FC /* codegenutils.xcodeproj */; 65 | proxyType = 1; 66 | remoteGlobalIDString = A838791E18A04BF700B386D6; 67 | remoteInfo = identifierconstants; 68 | }; 69 | /* End PBXContainerItemProxy section */ 70 | 71 | /* Begin PBXFileReference section */ 72 | A83878D918A0367C00B386D6 /* CodeGenTestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CodeGenTestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 73 | A83878DB18A0367C00B386D6 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 74 | A83878E118A0367C00B386D6 /* CodeGenTestApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CodeGenTestApp-Info.plist"; sourceTree = ""; }; 75 | A83878E318A0367C00B386D6 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 76 | A83878E518A0367C00B386D6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 77 | A83878E718A0367C00B386D6 /* CodeGenTestApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CodeGenTestApp-Prefix.pch"; sourceTree = ""; }; 78 | A83878E818A0367C00B386D6 /* CGTAAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CGTAAppDelegate.h; sourceTree = ""; }; 79 | A83878E918A0367C00B386D6 /* CGTAAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CGTAAppDelegate.m; sourceTree = ""; }; 80 | A83878EC18A0367C00B386D6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 81 | A83878EE18A0367C00B386D6 /* CGTAMasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CGTAMasterViewController.h; sourceTree = ""; }; 82 | A83878EF18A0367C00B386D6 /* CGTAMasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CGTAMasterViewController.m; sourceTree = ""; }; 83 | A83878F118A0367C00B386D6 /* CGTADetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CGTADetailViewController.h; sourceTree = ""; }; 84 | A83878F218A0367C00B386D6 /* CGTADetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CGTADetailViewController.m; sourceTree = ""; }; 85 | A83878F418A0367C00B386D6 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 86 | A83878FB18A0367C00B386D6 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 87 | A838791418A0455E00B386D6 /* CGTAImagesCatalog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGTAImagesCatalog.h; sourceTree = ""; }; 88 | A838791518A0455E00B386D6 /* CGTAImagesCatalog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGTAImagesCatalog.m; sourceTree = ""; }; 89 | A838791818A04AB300B386D6 /* CGTATestAppColorList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGTATestAppColorList.h; sourceTree = ""; }; 90 | A838791918A04AB300B386D6 /* CGTATestAppColorList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGTATestAppColorList.m; sourceTree = ""; }; 91 | A838793118A0557E00B386D6 /* CGTAMainStoryboardIdentifiers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGTAMainStoryboardIdentifiers.h; sourceTree = ""; }; 92 | A838793218A0557E00B386D6 /* CGTAMainStoryboardIdentifiers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGTAMainStoryboardIdentifiers.m; sourceTree = ""; }; 93 | A838793418A05B6D00B386D6 /* CGTAImagesCatalog+RuntimeHackery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CGTAImagesCatalog+RuntimeHackery.h"; path = "../CGTAImagesCatalog+RuntimeHackery.h"; sourceTree = ""; }; 94 | A838793518A05B6D00B386D6 /* CGTAImagesCatalog+RuntimeHackery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "CGTAImagesCatalog+RuntimeHackery.m"; path = "../CGTAImagesCatalog+RuntimeHackery.m"; sourceTree = ""; }; 95 | A881852518A9B512002803FC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 96 | A881852718A9B520002803FC /* codegenutils.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = codegenutils.xcodeproj; path = ../codegenutils.xcodeproj; sourceTree = ""; }; 97 | A89D8FE617CFFDCE0077F2B5 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 98 | /* End PBXFileReference section */ 99 | 100 | /* Begin PBXFrameworksBuildPhase section */ 101 | A83878D618A0367C00B386D6 /* Frameworks */ = { 102 | isa = PBXFrameworksBuildPhase; 103 | buildActionMask = 2147483647; 104 | files = ( 105 | A881852618A9B512002803FC /* UIKit.framework in Frameworks */, 106 | A83878DC18A0367C00B386D6 /* CoreGraphics.framework in Frameworks */, 107 | A83878DA18A0367C00B386D6 /* Foundation.framework in Frameworks */, 108 | ); 109 | runOnlyForDeploymentPostprocessing = 0; 110 | }; 111 | /* End PBXFrameworksBuildPhase section */ 112 | 113 | /* Begin PBXGroup section */ 114 | A83878DF18A0367C00B386D6 /* CodeGenTestApp */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | A83878E818A0367C00B386D6 /* CGTAAppDelegate.h */, 118 | A83878E918A0367C00B386D6 /* CGTAAppDelegate.m */, 119 | A83878EB18A0367C00B386D6 /* Main.storyboard */, 120 | A83878F418A0367C00B386D6 /* Images.xcassets */, 121 | A83878EE18A0367C00B386D6 /* CGTAMasterViewController.h */, 122 | A83878EF18A0367C00B386D6 /* CGTAMasterViewController.m */, 123 | A83878F118A0367C00B386D6 /* CGTADetailViewController.h */, 124 | A83878F218A0367C00B386D6 /* CGTADetailViewController.m */, 125 | A838791718A0456500B386D6 /* Derived Sources */, 126 | A83878E018A0367C00B386D6 /* Supporting Files */, 127 | ); 128 | name = CodeGenTestApp; 129 | sourceTree = SOURCE_ROOT; 130 | }; 131 | A83878E018A0367C00B386D6 /* Supporting Files */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | A83878E118A0367C00B386D6 /* CodeGenTestApp-Info.plist */, 135 | A83878E218A0367C00B386D6 /* InfoPlist.strings */, 136 | A83878E518A0367C00B386D6 /* main.m */, 137 | A83878E718A0367C00B386D6 /* CodeGenTestApp-Prefix.pch */, 138 | ); 139 | name = "Supporting Files"; 140 | sourceTree = ""; 141 | }; 142 | A838791718A0456500B386D6 /* Derived Sources */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | A838791418A0455E00B386D6 /* CGTAImagesCatalog.h */, 146 | A838791518A0455E00B386D6 /* CGTAImagesCatalog.m */, 147 | A838793118A0557E00B386D6 /* CGTAMainStoryboardIdentifiers.h */, 148 | A838793218A0557E00B386D6 /* CGTAMainStoryboardIdentifiers.m */, 149 | A838791818A04AB300B386D6 /* CGTATestAppColorList.h */, 150 | A838791918A04AB300B386D6 /* CGTATestAppColorList.m */, 151 | A838793418A05B6D00B386D6 /* CGTAImagesCatalog+RuntimeHackery.h */, 152 | A838793518A05B6D00B386D6 /* CGTAImagesCatalog+RuntimeHackery.m */, 153 | ); 154 | path = "Derived Sources"; 155 | sourceTree = ""; 156 | }; 157 | A881852818A9B520002803FC /* Products */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | A881852E18A9B520002803FC /* objc-assetgen */, 161 | A881853018A9B520002803FC /* objc-colordump */, 162 | A881853218A9B520002803FC /* objc-identifierconstants */, 163 | ); 164 | name = Products; 165 | sourceTree = ""; 166 | }; 167 | A89D8FDA17CFFDCE0077F2B5 = { 168 | isa = PBXGroup; 169 | children = ( 170 | A83878DF18A0367C00B386D6 /* CodeGenTestApp */, 171 | A89D8FE517CFFDCE0077F2B5 /* Frameworks */, 172 | A89D8FE417CFFDCE0077F2B5 /* Products */, 173 | ); 174 | sourceTree = ""; 175 | }; 176 | A89D8FE417CFFDCE0077F2B5 /* Products */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | A83878D918A0367C00B386D6 /* CodeGenTestApp.app */, 180 | ); 181 | name = Products; 182 | sourceTree = ""; 183 | }; 184 | A89D8FE517CFFDCE0077F2B5 /* Frameworks */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | A881852718A9B520002803FC /* codegenutils.xcodeproj */, 188 | A881852518A9B512002803FC /* UIKit.framework */, 189 | A89D8FE617CFFDCE0077F2B5 /* Foundation.framework */, 190 | A83878DB18A0367C00B386D6 /* CoreGraphics.framework */, 191 | A83878FB18A0367C00B386D6 /* XCTest.framework */, 192 | ); 193 | name = Frameworks; 194 | sourceTree = ""; 195 | }; 196 | /* End PBXGroup section */ 197 | 198 | /* Begin PBXNativeTarget section */ 199 | A83878D818A0367C00B386D6 /* CodeGenTestApp */ = { 200 | isa = PBXNativeTarget; 201 | buildConfigurationList = A838790D18A0367D00B386D6 /* Build configuration list for PBXNativeTarget "CodeGenTestApp" */; 202 | buildPhases = ( 203 | A838791318A043D300B386D6 /* Run Script */, 204 | A83878D518A0367C00B386D6 /* Sources */, 205 | A83878D618A0367C00B386D6 /* Frameworks */, 206 | A83878D718A0367C00B386D6 /* Resources */, 207 | ); 208 | buildRules = ( 209 | ); 210 | dependencies = ( 211 | A881853418A9B53F002803FC /* PBXTargetDependency */, 212 | A881853618A9B53F002803FC /* PBXTargetDependency */, 213 | A881853818A9B53F002803FC /* PBXTargetDependency */, 214 | ); 215 | name = CodeGenTestApp; 216 | productName = CodeGenTestApp; 217 | productReference = A83878D918A0367C00B386D6 /* CodeGenTestApp.app */; 218 | productType = "com.apple.product-type.application"; 219 | }; 220 | /* End PBXNativeTarget section */ 221 | 222 | /* Begin PBXProject section */ 223 | A89D8FDB17CFFDCE0077F2B5 /* Project object */ = { 224 | isa = PBXProject; 225 | attributes = { 226 | LastUpgradeCheck = 0500; 227 | ORGANIZATIONNAME = "Square, Inc"; 228 | }; 229 | buildConfigurationList = A89D8FDE17CFFDCE0077F2B5 /* Build configuration list for PBXProject "CodeGenTestApp" */; 230 | compatibilityVersion = "Xcode 3.2"; 231 | developmentRegion = English; 232 | hasScannedForEncodings = 0; 233 | knownRegions = ( 234 | en, 235 | Base, 236 | ); 237 | mainGroup = A89D8FDA17CFFDCE0077F2B5; 238 | productRefGroup = A89D8FE417CFFDCE0077F2B5 /* Products */; 239 | projectDirPath = ""; 240 | projectReferences = ( 241 | { 242 | ProductGroup = A881852818A9B520002803FC /* Products */; 243 | ProjectRef = A881852718A9B520002803FC /* codegenutils.xcodeproj */; 244 | }, 245 | ); 246 | projectRoot = ""; 247 | targets = ( 248 | A83878D818A0367C00B386D6 /* CodeGenTestApp */, 249 | ); 250 | }; 251 | /* End PBXProject section */ 252 | 253 | /* Begin PBXReferenceProxy section */ 254 | A881852E18A9B520002803FC /* objc-assetgen */ = { 255 | isa = PBXReferenceProxy; 256 | fileType = "compiled.mach-o.executable"; 257 | path = "objc-assetgen"; 258 | remoteRef = A881852D18A9B520002803FC /* PBXContainerItemProxy */; 259 | sourceTree = BUILT_PRODUCTS_DIR; 260 | }; 261 | A881853018A9B520002803FC /* objc-colordump */ = { 262 | isa = PBXReferenceProxy; 263 | fileType = "compiled.mach-o.executable"; 264 | path = "objc-colordump"; 265 | remoteRef = A881852F18A9B520002803FC /* PBXContainerItemProxy */; 266 | sourceTree = BUILT_PRODUCTS_DIR; 267 | }; 268 | A881853218A9B520002803FC /* objc-identifierconstants */ = { 269 | isa = PBXReferenceProxy; 270 | fileType = "compiled.mach-o.executable"; 271 | path = "objc-identifierconstants"; 272 | remoteRef = A881853118A9B520002803FC /* PBXContainerItemProxy */; 273 | sourceTree = BUILT_PRODUCTS_DIR; 274 | }; 275 | /* End PBXReferenceProxy section */ 276 | 277 | /* Begin PBXResourcesBuildPhase section */ 278 | A83878D718A0367C00B386D6 /* Resources */ = { 279 | isa = PBXResourcesBuildPhase; 280 | buildActionMask = 2147483647; 281 | files = ( 282 | A881854418A9B663002803FC /* Main.storyboard in Resources */, 283 | A881853A18A9B614002803FC /* Images.xcassets in Resources */, 284 | A83878E418A0367C00B386D6 /* InfoPlist.strings in Resources */, 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | /* End PBXResourcesBuildPhase section */ 289 | 290 | /* Begin PBXShellScriptBuildPhase section */ 291 | A838791318A043D300B386D6 /* Run Script */ = { 292 | isa = PBXShellScriptBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | ); 296 | inputPaths = ( 297 | ); 298 | name = "Run Script"; 299 | outputPaths = ( 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | shellPath = /bin/sh; 303 | shellScript = "DERIVED_SOURCES=\"$SRCROOT/Derived Sources\"\nTOOL_PATH=$BUILD_ROOT/$CONFIGURATION\n$TOOL_PATH/objc-assetgen -f \"$SRCROOT\" -o \"$DERIVED_SOURCES\" -p CGTA\n$TOOL_PATH/objc-colordump -f \"$SRCROOT\" -o \"$DERIVED_SOURCES\" -p CGTA\n$TOOL_PATH/objc-identifierconstants -f \"$SRCROOT\" -o \"$DERIVED_SOURCES\" -p CGTA\n"; 304 | }; 305 | /* End PBXShellScriptBuildPhase section */ 306 | 307 | /* Begin PBXSourcesBuildPhase section */ 308 | A83878D518A0367C00B386D6 /* Sources */ = { 309 | isa = PBXSourcesBuildPhase; 310 | buildActionMask = 2147483647; 311 | files = ( 312 | A881853918A9B609002803FC /* CGTAAppDelegate.m in Sources */, 313 | A881853C18A9B622002803FC /* CGTAMasterViewController.m in Sources */, 314 | A881853F18A9B622002803FC /* CGTAMainStoryboardIdentifiers.m in Sources */, 315 | A881854118A9B622002803FC /* CGTAImagesCatalog+RuntimeHackery.m in Sources */, 316 | A881853E18A9B622002803FC /* CGTAImagesCatalog.m in Sources */, 317 | A881854018A9B622002803FC /* CGTATestAppColorList.m in Sources */, 318 | A881854218A9B622002803FC /* main.m in Sources */, 319 | A881853D18A9B622002803FC /* CGTADetailViewController.m in Sources */, 320 | ); 321 | runOnlyForDeploymentPostprocessing = 0; 322 | }; 323 | /* End PBXSourcesBuildPhase section */ 324 | 325 | /* Begin PBXTargetDependency section */ 326 | A881853418A9B53F002803FC /* PBXTargetDependency */ = { 327 | isa = PBXTargetDependency; 328 | name = assetgen; 329 | targetProxy = A881853318A9B53F002803FC /* PBXContainerItemProxy */; 330 | }; 331 | A881853618A9B53F002803FC /* PBXTargetDependency */ = { 332 | isa = PBXTargetDependency; 333 | name = colordump; 334 | targetProxy = A881853518A9B53F002803FC /* PBXContainerItemProxy */; 335 | }; 336 | A881853818A9B53F002803FC /* PBXTargetDependency */ = { 337 | isa = PBXTargetDependency; 338 | name = identifierconstants; 339 | targetProxy = A881853718A9B53F002803FC /* PBXContainerItemProxy */; 340 | }; 341 | /* End PBXTargetDependency section */ 342 | 343 | /* Begin PBXVariantGroup section */ 344 | A83878E218A0367C00B386D6 /* InfoPlist.strings */ = { 345 | isa = PBXVariantGroup; 346 | children = ( 347 | A83878E318A0367C00B386D6 /* en */, 348 | ); 349 | name = InfoPlist.strings; 350 | sourceTree = ""; 351 | }; 352 | A83878EB18A0367C00B386D6 /* Main.storyboard */ = { 353 | isa = PBXVariantGroup; 354 | children = ( 355 | A83878EC18A0367C00B386D6 /* Base */, 356 | ); 357 | name = Main.storyboard; 358 | sourceTree = ""; 359 | }; 360 | /* End PBXVariantGroup section */ 361 | 362 | /* Begin XCBuildConfiguration section */ 363 | A838790918A0367D00B386D6 /* Debug */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 367 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 368 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 369 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 370 | FRAMEWORK_SEARCH_PATHS = ( 371 | "$(inherited)", 372 | "$(DEVELOPER_FRAMEWORKS_DIR)", 373 | ); 374 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 375 | GCC_PREFIX_HEADER = "CodeGenTestApp-Prefix.pch"; 376 | GCC_PREPROCESSOR_DEFINITIONS = ( 377 | "DEBUG=1", 378 | "$(inherited)", 379 | ); 380 | INFOPLIST_FILE = "CodeGenTestApp-Info.plist"; 381 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 382 | PRODUCT_NAME = "$(TARGET_NAME)"; 383 | SDKROOT = iphoneos; 384 | WRAPPER_EXTENSION = app; 385 | }; 386 | name = Debug; 387 | }; 388 | A838790A18A0367D00B386D6 /* Release */ = { 389 | isa = XCBuildConfiguration; 390 | buildSettings = { 391 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 392 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 393 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 394 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 395 | FRAMEWORK_SEARCH_PATHS = ( 396 | "$(inherited)", 397 | "$(DEVELOPER_FRAMEWORKS_DIR)", 398 | ); 399 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 400 | GCC_PREFIX_HEADER = "CodeGenTestApp-Prefix.pch"; 401 | INFOPLIST_FILE = "CodeGenTestApp-Info.plist"; 402 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 403 | PRODUCT_NAME = "$(TARGET_NAME)"; 404 | SDKROOT = iphoneos; 405 | VALIDATE_PRODUCT = YES; 406 | WRAPPER_EXTENSION = app; 407 | }; 408 | name = Release; 409 | }; 410 | A89D8FEF17CFFDCE0077F2B5 /* Debug */ = { 411 | isa = XCBuildConfiguration; 412 | buildSettings = { 413 | ALWAYS_SEARCH_USER_PATHS = NO; 414 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 415 | CLANG_CXX_LIBRARY = "libc++"; 416 | CLANG_ENABLE_MODULES = YES; 417 | CLANG_ENABLE_OBJC_ARC = YES; 418 | CLANG_WARN_BOOL_CONVERSION = YES; 419 | CLANG_WARN_CONSTANT_CONVERSION = YES; 420 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 421 | CLANG_WARN_EMPTY_BODY = YES; 422 | CLANG_WARN_ENUM_CONVERSION = YES; 423 | CLANG_WARN_INT_CONVERSION = YES; 424 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 425 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 426 | COPY_PHASE_STRIP = NO; 427 | GCC_C_LANGUAGE_STANDARD = gnu99; 428 | GCC_DYNAMIC_NO_PIC = NO; 429 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 430 | GCC_OPTIMIZATION_LEVEL = 0; 431 | GCC_PREPROCESSOR_DEFINITIONS = ( 432 | "DEBUG=1", 433 | "$(inherited)", 434 | ); 435 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 436 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 437 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 438 | GCC_WARN_UNDECLARED_SELECTOR = YES; 439 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 440 | GCC_WARN_UNUSED_FUNCTION = YES; 441 | GCC_WARN_UNUSED_VARIABLE = YES; 442 | MACOSX_DEPLOYMENT_TARGET = 10.8; 443 | ONLY_ACTIVE_ARCH = YES; 444 | SDKROOT = iphoneos; 445 | }; 446 | name = Debug; 447 | }; 448 | A89D8FF017CFFDCE0077F2B5 /* Release */ = { 449 | isa = XCBuildConfiguration; 450 | buildSettings = { 451 | ALWAYS_SEARCH_USER_PATHS = NO; 452 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 453 | CLANG_CXX_LIBRARY = "libc++"; 454 | CLANG_ENABLE_MODULES = YES; 455 | CLANG_ENABLE_OBJC_ARC = YES; 456 | CLANG_WARN_BOOL_CONVERSION = YES; 457 | CLANG_WARN_CONSTANT_CONVERSION = YES; 458 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 459 | CLANG_WARN_EMPTY_BODY = YES; 460 | CLANG_WARN_ENUM_CONVERSION = YES; 461 | CLANG_WARN_INT_CONVERSION = YES; 462 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 463 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 464 | COPY_PHASE_STRIP = YES; 465 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 466 | ENABLE_NS_ASSERTIONS = NO; 467 | GCC_C_LANGUAGE_STANDARD = gnu99; 468 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 469 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 470 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 471 | GCC_WARN_UNDECLARED_SELECTOR = YES; 472 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 473 | GCC_WARN_UNUSED_FUNCTION = YES; 474 | GCC_WARN_UNUSED_VARIABLE = YES; 475 | MACOSX_DEPLOYMENT_TARGET = 10.8; 476 | SDKROOT = iphoneos; 477 | }; 478 | name = Release; 479 | }; 480 | /* End XCBuildConfiguration section */ 481 | 482 | /* Begin XCConfigurationList section */ 483 | A838790D18A0367D00B386D6 /* Build configuration list for PBXNativeTarget "CodeGenTestApp" */ = { 484 | isa = XCConfigurationList; 485 | buildConfigurations = ( 486 | A838790918A0367D00B386D6 /* Debug */, 487 | A838790A18A0367D00B386D6 /* Release */, 488 | ); 489 | defaultConfigurationIsVisible = 0; 490 | defaultConfigurationName = Release; 491 | }; 492 | A89D8FDE17CFFDCE0077F2B5 /* Build configuration list for PBXProject "CodeGenTestApp" */ = { 493 | isa = XCConfigurationList; 494 | buildConfigurations = ( 495 | A89D8FEF17CFFDCE0077F2B5 /* Debug */, 496 | A89D8FF017CFFDCE0077F2B5 /* Release */, 497 | ); 498 | defaultConfigurationIsVisible = 0; 499 | defaultConfigurationName = Release; 500 | }; 501 | /* End XCConfigurationList section */ 502 | }; 503 | rootObject = A89D8FDB17CFFDCE0077F2B5 /* Project object */; 504 | } 505 | -------------------------------------------------------------------------------- /CodeGenTestApp/CodeGenTestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CodeGenTestApp/Derived Sources/.gitignore: -------------------------------------------------------------------------------- 1 | *.h 2 | *.m 3 | -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Argentina.imageset/Argentina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Argentina.imageset/Argentina.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Argentina.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Argentina.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Australia.imageset/Australia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Australia.imageset/Australia.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Australia.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Australia.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Austria.imageset/Austria.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Austria.imageset/Austria.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Austria.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Austria.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Belgium.imageset/Belgium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Belgium.imageset/Belgium.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Belgium.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Belgium.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Brazil.imageset/Brazil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Brazil.imageset/Brazil.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Brazil.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Brazil.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Cameroon.imageset/Cameroon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Cameroon.imageset/Cameroon.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Cameroon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Cameroon.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Canada.imageset/Canada.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Canada.imageset/Canada.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Canada.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Canada.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Chile.imageset/Chile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Chile.imageset/Chile.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Chile.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Chile.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/China.imageset/China.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/China.imageset/China.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/China.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "China.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Denmark.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Denmark.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Denmark.imageset/Denmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Denmark.imageset/Denmark.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Finland.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Finland.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Finland.imageset/Finland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Finland.imageset/Finland.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/France.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "France.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/France.imageset/France.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/France.imageset/France.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Germany.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Germany.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Germany.imageset/Germany.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Germany.imageset/Germany.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Greece.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Greece.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Greece.imageset/Greece.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Greece.imageset/Greece.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Hong Kong.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Hong Kong.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Hong Kong.imageset/Hong Kong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Hong Kong.imageset/Hong Kong.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Hungary.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Hungary.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Hungary.imageset/Hungary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Hungary.imageset/Hungary.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Iceland.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Iceland.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Iceland.imageset/Iceland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Iceland.imageset/Iceland.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/India.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "India.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/India.imageset/India.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/India.imageset/India.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Indonesia.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Indonesia.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Indonesia.imageset/Indonesia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Indonesia.imageset/Indonesia.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Ireland.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Ireland.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Ireland.imageset/Ireland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Ireland.imageset/Ireland.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Israel.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Israel.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Israel.imageset/Israel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Israel.imageset/Israel.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Italy.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Italy.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Italy.imageset/Italy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Italy.imageset/Italy.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Japan.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Japan.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Japan.imageset/Japan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Japan.imageset/Japan.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Malaysia.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Malaysia.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Malaysia.imageset/Malaysia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Malaysia.imageset/Malaysia.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Mexico.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Mexico.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Mexico.imageset/Mexico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Mexico.imageset/Mexico.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Netherlands.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Netherlands.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Netherlands.imageset/Netherlands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Netherlands.imageset/Netherlands.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/New Zealand.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "New Zealand.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/New Zealand.imageset/New Zealand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/New Zealand.imageset/New Zealand.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Norway.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Norway.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Norway.imageset/Norway.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Norway.imageset/Norway.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Pakistan.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Pakistan.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Pakistan.imageset/Pakistan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Pakistan.imageset/Pakistan.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Palestine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Palestine.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Palestine.imageset/Palestine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Palestine.imageset/Palestine.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Peru.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Peru.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Peru.imageset/Peru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Peru.imageset/Peru.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Poland.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Poland.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Poland.imageset/Poland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Poland.imageset/Poland.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Portugal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Portugal.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Portugal.imageset/Portugal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Portugal.imageset/Portugal.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Puerto Rico.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Puerto Rico.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Puerto Rico.imageset/Puerto Rico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Puerto Rico.imageset/Puerto Rico.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Romania.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Romania.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Romania.imageset/Romania.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Romania.imageset/Romania.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Russia.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Russia.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Russia.imageset/Russia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Russia.imageset/Russia.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Saudi Arabia.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Saudi Arabia.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Saudi Arabia.imageset/Saudi Arabia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Saudi Arabia.imageset/Saudi Arabia.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Singapore.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Singapore.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Singapore.imageset/Singapore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Singapore.imageset/Singapore.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/South Africa.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "South Africa.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/South Africa.imageset/South Africa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/South Africa.imageset/South Africa.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/South Korea.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "South Korea.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/South Korea.imageset/South Korea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/South Korea.imageset/South Korea.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Spain.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Spain.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Spain.imageset/Spain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Spain.imageset/Spain.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Sweden.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Sweden.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Sweden.imageset/Sweden.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Sweden.imageset/Sweden.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Switzerland.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Switzerland.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Switzerland.imageset/Switzerland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Switzerland.imageset/Switzerland.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Thailand.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Thailand.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Thailand.imageset/Thailand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Thailand.imageset/Thailand.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Turkey.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Turkey.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Turkey.imageset/Turkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Turkey.imageset/Turkey.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/UK.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "UK.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/UK.imageset/UK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/UK.imageset/UK.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/USA.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "USA.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/USA.imageset/USA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/USA.imageset/USA.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Ukraine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Ukraine.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Ukraine.imageset/Ukraine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Ukraine.imageset/Ukraine.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Uruguay.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Uruguay.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Uruguay.imageset/Uruguay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Uruguay.imageset/Uruguay.png -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Venezuela.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Venezuela.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeGenTestApp/Images.xcassets/Venezuela.imageset/Venezuela.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Images.xcassets/Venezuela.imageset/Venezuela.png -------------------------------------------------------------------------------- /CodeGenTestApp/Test App.clr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/CodeGenTestApp/Test App.clr -------------------------------------------------------------------------------- /CodeGenTestApp/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /CodeGenTestApp/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CodeGenTestApp 4 | // 5 | // Created by Jim Puls on 2/3/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | 11 | #import "CGTAAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([CGTAAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Documentation/colorpicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/Documentation/colorpicker.png -------------------------------------------------------------------------------- /Documentation/storyboardhaters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puls/objc-codegenutils/9ecd051c3f927a296f4882b7f7d790b1425fcf55/Documentation/storyboardhaters.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | codegenutils 2 | Copyright 2014 Square, Inc. 3 | A full list of contributors is available at https://github.com/square/objc-codegenutils/contributors 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # codegenutils 2 | 3 | We love Xcode 5. It's been adding way cool features at a really fast pace, and adopting these features is the quickest way to bliss in life. 4 | 5 | (Or at least iOS development bliss.) 6 | 7 | But sometimes these boss new features don't quite get all the way. In the interest of meeting the tools halfway, we present three small code generators to improve your life in subtle ways. 8 | 9 | ## objc-assetgen 10 | 11 | Xcode 5 has an awesome new feature called "[asset catalogs](https://developer.apple.com/technologies/tools/features.html)", allowing you to specify all of your image variants and resizable cap insets in a single place. 12 | 13 | Unfortunately, to get the full benefits, you have to set your deployment target to iOS 7; otherwise, Xcode will dutifully put all of the images into your app bundle but totally ignore all of your resizable insets with only a build warning. 14 | 15 | And even if you're targeting iOS 7, you'll still have to deal with typing string filenames correctly. And [everybody knows that stringly-typed code is bad.](http://c2.com/cgi/wiki?StringlyTyped) (While you're at it, consider replacing your stringly-typed key paths with [a macro to check them at compile time!](https://gist.github.com/kyleve/8213806)) 16 | 17 | But shucks! The important and awesome part is the editor, and it puts all of the data out in super-readable JSON. We should be able to do a poor man's version that reads in the data and spits out some code to give you most of the benefits. 18 | 19 | ### Usage 20 | 21 | Call `objc-assetgen` with the `.xcassets` paths as arguments from the directory into which it should output the code. 22 | 23 | For an asset catalog named "Foo" containing image sets "Bar" and "Baz", you'll get `FooCatalog.h` and `FooCatalog.m`, with class methods `+ (UIImage *)barImage` and `+ (UIImage *)bazImage`. Put them in your DerivedSources folder and you're good to go. 24 | 25 | ## objc-colordump 26 | 27 | On Mac OS X, the standard system color picker has a tab for palette-based colors: 28 | 29 | ![System color picker](Documentation/colorpicker.png) 30 | 31 | One little-known feature of this color picker tab is that you can create your own palettes and fill them with the custom colors for your app. 32 | 33 | In the spirit of [Once and Only Once](http://c2.com/cgi/wiki?OnceAndOnlyOnce), once you've used these colors in your storyboards and nib files, you won't want to have to define them again for that rare occasion you're using them in code. Luckily, your custom color palettes are just files in `~/Library/Colors`, and we can read them and give your app access to them. 34 | 35 | Running the tool will also install the palette into your system color picker, so the other developers on your team can use your colors in their storyboards. 36 | 37 | ### Usage 38 | 39 | Call `objc-colordump` with the `.clr` paths as arguments from the directory into which it should output the code. 40 | 41 | For a color palette named "Foo" colors named "Bar" and "Baz", you'll get `FooColorList.h` and `FooColorList.m`, with class methods `+ (UIColor *)barColor` and `+ (UIColor *)bazColor`. Put them in your DerivedSources folder and you're good to go. 42 | 43 | ## objc-identifierconstants 44 | 45 | [Storyboards](https://developer.apple.com/library/ios/documentation/general/conceptual/Devpedia-CocoaApp/Storyboard.html) are great. They let you visually lay out your interface and define the interactions between different screens in a way that's much more compact than writing a ton of view code. 46 | 47 | At least I think so. But if you go and search for more information on storyboards, one of the first things you'll find is this Stack Overflow answer: 48 | 49 | [![Storyboard haters](Documentation/storyboardhaters.png)](http://stackoverflow.com/a/19457257/6010) 50 | 51 | We already fixed the part about code reuse with `objc-colordump`, and now we can fix the parts about failures at runtime. If we generate some code to turn your string identifiers—and that's any kind of string identifier, be it a view controller identifier, a segue identifier, or a cell reuse identifier—into compiler-checked constants, we can avoid a whole class of problems. 52 | 53 | ### Usage 54 | 55 | Call `objc-identifierconstants` with the `.storyboard` paths as arguments from the directory into which it should output the code. 56 | 57 | For a storyboard named "Foo" with view controller identifier "Bar" and segue identifier "Baz" somewhere in it, you'll get `FooStoryboardIdentifiers.h` and `FooStoryboardIdentifiers.m` with `extern NSString *const FooStoryboardBarIdentifier` and `extern NSString *const FooStoryboardBazIdentifier` in it. Put them in your DerivedSources folder and you're good to go. 58 | 59 | ## Command-line options (common to all three tools) 60 | 61 | Usage: 62 | * `objc-assetgen [-6] [-o ] [-f ] [-p ] []` 63 | * `objc-colordump [-6] [-o ] [-f ] [-p ] []` 64 | * `objc-identifierconstants [-6] [-o ] [-f ] [-p ] []` 65 | 66 | Options: 67 |
68 |
-6
Target iOS 6 in addition to iOS 7
69 |
-o <path>
Output files at <path>
70 |
-f <path>
Search for input files starting from <path>
71 |
-p <prefix>
Use <prefix> as the class prefix in the generated code
72 |
-h
Print this help and exit
73 |
<paths>
Input files; this and/or `-f` are required.
74 |
75 | 76 | ## Contributing 77 | 78 | We're glad you're interested in codegenutils, and we'd love to see where you take it. When you have a change you'd like to see in the master repository, [send a pull request](https://github.com/square/objc-codegenutils/pulls). 79 | 80 | Thanks, and happy generating! 81 | -------------------------------------------------------------------------------- /Shared/CGUCodeGenTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGUCodeGenTool.h 3 | // codegenutils 4 | // 5 | // Created by Jim Puls on 9/6/13. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface CGUCodeGenTool : NSObject 14 | 15 | + (int)startWithArgc:(int)argc argv:(const char **)argv; 16 | 17 | + (NSString *)inputFileExtension; 18 | 19 | @property (copy) NSURL *inputURL; 20 | @property (copy) NSString *classPrefix; 21 | @property BOOL targetiOS6; 22 | @property BOOL skipClassDeclaration; 23 | 24 | @property (copy) NSString *className; 25 | @property (strong) NSMutableArray *interfaceContents; 26 | @property (strong) NSMutableArray *implementationContents; 27 | 28 | - (void)startWithCompletionHandler:(dispatch_block_t)completionBlock; 29 | 30 | - (void)writeOutputFiles; 31 | 32 | - (NSString *)methodNameForKey:(NSString *)key; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Shared/CGUCodeGenTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // CGUCodeGenTool.m 3 | // codegenutils 4 | // 5 | // Created by Jim Puls on 9/6/13. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CGUCodeGenTool.h" 11 | 12 | #import 13 | 14 | 15 | @interface CGUCodeGenTool () 16 | 17 | @property (copy) NSString *toolName; 18 | 19 | @end 20 | 21 | 22 | @implementation CGUCodeGenTool 23 | 24 | + (NSString *)inputFileExtension; 25 | { 26 | NSAssert(NO, @"Unimplemented abstract method: %@", NSStringFromSelector(_cmd)); 27 | return nil; 28 | } 29 | 30 | + (int)startWithArgc:(int)argc argv:(const char **)argv; 31 | { 32 | char opt = -1; 33 | NSURL *searchURL = nil; 34 | NSString *classPrefix = @""; 35 | BOOL target6 = NO; 36 | NSMutableArray *inputURLs = [NSMutableArray array]; 37 | 38 | while ((opt = getopt(argc, (char *const*)argv, "o:f:p:h6")) != -1) { 39 | switch (opt) { 40 | case 'h': { 41 | printf("Usage: %s [-6] [-o ] [-f ] [-p ] []\n", basename((char *)argv[0])); 42 | printf(" %s -h\n\n", basename((char *)argv[0])); 43 | printf("Options:\n"); 44 | printf(" -6 Target iOS 6 in addition to iOS 7\n"); 45 | printf(" -o Output files at \n"); 46 | printf(" -f Search for *.%s folders starting from \n", [[self inputFileExtension] UTF8String]); 47 | printf(" -p Use as the class prefix in the generated code\n"); 48 | printf(" -h Print this help and exit\n"); 49 | printf(" Input files; this and/or -f are required.\n"); 50 | return 0; 51 | } 52 | 53 | case 'o': { 54 | NSString *outputPath = [[NSString alloc] initWithUTF8String:optarg]; 55 | outputPath = [outputPath stringByExpandingTildeInPath]; 56 | [[NSFileManager defaultManager] changeCurrentDirectoryPath:outputPath]; 57 | break; 58 | } 59 | 60 | case 'f': { 61 | NSString *searchPath = [[NSString alloc] initWithUTF8String:optarg]; 62 | searchPath = [searchPath stringByExpandingTildeInPath]; 63 | searchURL = [NSURL fileURLWithPath:searchPath]; 64 | break; 65 | } 66 | 67 | case 'p': { 68 | classPrefix = [[NSString alloc] initWithUTF8String:optarg]; 69 | break; 70 | } 71 | 72 | case '6': { 73 | target6 = YES; 74 | break; 75 | } 76 | 77 | default: 78 | break; 79 | } 80 | } 81 | 82 | for (int index = optind; index < argc; index++) { 83 | NSString *inputPath = [[NSString alloc] initWithUTF8String:argv[index]]; 84 | inputPath = [inputPath stringByExpandingTildeInPath]; 85 | [inputURLs addObject:[NSURL fileURLWithPath:inputPath]]; 86 | } 87 | 88 | if (searchURL) { 89 | NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtURL:searchURL includingPropertiesForKeys:@[NSURLNameKey] options:0 errorHandler:NULL]; 90 | for (NSURL *url in enumerator) { 91 | if ([url.pathExtension isEqualToString:[self inputFileExtension]]) { 92 | [inputURLs addObject:url]; 93 | } 94 | } 95 | } 96 | 97 | dispatch_group_t group = dispatch_group_create(); 98 | 99 | for (NSURL *url in inputURLs) { 100 | dispatch_group_enter(group); 101 | 102 | CGUCodeGenTool *target = [self new]; 103 | target.inputURL = url; 104 | target.targetiOS6 = target6; 105 | target.classPrefix = classPrefix; 106 | target.toolName = [[NSString stringWithUTF8String:argv[0]] lastPathComponent]; 107 | [target startWithCompletionHandler:^{ 108 | dispatch_group_leave(group); 109 | }]; 110 | } 111 | 112 | dispatch_group_wait(group, DISPATCH_TIME_FOREVER); 113 | return 0; 114 | } 115 | 116 | - (void)startWithCompletionHandler:(dispatch_block_t)completionBlock; 117 | { 118 | NSAssert(NO, @"Unimplemented abstract method: %@", NSStringFromSelector(_cmd)); 119 | } 120 | 121 | - (void)writeOutputFiles; 122 | { 123 | NSAssert(self.className, @"Class name isn't set"); 124 | 125 | NSString *classNameH = [self.className stringByAppendingPathExtension:@"h"]; 126 | NSString *classNameM = [self.className stringByAppendingPathExtension:@"m"]; 127 | 128 | NSURL *currentDirectory = [NSURL fileURLWithPath:[[NSFileManager new] currentDirectoryPath]]; 129 | NSURL *interfaceURL = [currentDirectory URLByAppendingPathComponent:classNameH]; 130 | NSURL *implementationURL = [currentDirectory URLByAppendingPathComponent:classNameM]; 131 | 132 | [self.interfaceContents sortUsingComparator:^NSComparisonResult(id obj1, id obj2) { 133 | return [obj1 compare:obj2]; 134 | }]; 135 | [self.implementationContents sortUsingComparator:^NSComparisonResult(id obj1, id obj2) { 136 | return [obj1 compare:obj2]; 137 | }]; 138 | 139 | NSMutableString *interface = [NSMutableString stringWithFormat:@"//\n// This file is generated from %@ by %@.\n// Please do not edit.\n//\n\n#import \n\n\n", self.inputURL.lastPathComponent, self.toolName]; 140 | 141 | if (self.skipClassDeclaration) { 142 | [interface appendString:[self.interfaceContents componentsJoinedByString:@""]]; 143 | } else { 144 | [interface appendFormat:@"@interface %@ : NSObject\n\n%@\n@end\n", self.className, [self.interfaceContents componentsJoinedByString:@""]]; 145 | } 146 | 147 | if (![interface isEqualToString:[NSString stringWithContentsOfURL:interfaceURL encoding:NSUTF8StringEncoding error:NULL]]) { 148 | [interface writeToURL:interfaceURL atomically:YES encoding:NSUTF8StringEncoding error:NULL]; 149 | } 150 | 151 | NSMutableString *implementation = [NSMutableString stringWithFormat:@"//\n// This file is generated from %@ by %@.\n// Please do not edit.\n//\n\n#import \"%@\"\n\n\n", self.inputURL.lastPathComponent, self.toolName, classNameH]; 152 | if (self.skipClassDeclaration) { 153 | [implementation appendString:[self.implementationContents componentsJoinedByString:@""]]; 154 | } else { 155 | [implementation appendFormat:@"@implementation %@\n\n%@\n@end\n", self.className, [self.implementationContents componentsJoinedByString:@"\n"]]; 156 | } 157 | 158 | if (![implementation isEqualToString:[NSString stringWithContentsOfURL:implementationURL encoding:NSUTF8StringEncoding error:NULL]]) { 159 | [implementation writeToURL:implementationURL atomically:YES encoding:NSUTF8StringEncoding error:NULL]; 160 | } 161 | 162 | NSLog(@"Wrote %@ to %@", self.className, currentDirectory); 163 | } 164 | 165 | - (NSString *)methodNameForKey:(NSString *)key; 166 | { 167 | NSMutableString *mutableKey = [key mutableCopy]; 168 | // If the string is already all caps, it's an abbrevation. Lowercase the whole thing. 169 | // Otherwise, camelcase it by lowercasing the first character. 170 | if ([mutableKey isEqualToString:[mutableKey uppercaseString]]) { 171 | mutableKey = [[mutableKey lowercaseString] mutableCopy]; 172 | } else { 173 | [mutableKey replaceCharactersInRange:NSMakeRange(0, 1) withString:[[key substringToIndex:1] lowercaseString]]; 174 | } 175 | [mutableKey replaceOccurrencesOfString:@" " withString:@"" options:0 range:NSMakeRange(0, mutableKey.length)]; 176 | [mutableKey replaceOccurrencesOfString:@"~" withString:@"" options:0 range:NSMakeRange(0, mutableKey.length)]; 177 | [mutableKey replaceOccurrencesOfString:@"@" withString:@"" options:0 range:NSMakeRange(0, mutableKey.length)]; 178 | [mutableKey replaceOccurrencesOfString:@"-" withString:@"_" options:0 range:NSMakeRange(0, mutableKey.length)]; 179 | return [mutableKey copy]; 180 | } 181 | 182 | @end 183 | -------------------------------------------------------------------------------- /assetgen/AGCatalogParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // AGCatalogParser.h 3 | // assetgen 4 | // 5 | // Created by Jim Puls on 8/29/13. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CGUCodeGenTool.h" 11 | 12 | 13 | @interface AGCatalogParser : CGUCodeGenTool 14 | @end 15 | -------------------------------------------------------------------------------- /assetgen/AGCatalogParser.m: -------------------------------------------------------------------------------- 1 | // 2 | // AGCatalogParser.m 3 | // assetgen 4 | // 5 | // Created by Jim Puls on 8/29/13. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "AGCatalogParser.h" 11 | 12 | 13 | @interface AGCatalogParser () 14 | 15 | @property (strong) NSArray *imageSetURLs; 16 | 17 | @end 18 | 19 | 20 | @implementation AGCatalogParser 21 | 22 | + (NSString *)inputFileExtension; 23 | { 24 | return @"xcassets"; 25 | } 26 | 27 | - (void)startWithCompletionHandler:(dispatch_block_t)completionBlock; 28 | { 29 | dispatch_group_t dispatchGroup = dispatch_group_create(); 30 | dispatch_queue_t dispatchQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); 31 | dispatch_async(dispatchQueue, ^{ 32 | [self findImageSetURLs]; 33 | 34 | self.interfaceContents = [NSMutableArray array]; 35 | self.implementationContents = [NSMutableArray array]; 36 | 37 | self.className = [[NSString stringWithFormat:@"%@%@Catalog", self.classPrefix, [[self.inputURL lastPathComponent] stringByDeletingPathExtension]] stringByReplacingOccurrencesOfString:@" " withString:@""]; 38 | 39 | for (NSURL *imageSetURL in self.imageSetURLs) { 40 | dispatch_group_async(dispatchGroup, dispatchQueue, ^{ 41 | [self parseImageSetAtURL:imageSetURL]; 42 | }); 43 | } 44 | 45 | dispatch_group_wait(dispatchGroup, DISPATCH_TIME_FOREVER); 46 | 47 | [self writeOutputFiles]; 48 | 49 | completionBlock(); 50 | }); 51 | } 52 | 53 | - (void)findImageSetURLs; 54 | { 55 | NSMutableArray *imageSetURLs = [NSMutableArray array]; 56 | NSDirectoryEnumerator *enumerator = [[NSFileManager new] enumeratorAtURL:self.inputURL includingPropertiesForKeys:@[NSURLNameKey] options:0 errorHandler:NULL]; 57 | for (NSURL *url in enumerator) { 58 | if ([url.pathExtension isEqualToString:@"imageset"]) { 59 | [imageSetURLs addObject:url]; 60 | } 61 | } 62 | self.imageSetURLs = [imageSetURLs copy]; 63 | } 64 | 65 | - (void)parseImageSetAtURL:(NSURL *)url; 66 | { 67 | NSString *imageSetName = [[url lastPathComponent] stringByDeletingPathExtension]; 68 | NSString *methodName = [self methodNameForKey:imageSetName]; 69 | NSURL *contentsURL = [url URLByAppendingPathComponent:@"Contents.json"]; 70 | NSData *contentsData = [NSData dataWithContentsOfURL:contentsURL options:NSDataReadingMappedIfSafe error:NULL]; 71 | if (!contentsData) { 72 | return; 73 | } 74 | 75 | NSDictionary *contents = [NSJSONSerialization JSONObjectWithData:contentsData options:0 error:NULL]; 76 | if (!contents) { 77 | return; 78 | } 79 | 80 | // Sort the variants: retina4 comes first, then iphone/ipad-specific, then universal 81 | // Within each group, 2x comes before 1x 82 | NSArray *variants = [contents[@"images"] sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) { 83 | if (![obj1[@"subtype"] isEqualToString:obj2[@"subtype"]]) { 84 | if (obj1[@"subtype"]) { 85 | return NSOrderedDescending; 86 | } 87 | if (obj2[@"subtype"]) { 88 | return NSOrderedAscending; 89 | } 90 | } 91 | 92 | if (![obj1[@"idiom"] isEqualToString:obj2[@"idiom"]]) { 93 | if ([obj1[@"idiom"] isEqualToString:@"universal"]) { 94 | return NSOrderedDescending; 95 | } 96 | if ([obj2[@"idiom"] isEqualToString:@"universal"]) { 97 | return NSOrderedAscending; 98 | } 99 | } 100 | 101 | return -[obj1[@"scale"] compare:obj2[@"scale"]]; 102 | }]; 103 | 104 | NSString *interface = [NSString stringWithFormat:@"+ (UIImage *)%@Image;\n", methodName]; 105 | @synchronized(self.interfaceContents) { 106 | [self.interfaceContents addObject:interface]; 107 | } 108 | 109 | NSMutableString *implementation = [interface mutableCopy]; 110 | [implementation appendString:@"{\n"]; 111 | 112 | // If we're only targeting iOS 7, short circuit since the asset catalog will have been compiled for us. 113 | if (!self.targetiOS6) { 114 | [implementation appendFormat:@" return [UIImage imageNamed:@\"%@\"];\n", imageSetName]; 115 | [implementation appendString:@"}\n"]; 116 | } else { 117 | 118 | // If there are only one or two variants and they only differ by 1x or 2x and they're not resizable, short circuit 119 | BOOL shortCircuit = (variants.count == 1); 120 | if (variants.count == 2) { 121 | if (!variants[0][@"resizing"] && !variants[1][@"resizing"]) { 122 | NSString *filename1 = [variants[0][@"filename"] stringByReplacingOccurrencesOfString:@"@2x" withString:@""]; 123 | NSString *filename2 = [variants[1][@"filename"] stringByReplacingOccurrencesOfString:@"@2x" withString:@""]; 124 | shortCircuit = [filename1 isEqualToString:filename2]; 125 | } 126 | } 127 | if (shortCircuit) { 128 | [implementation appendFormat:@" return [UIImage imageNamed:@\"%@\"];\n", [variants lastObject][@"filename"]]; 129 | [implementation appendString:@"}\n"]; 130 | 131 | } else { 132 | [implementation appendString:@" UIImage *image = nil;\n\n"]; 133 | 134 | for (NSDictionary *variant in variants) { 135 | if (!variant[@"filename"]) { 136 | continue; 137 | } 138 | BOOL isUniversal = [variant[@"idiom"] isEqualToString:@"universal"]; 139 | BOOL isRetina4Inch = [variant[@"subtype"] isEqualToString:@"retina4"]; 140 | NSString *indentation = @""; 141 | if (!isUniversal) { 142 | NSString *idiom = [variant[@"idiom"] isEqualToString:@"iphone"] ? @"UIUserInterfaceIdiomPhone" : @"UIUserInterfaceIdiomPad"; 143 | [implementation appendFormat:@" if (UI_USER_INTERFACE_IDIOM() == %@%@) {\n", idiom, isRetina4Inch ? @" && [UIScreen mainScreen].bounds.size.height == 568.0f" : @""]; 144 | indentation = @" "; 145 | } 146 | 147 | CGFloat scale = [variant[@"scale"] floatValue]; 148 | NSString *sizeExtension = isRetina4Inch ? @"-568h" : @""; 149 | NSString *filename = [variant[@"filename"] stringByReplacingOccurrencesOfString:[NSString stringWithFormat:@"@%@", variant[@"scale"]] withString:sizeExtension]; 150 | NSString *scaleIndentation = [indentation stringByAppendingString:@" "]; 151 | [implementation appendFormat:@"%@if ([UIScreen mainScreen].scale == %.1ff) {\n", scaleIndentation, scale]; 152 | [implementation appendFormat:@"%@ image = [UIImage imageNamed:@\"%@\"];\n", scaleIndentation, filename]; 153 | 154 | NSDictionary *resizing = variant[@"resizing"]; 155 | if (resizing) { 156 | CGFloat top = [resizing[@"capInsets"][@"top"] floatValue] / scale; 157 | CGFloat left = [resizing[@"capInsets"][@"left"] floatValue] / scale; 158 | CGFloat bottom = [resizing[@"capInsets"][@"bottom"] floatValue] / scale; 159 | CGFloat right = [resizing[@"capInsets"][@"right"] floatValue] / scale; 160 | NSString *mode = [resizing[@"center"][@"mode"] isEqualToString:@"stretch"] ? @"UIImageResizingModeStretch" : @"UIImageResizingModeTile"; 161 | 162 | [implementation appendFormat:@"%@ image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(%.1ff, %.1ff, %.1ff, %.1ff) resizingMode:%@];\n", scaleIndentation, top, left, bottom, right, mode]; 163 | } 164 | 165 | [implementation appendFormat:@"%@}\n", scaleIndentation]; 166 | 167 | if (!isUniversal) { 168 | [implementation appendFormat:@"%@}\n", indentation]; 169 | } 170 | 171 | [implementation appendString:@"\n"]; 172 | } 173 | 174 | [implementation appendString:@" return image;\n"]; 175 | [implementation appendString:@"}\n"]; 176 | } 177 | } 178 | 179 | @synchronized(self.implementationContents) { 180 | [self.implementationContents addObject:implementation]; 181 | } 182 | } 183 | 184 | @end 185 | -------------------------------------------------------------------------------- /assetgen/assetgen-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /assetgen/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // assetgen 4 | // 5 | // Created by Jim Puls on 8/29/13. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "AGCatalogParser.h" 11 | 12 | 13 | int main(int argc, const char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return [AGCatalogParser startWithArgc:argc argv:argv]; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /codegenutils.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A838792018A04BF700B386D6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A89D8FE617CFFDCE0077F2B5 /* Foundation.framework */; }; 11 | A838792318A04BF700B386D6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A838792218A04BF700B386D6 /* main.m */; }; 12 | A838792B18A04C0E00B386D6 /* CGUCodeGenTool.m in Sources */ = {isa = PBXBuildFile; fileRef = A885F8AD17DA8DE400A29164 /* CGUCodeGenTool.m */; }; 13 | A838792E18A04C3400B386D6 /* IDStoryboardDumper.m in Sources */ = {isa = PBXBuildFile; fileRef = A838792D18A04C3400B386D6 /* IDStoryboardDumper.m */; }; 14 | A885F89C17DA8C7A00A29164 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A89D8FE617CFFDCE0077F2B5 /* Foundation.framework */; }; 15 | A885F89F17DA8C7A00A29164 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A885F89E17DA8C7A00A29164 /* main.m */; }; 16 | A885F8AE17DA8DE400A29164 /* CGUCodeGenTool.m in Sources */ = {isa = PBXBuildFile; fileRef = A885F8AD17DA8DE400A29164 /* CGUCodeGenTool.m */; }; 17 | A885F8AF17DA8DE400A29164 /* CGUCodeGenTool.m in Sources */ = {isa = PBXBuildFile; fileRef = A885F8AD17DA8DE400A29164 /* CGUCodeGenTool.m */; }; 18 | A885F8B217DA921600A29164 /* CDColorListDumper.m in Sources */ = {isa = PBXBuildFile; fileRef = A885F8B117DA921600A29164 /* CDColorListDumper.m */; }; 19 | A885F8B417DA929800A29164 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A885F8B317DA929800A29164 /* AppKit.framework */; }; 20 | A89D8FE717CFFDCE0077F2B5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A89D8FE617CFFDCE0077F2B5 /* Foundation.framework */; }; 21 | A89D8FEA17CFFDCE0077F2B5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A89D8FE917CFFDCE0077F2B5 /* main.m */; }; 22 | A89D8FF617CFFED90077F2B5 /* AGCatalogParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A89D8FF517CFFED90077F2B5 /* AGCatalogParser.m */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXCopyFilesBuildPhase section */ 26 | A838791D18A04BF700B386D6 /* CopyFiles */ = { 27 | isa = PBXCopyFilesBuildPhase; 28 | buildActionMask = 2147483647; 29 | dstPath = /usr/share/man/man1/; 30 | dstSubfolderSpec = 0; 31 | files = ( 32 | ); 33 | runOnlyForDeploymentPostprocessing = 1; 34 | }; 35 | A885F89917DA8C7A00A29164 /* CopyFiles */ = { 36 | isa = PBXCopyFilesBuildPhase; 37 | buildActionMask = 2147483647; 38 | dstPath = /usr/share/man/man1/; 39 | dstSubfolderSpec = 0; 40 | files = ( 41 | ); 42 | runOnlyForDeploymentPostprocessing = 1; 43 | }; 44 | A89D8FE117CFFDCE0077F2B5 /* CopyFiles */ = { 45 | isa = PBXCopyFilesBuildPhase; 46 | buildActionMask = 2147483647; 47 | dstPath = /usr/share/man/man1/; 48 | dstSubfolderSpec = 0; 49 | files = ( 50 | ); 51 | runOnlyForDeploymentPostprocessing = 1; 52 | }; 53 | /* End PBXCopyFilesBuildPhase section */ 54 | 55 | /* Begin PBXFileReference section */ 56 | A83878DB18A0367C00B386D6 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 57 | A83878DD18A0367C00B386D6 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 58 | A83878FB18A0367C00B386D6 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 59 | A838791F18A04BF700B386D6 /* objc-identifierconstants */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "objc-identifierconstants"; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | A838792218A04BF700B386D6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 61 | A838792518A04BF700B386D6 /* identifierconstants-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "identifierconstants-Prefix.pch"; sourceTree = ""; }; 62 | A838792C18A04C3400B386D6 /* IDStoryboardDumper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDStoryboardDumper.h; sourceTree = ""; }; 63 | A838792D18A04C3400B386D6 /* IDStoryboardDumper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IDStoryboardDumper.m; sourceTree = ""; }; 64 | A885F89B17DA8C7A00A29164 /* objc-colordump */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "objc-colordump"; sourceTree = BUILT_PRODUCTS_DIR; }; 65 | A885F89E17DA8C7A00A29164 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 66 | A885F8A117DA8C7A00A29164 /* colordump-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "colordump-Prefix.pch"; sourceTree = ""; }; 67 | A885F8AC17DA8DE400A29164 /* CGUCodeGenTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGUCodeGenTool.h; sourceTree = ""; }; 68 | A885F8AD17DA8DE400A29164 /* CGUCodeGenTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGUCodeGenTool.m; sourceTree = ""; }; 69 | A885F8B017DA921600A29164 /* CDColorListDumper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDColorListDumper.h; sourceTree = ""; }; 70 | A885F8B117DA921600A29164 /* CDColorListDumper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDColorListDumper.m; sourceTree = ""; }; 71 | A885F8B317DA929800A29164 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 72 | A89D8FE317CFFDCE0077F2B5 /* objc-assetgen */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "objc-assetgen"; sourceTree = BUILT_PRODUCTS_DIR; }; 73 | A89D8FE617CFFDCE0077F2B5 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 74 | A89D8FE917CFFDCE0077F2B5 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 75 | A89D8FEC17CFFDCE0077F2B5 /* assetgen-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "assetgen-Prefix.pch"; sourceTree = ""; }; 76 | A89D8FF417CFFED90077F2B5 /* AGCatalogParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AGCatalogParser.h; sourceTree = ""; }; 77 | A89D8FF517CFFED90077F2B5 /* AGCatalogParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AGCatalogParser.m; sourceTree = ""; }; 78 | /* End PBXFileReference section */ 79 | 80 | /* Begin PBXFrameworksBuildPhase section */ 81 | A838791C18A04BF700B386D6 /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | A838792018A04BF700B386D6 /* Foundation.framework in Frameworks */, 86 | ); 87 | runOnlyForDeploymentPostprocessing = 0; 88 | }; 89 | A885F89817DA8C7A00A29164 /* Frameworks */ = { 90 | isa = PBXFrameworksBuildPhase; 91 | buildActionMask = 2147483647; 92 | files = ( 93 | A885F8B417DA929800A29164 /* AppKit.framework in Frameworks */, 94 | A885F89C17DA8C7A00A29164 /* Foundation.framework in Frameworks */, 95 | ); 96 | runOnlyForDeploymentPostprocessing = 0; 97 | }; 98 | A89D8FE017CFFDCE0077F2B5 /* Frameworks */ = { 99 | isa = PBXFrameworksBuildPhase; 100 | buildActionMask = 2147483647; 101 | files = ( 102 | A89D8FE717CFFDCE0077F2B5 /* Foundation.framework in Frameworks */, 103 | ); 104 | runOnlyForDeploymentPostprocessing = 0; 105 | }; 106 | /* End PBXFrameworksBuildPhase section */ 107 | 108 | /* Begin PBXGroup section */ 109 | A838792118A04BF700B386D6 /* identifierconstants */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | A838792C18A04C3400B386D6 /* IDStoryboardDumper.h */, 113 | A838792D18A04C3400B386D6 /* IDStoryboardDumper.m */, 114 | A838792218A04BF700B386D6 /* main.m */, 115 | A838792418A04BF700B386D6 /* Supporting Files */, 116 | ); 117 | path = identifierconstants; 118 | sourceTree = ""; 119 | }; 120 | A838792418A04BF700B386D6 /* Supporting Files */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | A838792518A04BF700B386D6 /* identifierconstants-Prefix.pch */, 124 | ); 125 | name = "Supporting Files"; 126 | sourceTree = ""; 127 | }; 128 | A885F89D17DA8C7A00A29164 /* colordump */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | A885F8B017DA921600A29164 /* CDColorListDumper.h */, 132 | A885F8B117DA921600A29164 /* CDColorListDumper.m */, 133 | A885F89E17DA8C7A00A29164 /* main.m */, 134 | A885F8A017DA8C7A00A29164 /* Supporting Files */, 135 | ); 136 | path = colordump; 137 | sourceTree = ""; 138 | }; 139 | A885F8A017DA8C7A00A29164 /* Supporting Files */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | A885F8A117DA8C7A00A29164 /* colordump-Prefix.pch */, 143 | ); 144 | name = "Supporting Files"; 145 | sourceTree = ""; 146 | }; 147 | A885F8A717DA8CBA00A29164 /* Shared */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | A885F8AC17DA8DE400A29164 /* CGUCodeGenTool.h */, 151 | A885F8AD17DA8DE400A29164 /* CGUCodeGenTool.m */, 152 | ); 153 | path = Shared; 154 | sourceTree = ""; 155 | }; 156 | A89D8FDA17CFFDCE0077F2B5 = { 157 | isa = PBXGroup; 158 | children = ( 159 | A89D8FE817CFFDCE0077F2B5 /* assetgen */, 160 | A885F89D17DA8C7A00A29164 /* colordump */, 161 | A838792118A04BF700B386D6 /* identifierconstants */, 162 | A885F8A717DA8CBA00A29164 /* Shared */, 163 | A89D8FE517CFFDCE0077F2B5 /* Frameworks */, 164 | A89D8FE417CFFDCE0077F2B5 /* Products */, 165 | ); 166 | sourceTree = ""; 167 | }; 168 | A89D8FE417CFFDCE0077F2B5 /* Products */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | A89D8FE317CFFDCE0077F2B5 /* objc-assetgen */, 172 | A885F89B17DA8C7A00A29164 /* objc-colordump */, 173 | A838791F18A04BF700B386D6 /* objc-identifierconstants */, 174 | ); 175 | name = Products; 176 | sourceTree = ""; 177 | }; 178 | A89D8FE517CFFDCE0077F2B5 /* Frameworks */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | A885F8B317DA929800A29164 /* AppKit.framework */, 182 | A89D8FE617CFFDCE0077F2B5 /* Foundation.framework */, 183 | A83878DB18A0367C00B386D6 /* CoreGraphics.framework */, 184 | A83878DD18A0367C00B386D6 /* UIKit.framework */, 185 | A83878FB18A0367C00B386D6 /* XCTest.framework */, 186 | ); 187 | name = Frameworks; 188 | sourceTree = ""; 189 | }; 190 | A89D8FE817CFFDCE0077F2B5 /* assetgen */ = { 191 | isa = PBXGroup; 192 | children = ( 193 | A89D8FF417CFFED90077F2B5 /* AGCatalogParser.h */, 194 | A89D8FF517CFFED90077F2B5 /* AGCatalogParser.m */, 195 | A89D8FE917CFFDCE0077F2B5 /* main.m */, 196 | A89D8FEB17CFFDCE0077F2B5 /* Supporting Files */, 197 | ); 198 | path = assetgen; 199 | sourceTree = ""; 200 | }; 201 | A89D8FEB17CFFDCE0077F2B5 /* Supporting Files */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | A89D8FEC17CFFDCE0077F2B5 /* assetgen-Prefix.pch */, 205 | ); 206 | name = "Supporting Files"; 207 | sourceTree = ""; 208 | }; 209 | /* End PBXGroup section */ 210 | 211 | /* Begin PBXNativeTarget section */ 212 | A838791E18A04BF700B386D6 /* identifierconstants */ = { 213 | isa = PBXNativeTarget; 214 | buildConfigurationList = A838792818A04BF700B386D6 /* Build configuration list for PBXNativeTarget "identifierconstants" */; 215 | buildPhases = ( 216 | A838791B18A04BF700B386D6 /* Sources */, 217 | A838791C18A04BF700B386D6 /* Frameworks */, 218 | A838791D18A04BF700B386D6 /* CopyFiles */, 219 | ); 220 | buildRules = ( 221 | ); 222 | dependencies = ( 223 | ); 224 | name = identifierconstants; 225 | productName = identiferconstants; 226 | productReference = A838791F18A04BF700B386D6 /* objc-identifierconstants */; 227 | productType = "com.apple.product-type.tool"; 228 | }; 229 | A885F89A17DA8C7A00A29164 /* colordump */ = { 230 | isa = PBXNativeTarget; 231 | buildConfigurationList = A885F8A417DA8C7A00A29164 /* Build configuration list for PBXNativeTarget "colordump" */; 232 | buildPhases = ( 233 | A885F89717DA8C7A00A29164 /* Sources */, 234 | A885F89817DA8C7A00A29164 /* Frameworks */, 235 | A885F89917DA8C7A00A29164 /* CopyFiles */, 236 | ); 237 | buildRules = ( 238 | ); 239 | dependencies = ( 240 | ); 241 | name = colordump; 242 | productName = colordump; 243 | productReference = A885F89B17DA8C7A00A29164 /* objc-colordump */; 244 | productType = "com.apple.product-type.tool"; 245 | }; 246 | A89D8FE217CFFDCE0077F2B5 /* assetgen */ = { 247 | isa = PBXNativeTarget; 248 | buildConfigurationList = A89D8FF117CFFDCE0077F2B5 /* Build configuration list for PBXNativeTarget "assetgen" */; 249 | buildPhases = ( 250 | A89D8FDF17CFFDCE0077F2B5 /* Sources */, 251 | A89D8FE017CFFDCE0077F2B5 /* Frameworks */, 252 | A89D8FE117CFFDCE0077F2B5 /* CopyFiles */, 253 | ); 254 | buildRules = ( 255 | ); 256 | dependencies = ( 257 | ); 258 | name = assetgen; 259 | productName = assetgen; 260 | productReference = A89D8FE317CFFDCE0077F2B5 /* objc-assetgen */; 261 | productType = "com.apple.product-type.tool"; 262 | }; 263 | /* End PBXNativeTarget section */ 264 | 265 | /* Begin PBXProject section */ 266 | A89D8FDB17CFFDCE0077F2B5 /* Project object */ = { 267 | isa = PBXProject; 268 | attributes = { 269 | LastUpgradeCheck = 0500; 270 | ORGANIZATIONNAME = "Square, Inc"; 271 | }; 272 | buildConfigurationList = A89D8FDE17CFFDCE0077F2B5 /* Build configuration list for PBXProject "codegenutils" */; 273 | compatibilityVersion = "Xcode 3.2"; 274 | developmentRegion = English; 275 | hasScannedForEncodings = 0; 276 | knownRegions = ( 277 | en, 278 | Base, 279 | ); 280 | mainGroup = A89D8FDA17CFFDCE0077F2B5; 281 | productRefGroup = A89D8FE417CFFDCE0077F2B5 /* Products */; 282 | projectDirPath = ""; 283 | projectRoot = ""; 284 | targets = ( 285 | A89D8FE217CFFDCE0077F2B5 /* assetgen */, 286 | A885F89A17DA8C7A00A29164 /* colordump */, 287 | A838791E18A04BF700B386D6 /* identifierconstants */, 288 | ); 289 | }; 290 | /* End PBXProject section */ 291 | 292 | /* Begin PBXSourcesBuildPhase section */ 293 | A838791B18A04BF700B386D6 /* Sources */ = { 294 | isa = PBXSourcesBuildPhase; 295 | buildActionMask = 2147483647; 296 | files = ( 297 | A838792318A04BF700B386D6 /* main.m in Sources */, 298 | A838792B18A04C0E00B386D6 /* CGUCodeGenTool.m in Sources */, 299 | A838792E18A04C3400B386D6 /* IDStoryboardDumper.m in Sources */, 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | A885F89717DA8C7A00A29164 /* Sources */ = { 304 | isa = PBXSourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | A885F89F17DA8C7A00A29164 /* main.m in Sources */, 308 | A885F8B217DA921600A29164 /* CDColorListDumper.m in Sources */, 309 | A885F8AF17DA8DE400A29164 /* CGUCodeGenTool.m in Sources */, 310 | ); 311 | runOnlyForDeploymentPostprocessing = 0; 312 | }; 313 | A89D8FDF17CFFDCE0077F2B5 /* Sources */ = { 314 | isa = PBXSourcesBuildPhase; 315 | buildActionMask = 2147483647; 316 | files = ( 317 | A89D8FF617CFFED90077F2B5 /* AGCatalogParser.m in Sources */, 318 | A885F8AE17DA8DE400A29164 /* CGUCodeGenTool.m in Sources */, 319 | A89D8FEA17CFFDCE0077F2B5 /* main.m in Sources */, 320 | ); 321 | runOnlyForDeploymentPostprocessing = 0; 322 | }; 323 | /* End PBXSourcesBuildPhase section */ 324 | 325 | /* Begin XCBuildConfiguration section */ 326 | A838792918A04BF700B386D6 /* Debug */ = { 327 | isa = XCBuildConfiguration; 328 | buildSettings = { 329 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 330 | GCC_PREFIX_HEADER = "identifierconstants/identifierconstants-Prefix.pch"; 331 | GCC_PREPROCESSOR_DEFINITIONS = ( 332 | "DEBUG=1", 333 | "$(inherited)", 334 | ); 335 | MACOSX_DEPLOYMENT_TARGET = 10.9; 336 | PRODUCT_NAME = "objc-$(TARGET_NAME)"; 337 | }; 338 | name = Debug; 339 | }; 340 | A838792A18A04BF700B386D6 /* Release */ = { 341 | isa = XCBuildConfiguration; 342 | buildSettings = { 343 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 344 | GCC_PREFIX_HEADER = "identifierconstants/identifierconstants-Prefix.pch"; 345 | MACOSX_DEPLOYMENT_TARGET = 10.9; 346 | PRODUCT_NAME = "objc-$(TARGET_NAME)"; 347 | }; 348 | name = Release; 349 | }; 350 | A885F8A517DA8C7A00A29164 /* Debug */ = { 351 | isa = XCBuildConfiguration; 352 | buildSettings = { 353 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 354 | GCC_PREFIX_HEADER = "colordump/colordump-Prefix.pch"; 355 | GCC_PREPROCESSOR_DEFINITIONS = ( 356 | "DEBUG=1", 357 | "$(inherited)", 358 | ); 359 | PRODUCT_NAME = "objc-colordump"; 360 | }; 361 | name = Debug; 362 | }; 363 | A885F8A617DA8C7A00A29164 /* Release */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 367 | GCC_PREFIX_HEADER = "colordump/colordump-Prefix.pch"; 368 | PRODUCT_NAME = "objc-colordump"; 369 | }; 370 | name = Release; 371 | }; 372 | A89D8FEF17CFFDCE0077F2B5 /* Debug */ = { 373 | isa = XCBuildConfiguration; 374 | buildSettings = { 375 | ALWAYS_SEARCH_USER_PATHS = NO; 376 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 377 | CLANG_CXX_LIBRARY = "libc++"; 378 | CLANG_ENABLE_MODULES = YES; 379 | CLANG_ENABLE_OBJC_ARC = YES; 380 | CLANG_WARN_BOOL_CONVERSION = YES; 381 | CLANG_WARN_CONSTANT_CONVERSION = YES; 382 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 383 | CLANG_WARN_EMPTY_BODY = YES; 384 | CLANG_WARN_ENUM_CONVERSION = YES; 385 | CLANG_WARN_INT_CONVERSION = YES; 386 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 387 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 388 | COPY_PHASE_STRIP = NO; 389 | GCC_C_LANGUAGE_STANDARD = gnu99; 390 | GCC_DYNAMIC_NO_PIC = NO; 391 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 392 | GCC_OPTIMIZATION_LEVEL = 0; 393 | GCC_PREPROCESSOR_DEFINITIONS = ( 394 | "DEBUG=1", 395 | "$(inherited)", 396 | ); 397 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 398 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 399 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 400 | GCC_WARN_UNDECLARED_SELECTOR = YES; 401 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 402 | GCC_WARN_UNUSED_FUNCTION = YES; 403 | GCC_WARN_UNUSED_VARIABLE = YES; 404 | MACOSX_DEPLOYMENT_TARGET = 10.8; 405 | ONLY_ACTIVE_ARCH = YES; 406 | SDKROOT = macosx; 407 | }; 408 | name = Debug; 409 | }; 410 | A89D8FF017CFFDCE0077F2B5 /* Release */ = { 411 | isa = XCBuildConfiguration; 412 | buildSettings = { 413 | ALWAYS_SEARCH_USER_PATHS = NO; 414 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 415 | CLANG_CXX_LIBRARY = "libc++"; 416 | CLANG_ENABLE_MODULES = YES; 417 | CLANG_ENABLE_OBJC_ARC = YES; 418 | CLANG_WARN_BOOL_CONVERSION = YES; 419 | CLANG_WARN_CONSTANT_CONVERSION = YES; 420 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 421 | CLANG_WARN_EMPTY_BODY = YES; 422 | CLANG_WARN_ENUM_CONVERSION = YES; 423 | CLANG_WARN_INT_CONVERSION = YES; 424 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 425 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 426 | COPY_PHASE_STRIP = YES; 427 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 428 | ENABLE_NS_ASSERTIONS = NO; 429 | GCC_C_LANGUAGE_STANDARD = gnu99; 430 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 431 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 432 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 433 | GCC_WARN_UNDECLARED_SELECTOR = YES; 434 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 435 | GCC_WARN_UNUSED_FUNCTION = YES; 436 | GCC_WARN_UNUSED_VARIABLE = YES; 437 | MACOSX_DEPLOYMENT_TARGET = 10.8; 438 | SDKROOT = macosx; 439 | }; 440 | name = Release; 441 | }; 442 | A89D8FF217CFFDCE0077F2B5 /* Debug */ = { 443 | isa = XCBuildConfiguration; 444 | buildSettings = { 445 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 446 | GCC_PREFIX_HEADER = "assetgen/assetgen-Prefix.pch"; 447 | PRODUCT_NAME = "objc-assetgen"; 448 | }; 449 | name = Debug; 450 | }; 451 | A89D8FF317CFFDCE0077F2B5 /* Release */ = { 452 | isa = XCBuildConfiguration; 453 | buildSettings = { 454 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 455 | GCC_PREFIX_HEADER = "assetgen/assetgen-Prefix.pch"; 456 | PRODUCT_NAME = "objc-assetgen"; 457 | }; 458 | name = Release; 459 | }; 460 | /* End XCBuildConfiguration section */ 461 | 462 | /* Begin XCConfigurationList section */ 463 | A838792818A04BF700B386D6 /* Build configuration list for PBXNativeTarget "identifierconstants" */ = { 464 | isa = XCConfigurationList; 465 | buildConfigurations = ( 466 | A838792918A04BF700B386D6 /* Debug */, 467 | A838792A18A04BF700B386D6 /* Release */, 468 | ); 469 | defaultConfigurationIsVisible = 0; 470 | defaultConfigurationName = Release; 471 | }; 472 | A885F8A417DA8C7A00A29164 /* Build configuration list for PBXNativeTarget "colordump" */ = { 473 | isa = XCConfigurationList; 474 | buildConfigurations = ( 475 | A885F8A517DA8C7A00A29164 /* Debug */, 476 | A885F8A617DA8C7A00A29164 /* Release */, 477 | ); 478 | defaultConfigurationIsVisible = 0; 479 | defaultConfigurationName = Release; 480 | }; 481 | A89D8FDE17CFFDCE0077F2B5 /* Build configuration list for PBXProject "codegenutils" */ = { 482 | isa = XCConfigurationList; 483 | buildConfigurations = ( 484 | A89D8FEF17CFFDCE0077F2B5 /* Debug */, 485 | A89D8FF017CFFDCE0077F2B5 /* Release */, 486 | ); 487 | defaultConfigurationIsVisible = 0; 488 | defaultConfigurationName = Release; 489 | }; 490 | A89D8FF117CFFDCE0077F2B5 /* Build configuration list for PBXNativeTarget "assetgen" */ = { 491 | isa = XCConfigurationList; 492 | buildConfigurations = ( 493 | A89D8FF217CFFDCE0077F2B5 /* Debug */, 494 | A89D8FF317CFFDCE0077F2B5 /* Release */, 495 | ); 496 | defaultConfigurationIsVisible = 0; 497 | defaultConfigurationName = Release; 498 | }; 499 | /* End XCConfigurationList section */ 500 | }; 501 | rootObject = A89D8FDB17CFFDCE0077F2B5 /* Project object */; 502 | } 503 | -------------------------------------------------------------------------------- /codegenutils.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /colordump/CDColorListDumper.h: -------------------------------------------------------------------------------- 1 | // 2 | // CDColorListDumper.h 3 | // codegenutils 4 | // 5 | // Created by Jim Puls on 9/6/13. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CGUCodeGenTool.h" 11 | 12 | 13 | @interface CDColorListDumper : CGUCodeGenTool 14 | @end 15 | -------------------------------------------------------------------------------- /colordump/CDColorListDumper.m: -------------------------------------------------------------------------------- 1 | // 2 | // CDColorListDumper.m 3 | // codegenutils 4 | // 5 | // Created by Jim Puls on 9/6/13. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CDColorListDumper.h" 11 | 12 | 13 | @implementation CDColorListDumper 14 | 15 | + (NSString *)inputFileExtension; 16 | { 17 | return @"clr"; 18 | } 19 | 20 | - (void)startWithCompletionHandler:(dispatch_block_t)completionBlock; 21 | { 22 | NSString *colorListName = [[self.inputURL lastPathComponent] stringByDeletingPathExtension]; 23 | 24 | self.className = [[NSString stringWithFormat:@"%@%@ColorList", self.classPrefix, colorListName]stringByReplacingOccurrencesOfString:@" " withString:@""]; 25 | 26 | NSColorList *colorList = [[NSColorList alloc] initWithName:colorListName fromFile:self.inputURL.path]; 27 | 28 | // Install this color list 29 | [colorList writeToFile:nil]; 30 | 31 | self.interfaceContents = [NSMutableArray array]; 32 | self.implementationContents = [NSMutableArray array]; 33 | 34 | for (NSString *key in colorList.allKeys) { 35 | NSColor *color = [colorList colorWithKey:key]; 36 | if (![color.colorSpaceName isEqualToString:NSDeviceRGBColorSpace]) { 37 | printf("Color %s isn't device RGB. Skipping.", [key UTF8String]); 38 | continue; 39 | } 40 | 41 | CGFloat r, g, b, a; 42 | [color getRed:&r green:&g blue:&b alpha:&a]; 43 | 44 | NSString *declaration = [NSString stringWithFormat:@"+ (UIColor *)%@Color;\n", [self methodNameForKey:key]]; 45 | [self.interfaceContents addObject:declaration]; 46 | 47 | NSMutableString *method = [declaration mutableCopy]; 48 | [method appendFormat:@"{\n return [UIColor colorWithRed:%.3ff green:%.3ff blue:%.3ff alpha:%.3ff];\n}\n", r, g, b, a]; 49 | [self.implementationContents addObject:method]; 50 | } 51 | 52 | [self writeOutputFiles]; 53 | completionBlock(); 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /colordump/colordump-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /colordump/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // colordump 4 | // 5 | // Created by Jim Puls on 9/6/13. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CDColorListDumper.h" 11 | 12 | 13 | int main(int argc, const char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return [CDColorListDumper startWithArgc:argc argv:argv]; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /identifierconstants/IDStoryboardDumper.h: -------------------------------------------------------------------------------- 1 | // 2 | // IDStoryboardDumper.h 3 | // codegenutils 4 | // 5 | // Created by Jim Puls on 2/3/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CGUCodeGenTool.h" 11 | 12 | 13 | @interface IDStoryboardDumper : CGUCodeGenTool 14 | @end 15 | -------------------------------------------------------------------------------- /identifierconstants/IDStoryboardDumper.m: -------------------------------------------------------------------------------- 1 | // 2 | // IDStoryboardDumper.m 3 | // codegenutils 4 | // 5 | // Created by Jim Puls on 2/3/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "IDStoryboardDumper.h" 11 | 12 | 13 | @interface NSString (IDStoryboardAddition) 14 | 15 | - (NSString *)IDS_titlecaseString; 16 | 17 | @end 18 | 19 | 20 | @implementation IDStoryboardDumper 21 | 22 | + (NSString *)inputFileExtension; 23 | { 24 | return @"storyboard"; 25 | } 26 | 27 | - (void)startWithCompletionHandler:(dispatch_block_t)completionBlock; 28 | { 29 | self.skipClassDeclaration = YES; 30 | NSString *storyboardFilename = [[self.inputURL lastPathComponent] stringByDeletingPathExtension]; 31 | NSString *storyboardName = [storyboardFilename stringByReplacingOccurrencesOfString:@" " withString:@""]; 32 | 33 | self.className = [NSString stringWithFormat:@"%@%@StoryboardIdentifiers", self.classPrefix, storyboardName]; 34 | NSError *error = nil; 35 | NSXMLDocument *document = [[NSXMLDocument alloc] initWithContentsOfURL:self.inputURL options:0 error:&error]; 36 | 37 | NSArray *storyboardIdentifiers = [[document nodesForXPath:@"//@storyboardIdentifier" error:&error] valueForKey:NSStringFromSelector(@selector(stringValue))]; 38 | NSArray *reuseIdentifiers = [[document nodesForXPath:@"//@reuseIdentifier" error:&error] valueForKey:NSStringFromSelector(@selector(stringValue))]; 39 | NSArray *segueIdentifiers = [[document nodesForXPath:@"//segue/@identifier" error:&error] valueForKey:NSStringFromSelector(@selector(stringValue))]; 40 | 41 | NSMutableArray *identifiers = [NSMutableArray arrayWithArray:storyboardIdentifiers]; 42 | [identifiers addObjectsFromArray:reuseIdentifiers]; 43 | [identifiers addObjectsFromArray:segueIdentifiers]; 44 | 45 | self.interfaceContents = [NSMutableArray array]; 46 | self.implementationContents = [NSMutableArray array]; 47 | 48 | NSMutableDictionary *uniqueKeys = [NSMutableDictionary dictionary]; 49 | uniqueKeys[[NSString stringWithFormat:@"%@%@StoryboardName", self.classPrefix, storyboardName]] = storyboardFilename; 50 | 51 | for (NSString *identifier in identifiers) { 52 | NSString *key = [NSString stringWithFormat:@"%@%@Storyboard%@Identifier", self.classPrefix, storyboardName, [identifier IDS_titlecaseString]]; 53 | uniqueKeys[key] = identifier; 54 | } 55 | for (NSString *key in [uniqueKeys keysSortedByValueUsingSelector:@selector(caseInsensitiveCompare:)]) { 56 | [self.interfaceContents addObject:[NSString stringWithFormat:@"extern NSString *const %@;\n", key]]; 57 | [self.implementationContents addObject:[NSString stringWithFormat:@"NSString *const %@ = @\"%@\";\n", key, uniqueKeys[key]]]; 58 | } 59 | 60 | [self writeOutputFiles]; 61 | completionBlock(); 62 | } 63 | 64 | @end 65 | 66 | 67 | @implementation NSString (IDStoryboardAddition) 68 | 69 | - (NSString *)IDS_titlecaseString; 70 | { 71 | NSArray *words = [self componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; 72 | NSMutableString *output = [NSMutableString string]; 73 | for (NSString *word in words) { 74 | [output appendFormat:@"%@%@", [[word substringToIndex:1] uppercaseString], [word substringFromIndex:1]]; 75 | } 76 | return output; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /identifierconstants/identifierconstants-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /identifierconstants/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // identifierconstants 4 | // 5 | // Created by Jim Puls on 2/3/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "IDStoryboardDumper.h" 11 | 12 | 13 | int main(int argc, const char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return [IDStoryboardDumper startWithArgc:argc argv:argv]; 17 | } 18 | } 19 | --------------------------------------------------------------------------------