├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── SampleProject ├── AcknowledgementGeneratorSample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── AcknowledgementGeneratorSample │ ├── AGSAppDelegate.h │ ├── AGSAppDelegate.m │ ├── AcknowledgementGeneratorSample-Info.plist │ ├── AcknowledgementGeneratorSample-Prefix.pch │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Main_iPad.storyboard │ ├── Main_iPhone.storyboard │ ├── Settings │ │ ├── Settings.bundle │ │ │ ├── Acknowledgement-AcknowledgementGenerator.plist │ │ │ ├── Acknowledgement-ObjectiveC-Basic-Blocks.plist │ │ │ ├── Acknowledgement-autodescribe.plist │ │ │ ├── Acknowledgements.plist │ │ │ ├── Root.plist │ │ │ └── en.lproj │ │ │ │ └── Root.strings │ │ ├── acknowledgementGenerator.rb │ │ └── licenses │ │ │ ├── ObjectiveC-Basic-Blocks.license │ │ │ └── autodescribe.license │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m └── SampleProject.png └── acknowledgementGenerator.rb /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | *.xccheckout 19 | 20 | #CocoaPods 21 | Pods 22 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "SampleProject/External/ObjectiveC-Basic-Blocks"] 2 | path = SampleProject/External/ObjectiveC-Basic-Blocks 3 | url = https://github.com/cvknage/ObjectiveC-Basic-Blocks.git 4 | [submodule "SampleProject/External/autodescribe"] 5 | path = SampleProject/External/autodescribe 6 | url = https://github.com/neoneye/autodescribe.git 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | /* 2 | * ----------------------------------------------------------------------------------- 3 | * "THE BEER-WARE LICENSE" (Revision 42): 4 | * wrote this file. As long as you retain this notice you 5 | * can do whatever you want with this stuff. If we meet some day, and you think 6 | * this stuff is worth it, you can buy me a beer in return Christophe Vallinas Knage. 7 | * ----------------------------------------------------------------------------------- 8 | */ 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | iOS-AcknowledgementGenerator 2 | ============================ 3 | 4 | Acknowledgement Generator is a small Ruby script for generating an Acknowledgement section in iOS Apps Settings.bundle. 5 | 6 | **Preconditions:** 7 | In order to use this 'AcknowledgementGenerator' you must have the 'CFPropertyList' gem installed. 8 | https://rubygems.org/gems/CFPropertyList 9 | 10 | **Setup: (Default - Customize as you see fit)** 11 | 1. Create a 'licenses' directory 12 | 2. Put each license into that directory, one per file, with filenames that end .license 13 | 3. Perform any necessary reformatting on the licenses. (eg. remove extra spaces at the beginning of lines, ensure that there are no line breaks mid-paragraph). There should be a blank line in-between each paragraph 14 | 4. Edit your settings bundle Root.plist to include a child section called 'Acknowledgements' 15 | 16 | **Usage:** 17 | 1. In Terminal execute: (modefy to suit your needs) 18 | 19 | ``` 20 | ./acknowledgementGenerator.rb "path/to/Settings.bundle" "path/to/licenses" 21 | ``` 22 | 23 | **Execute Script At Build Time** 24 | If you want this script to run whenever you build your project, you can add a build phase to your target. 25 | 26 | 1. Select your project file 27 | 2. Select the target application 28 | 3. Click the 'Build Phases' tab 29 | 4. Now from the menu select: Editor > Add Build Phase > Add Run Script Build Phase 30 | 5. Enter something like the folowing script: (modefy to suit your needs) 31 | 32 | ``` 33 | if gem list CFPropertyList -i; then 34 | ruby path/to/acknowledgementGenerator.rb "path/to/Settings.bundle" "path/to/licenses" 35 | fi 36 | ``` 37 | 38 | After you have finished that, you should drag the Run Script build phase to sooner in the build process. You'll want to move it up before Compile Sources so that the updates to your Settings Bundle get compiled and copied over. 39 | 40 | 41 | # Screenshots from the Sample App: 42 | ![Screenshot from the Sample App](https://raw.github.com/cvknage/iOS-AcknowledgementGenerator/master/SampleProject/SampleProject.png) 43 | 44 | 45 | # Acknowledgements: 46 | Thanks to JosephH @ stackoverflow. 47 | The idea for this scripe, and the setup instructions above comes from his post: 48 | http://stackoverflow.com/questions/6428353/best-way-to-add-license-section-to-ios-settings-bundle/6453507#6453507 49 | 50 | # License: 51 | Released under the BEER-WARE License. See the 52 | [LICENSE](https://github.com/cvknage/iOS-AcknowledgementGenerator/blob/master/LICENSE) 53 | file for more information. 54 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8370E49618A5372D00BA29B8 /* acknowledgementGenerator.rb in Resources */ = {isa = PBXBuildFile; fileRef = 8370E49418A5372D00BA29B8 /* acknowledgementGenerator.rb */; }; 11 | 83D934E618A527DF003FFF55 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83D934E518A527DF003FFF55 /* Foundation.framework */; }; 12 | 83D934E818A527DF003FFF55 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83D934E718A527DF003FFF55 /* CoreGraphics.framework */; }; 13 | 83D934EA18A527DF003FFF55 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83D934E918A527DF003FFF55 /* UIKit.framework */; }; 14 | 83D934F018A527DF003FFF55 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 83D934EE18A527DF003FFF55 /* InfoPlist.strings */; }; 15 | 83D934F218A527DF003FFF55 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 83D934F118A527DF003FFF55 /* main.m */; }; 16 | 83D934F618A527DF003FFF55 /* AGSAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 83D934F518A527DF003FFF55 /* AGSAppDelegate.m */; }; 17 | 83D934F818A527DF003FFF55 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 83D934F718A527DF003FFF55 /* Images.xcassets */; }; 18 | 83D9351A18A52E81003FFF55 /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 83D9351918A52E81003FFF55 /* Main_iPhone.storyboard */; }; 19 | 83D9351C18A52E92003FFF55 /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 83D9351B18A52E92003FFF55 /* Main_iPad.storyboard */; }; 20 | 83D9351F18A5337C003FFF55 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 83D9351E18A5337C003FFF55 /* Settings.bundle */; }; 21 | 83F45E7818A5458F0004F781 /* NSObject+AssociatedValues.m in Sources */ = {isa = PBXBuildFile; fileRef = 83F45E5818A542C50004F781 /* NSObject+AssociatedValues.m */; }; 22 | 83F45E7918A545970004F781 /* BBAlertButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 83F45E5B18A542C50004F781 /* BBAlertButton.m */; }; 23 | 83F45E7A18A5459A0004F781 /* UIAlertView+Blocks.m in Sources */ = {isa = PBXBuildFile; fileRef = 83F45E5D18A542C50004F781 /* UIAlertView+Blocks.m */; }; 24 | 83F45E7B18A5459E0004F781 /* UIControl+Blocks.m in Sources */ = {isa = PBXBuildFile; fileRef = 83F45E6018A542C50004F781 /* UIControl+Blocks.m */; }; 25 | 83F45E8D18A5470A0004F781 /* NSObject+AutoDescribe.m in Sources */ = {isa = PBXBuildFile; fileRef = 83F45E8118A546FA0004F781 /* NSObject+AutoDescribe.m */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 8370E49418A5372D00BA29B8 /* acknowledgementGenerator.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = acknowledgementGenerator.rb; sourceTree = ""; }; 30 | 83D934E218A527DF003FFF55 /* AcknowledgementGeneratorSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AcknowledgementGeneratorSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 83D934E518A527DF003FFF55 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 32 | 83D934E718A527DF003FFF55 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 33 | 83D934E918A527DF003FFF55 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 34 | 83D934ED18A527DF003FFF55 /* AcknowledgementGeneratorSample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AcknowledgementGeneratorSample-Info.plist"; sourceTree = ""; }; 35 | 83D934EF18A527DF003FFF55 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 36 | 83D934F118A527DF003FFF55 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 37 | 83D934F318A527DF003FFF55 /* AcknowledgementGeneratorSample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AcknowledgementGeneratorSample-Prefix.pch"; sourceTree = ""; }; 38 | 83D934F418A527DF003FFF55 /* AGSAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AGSAppDelegate.h; sourceTree = ""; }; 39 | 83D934F518A527DF003FFF55 /* AGSAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AGSAppDelegate.m; sourceTree = ""; }; 40 | 83D934F718A527DF003FFF55 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 41 | 83D934FE18A527DF003FFF55 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 42 | 83D9351918A52E81003FFF55 /* Main_iPhone.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main_iPhone.storyboard; sourceTree = ""; }; 43 | 83D9351B18A52E92003FFF55 /* Main_iPad.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main_iPad.storyboard; sourceTree = ""; }; 44 | 83D9351E18A5337C003FFF55 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; 45 | 83F45E5518A542C50004F781 /* BBScope.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BBScope.h; path = ObjcBasicBlocks/BBScope.h; sourceTree = ""; }; 46 | 83F45E5718A542C50004F781 /* NSObject+AssociatedValues.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSObject+AssociatedValues.h"; sourceTree = ""; }; 47 | 83F45E5818A542C50004F781 /* NSObject+AssociatedValues.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSObject+AssociatedValues.m"; sourceTree = ""; }; 48 | 83F45E5A18A542C50004F781 /* BBAlertButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BBAlertButton.h; sourceTree = ""; }; 49 | 83F45E5B18A542C50004F781 /* BBAlertButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BBAlertButton.m; sourceTree = ""; }; 50 | 83F45E5C18A542C50004F781 /* UIAlertView+Blocks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIAlertView+Blocks.h"; sourceTree = ""; }; 51 | 83F45E5D18A542C50004F781 /* UIAlertView+Blocks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIAlertView+Blocks.m"; sourceTree = ""; }; 52 | 83F45E5F18A542C50004F781 /* UIControl+Blocks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIControl+Blocks.h"; sourceTree = ""; }; 53 | 83F45E6018A542C50004F781 /* UIControl+Blocks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIControl+Blocks.m"; sourceTree = ""; }; 54 | 83F45E8018A546FA0004F781 /* NSObject+AutoDescribe.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSObject+AutoDescribe.h"; sourceTree = ""; }; 55 | 83F45E8118A546FA0004F781 /* NSObject+AutoDescribe.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSObject+AutoDescribe.m"; sourceTree = ""; }; 56 | 83F45E8E18A548D60004F781 /* autodescribe.license */ = {isa = PBXFileReference; lastKnownFileType = text; path = autodescribe.license; sourceTree = ""; }; 57 | 83F45E8F18A548D60004F781 /* ObjectiveC-Basic-Blocks.license */ = {isa = PBXFileReference; lastKnownFileType = text; path = "ObjectiveC-Basic-Blocks.license"; sourceTree = ""; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | 83D934DF18A527DF003FFF55 /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 83D934E818A527DF003FFF55 /* CoreGraphics.framework in Frameworks */, 66 | 83D934EA18A527DF003FFF55 /* UIKit.framework in Frameworks */, 67 | 83D934E618A527DF003FFF55 /* Foundation.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 8370E49318A5367900BA29B8 /* External */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 83F45E7C18A546FA0004F781 /* autodescribe */, 78 | 83F45E4018A542C50004F781 /* ObjectiveC-Basic-Blocks */, 79 | ); 80 | path = External; 81 | sourceTree = ""; 82 | }; 83 | 8370E49518A5372D00BA29B8 /* licenses */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 83F45E8E18A548D60004F781 /* autodescribe.license */, 87 | 83F45E8F18A548D60004F781 /* ObjectiveC-Basic-Blocks.license */, 88 | ); 89 | path = licenses; 90 | sourceTree = ""; 91 | }; 92 | 83D934D918A527DF003FFF55 = { 93 | isa = PBXGroup; 94 | children = ( 95 | 83D934EB18A527DF003FFF55 /* AcknowledgementGeneratorSample */, 96 | 8370E49318A5367900BA29B8 /* External */, 97 | 83D934E418A527DF003FFF55 /* Frameworks */, 98 | 83D934E318A527DF003FFF55 /* Products */, 99 | ); 100 | sourceTree = ""; 101 | }; 102 | 83D934E318A527DF003FFF55 /* Products */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 83D934E218A527DF003FFF55 /* AcknowledgementGeneratorSample.app */, 106 | ); 107 | name = Products; 108 | sourceTree = ""; 109 | }; 110 | 83D934E418A527DF003FFF55 /* Frameworks */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 83D934E518A527DF003FFF55 /* Foundation.framework */, 114 | 83D934E718A527DF003FFF55 /* CoreGraphics.framework */, 115 | 83D934E918A527DF003FFF55 /* UIKit.framework */, 116 | 83D934FE18A527DF003FFF55 /* XCTest.framework */, 117 | ); 118 | name = Frameworks; 119 | sourceTree = ""; 120 | }; 121 | 83D934EB18A527DF003FFF55 /* AcknowledgementGeneratorSample */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 83D934F418A527DF003FFF55 /* AGSAppDelegate.h */, 125 | 83D934F518A527DF003FFF55 /* AGSAppDelegate.m */, 126 | 83D934F718A527DF003FFF55 /* Images.xcassets */, 127 | 83D9351B18A52E92003FFF55 /* Main_iPad.storyboard */, 128 | 83D9351918A52E81003FFF55 /* Main_iPhone.storyboard */, 129 | 83D9351D18A53364003FFF55 /* Settings */, 130 | 83D934EC18A527DF003FFF55 /* Supporting Files */, 131 | ); 132 | path = AcknowledgementGeneratorSample; 133 | sourceTree = ""; 134 | }; 135 | 83D934EC18A527DF003FFF55 /* Supporting Files */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 83D934ED18A527DF003FFF55 /* AcknowledgementGeneratorSample-Info.plist */, 139 | 83D934EE18A527DF003FFF55 /* InfoPlist.strings */, 140 | 83D934F118A527DF003FFF55 /* main.m */, 141 | 83D934F318A527DF003FFF55 /* AcknowledgementGeneratorSample-Prefix.pch */, 142 | ); 143 | name = "Supporting Files"; 144 | sourceTree = ""; 145 | }; 146 | 83D9351D18A53364003FFF55 /* Settings */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 8370E49418A5372D00BA29B8 /* acknowledgementGenerator.rb */, 150 | 8370E49518A5372D00BA29B8 /* licenses */, 151 | 83D9351E18A5337C003FFF55 /* Settings.bundle */, 152 | ); 153 | path = Settings; 154 | sourceTree = ""; 155 | }; 156 | 83F45E4018A542C50004F781 /* ObjectiveC-Basic-Blocks */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | 83F45E5518A542C50004F781 /* BBScope.h */, 160 | 83F45E5618A542C50004F781 /* NSObject */, 161 | 83F45E5918A542C50004F781 /* UIAlertView */, 162 | 83F45E5E18A542C50004F781 /* UIControl */, 163 | ); 164 | path = "ObjectiveC-Basic-Blocks"; 165 | sourceTree = ""; 166 | }; 167 | 83F45E5618A542C50004F781 /* NSObject */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | 83F45E5718A542C50004F781 /* NSObject+AssociatedValues.h */, 171 | 83F45E5818A542C50004F781 /* NSObject+AssociatedValues.m */, 172 | ); 173 | name = NSObject; 174 | path = ObjcBasicBlocks/NSObject; 175 | sourceTree = ""; 176 | }; 177 | 83F45E5918A542C50004F781 /* UIAlertView */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | 83F45E5A18A542C50004F781 /* BBAlertButton.h */, 181 | 83F45E5B18A542C50004F781 /* BBAlertButton.m */, 182 | 83F45E5C18A542C50004F781 /* UIAlertView+Blocks.h */, 183 | 83F45E5D18A542C50004F781 /* UIAlertView+Blocks.m */, 184 | ); 185 | name = UIAlertView; 186 | path = ObjcBasicBlocks/UIAlertView; 187 | sourceTree = ""; 188 | }; 189 | 83F45E5E18A542C50004F781 /* UIControl */ = { 190 | isa = PBXGroup; 191 | children = ( 192 | 83F45E5F18A542C50004F781 /* UIControl+Blocks.h */, 193 | 83F45E6018A542C50004F781 /* UIControl+Blocks.m */, 194 | ); 195 | name = UIControl; 196 | path = ObjcBasicBlocks/UIControl; 197 | sourceTree = ""; 198 | }; 199 | 83F45E7C18A546FA0004F781 /* autodescribe */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | 83F45E8018A546FA0004F781 /* NSObject+AutoDescribe.h */, 203 | 83F45E8118A546FA0004F781 /* NSObject+AutoDescribe.m */, 204 | ); 205 | path = autodescribe; 206 | sourceTree = ""; 207 | }; 208 | /* End PBXGroup section */ 209 | 210 | /* Begin PBXNativeTarget section */ 211 | 83D934E118A527DF003FFF55 /* AcknowledgementGeneratorSample */ = { 212 | isa = PBXNativeTarget; 213 | buildConfigurationList = 83D9350E18A527DF003FFF55 /* Build configuration list for PBXNativeTarget "AcknowledgementGeneratorSample" */; 214 | buildPhases = ( 215 | 8328246518A5732B00A5FA0A /* ShellScript */, 216 | 83D934DE18A527DF003FFF55 /* Sources */, 217 | 83D934DF18A527DF003FFF55 /* Frameworks */, 218 | 83D934E018A527DF003FFF55 /* Resources */, 219 | ); 220 | buildRules = ( 221 | ); 222 | dependencies = ( 223 | ); 224 | name = AcknowledgementGeneratorSample; 225 | productName = AcknowledgementGeneratorSample; 226 | productReference = 83D934E218A527DF003FFF55 /* AcknowledgementGeneratorSample.app */; 227 | productType = "com.apple.product-type.application"; 228 | }; 229 | /* End PBXNativeTarget section */ 230 | 231 | /* Begin PBXProject section */ 232 | 83D934DA18A527DF003FFF55 /* Project object */ = { 233 | isa = PBXProject; 234 | attributes = { 235 | CLASSPREFIX = AGS; 236 | LastUpgradeCheck = 0500; 237 | ORGANIZATIONNAME = "Christophe Knage"; 238 | }; 239 | buildConfigurationList = 83D934DD18A527DF003FFF55 /* Build configuration list for PBXProject "AcknowledgementGeneratorSample" */; 240 | compatibilityVersion = "Xcode 3.2"; 241 | developmentRegion = English; 242 | hasScannedForEncodings = 0; 243 | knownRegions = ( 244 | en, 245 | ); 246 | mainGroup = 83D934D918A527DF003FFF55; 247 | productRefGroup = 83D934E318A527DF003FFF55 /* Products */; 248 | projectDirPath = ""; 249 | projectRoot = ""; 250 | targets = ( 251 | 83D934E118A527DF003FFF55 /* AcknowledgementGeneratorSample */, 252 | ); 253 | }; 254 | /* End PBXProject section */ 255 | 256 | /* Begin PBXResourcesBuildPhase section */ 257 | 83D934E018A527DF003FFF55 /* Resources */ = { 258 | isa = PBXResourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | 83D934F018A527DF003FFF55 /* InfoPlist.strings in Resources */, 262 | 83D9351C18A52E92003FFF55 /* Main_iPad.storyboard in Resources */, 263 | 8370E49618A5372D00BA29B8 /* acknowledgementGenerator.rb in Resources */, 264 | 83D9351F18A5337C003FFF55 /* Settings.bundle in Resources */, 265 | 83D934F818A527DF003FFF55 /* Images.xcassets in Resources */, 266 | 83D9351A18A52E81003FFF55 /* Main_iPhone.storyboard in Resources */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXResourcesBuildPhase section */ 271 | 272 | /* Begin PBXShellScriptBuildPhase section */ 273 | 8328246518A5732B00A5FA0A /* ShellScript */ = { 274 | isa = PBXShellScriptBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | ); 278 | inputPaths = ( 279 | ); 280 | outputPaths = ( 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | shellPath = /bin/sh; 284 | shellScript = "if gem list CFPropertyList -i; then\nruby AcknowledgementGeneratorSample/Settings/acknowledgementGenerator.rb \"AcknowledgementGeneratorSample/Settings/Settings.bundle\" \"AcknowledgementGeneratorSample/Settings/licenses\"\nfi"; 285 | }; 286 | /* End PBXShellScriptBuildPhase section */ 287 | 288 | /* Begin PBXSourcesBuildPhase section */ 289 | 83D934DE18A527DF003FFF55 /* Sources */ = { 290 | isa = PBXSourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | 83F45E7818A5458F0004F781 /* NSObject+AssociatedValues.m in Sources */, 294 | 83D934F618A527DF003FFF55 /* AGSAppDelegate.m in Sources */, 295 | 83F45E7A18A5459A0004F781 /* UIAlertView+Blocks.m in Sources */, 296 | 83F45E8D18A5470A0004F781 /* NSObject+AutoDescribe.m in Sources */, 297 | 83F45E7B18A5459E0004F781 /* UIControl+Blocks.m in Sources */, 298 | 83F45E7918A545970004F781 /* BBAlertButton.m in Sources */, 299 | 83D934F218A527DF003FFF55 /* main.m in Sources */, 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | /* End PBXSourcesBuildPhase section */ 304 | 305 | /* Begin PBXVariantGroup section */ 306 | 83D934EE18A527DF003FFF55 /* InfoPlist.strings */ = { 307 | isa = PBXVariantGroup; 308 | children = ( 309 | 83D934EF18A527DF003FFF55 /* en */, 310 | ); 311 | name = InfoPlist.strings; 312 | sourceTree = ""; 313 | }; 314 | /* End PBXVariantGroup section */ 315 | 316 | /* Begin XCBuildConfiguration section */ 317 | 83D9350C18A527DF003FFF55 /* Debug */ = { 318 | isa = XCBuildConfiguration; 319 | buildSettings = { 320 | ALWAYS_SEARCH_USER_PATHS = NO; 321 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 322 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 323 | CLANG_CXX_LIBRARY = "libc++"; 324 | CLANG_ENABLE_MODULES = YES; 325 | CLANG_ENABLE_OBJC_ARC = YES; 326 | CLANG_WARN_BOOL_CONVERSION = YES; 327 | CLANG_WARN_CONSTANT_CONVERSION = YES; 328 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 329 | CLANG_WARN_EMPTY_BODY = YES; 330 | CLANG_WARN_ENUM_CONVERSION = YES; 331 | CLANG_WARN_INT_CONVERSION = YES; 332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 333 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 334 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 335 | COPY_PHASE_STRIP = NO; 336 | GCC_C_LANGUAGE_STANDARD = gnu99; 337 | GCC_DYNAMIC_NO_PIC = NO; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 344 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 345 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 346 | GCC_WARN_UNDECLARED_SELECTOR = YES; 347 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 348 | GCC_WARN_UNUSED_FUNCTION = YES; 349 | GCC_WARN_UNUSED_VARIABLE = YES; 350 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 351 | ONLY_ACTIVE_ARCH = YES; 352 | SDKROOT = iphoneos; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | }; 355 | name = Debug; 356 | }; 357 | 83D9350D18A527DF003FFF55 /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ALWAYS_SEARCH_USER_PATHS = NO; 361 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_WARN_BOOL_CONVERSION = YES; 367 | CLANG_WARN_CONSTANT_CONVERSION = YES; 368 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 369 | CLANG_WARN_EMPTY_BODY = YES; 370 | CLANG_WARN_ENUM_CONVERSION = YES; 371 | CLANG_WARN_INT_CONVERSION = YES; 372 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 373 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 374 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 375 | COPY_PHASE_STRIP = YES; 376 | ENABLE_NS_ASSERTIONS = NO; 377 | GCC_C_LANGUAGE_STANDARD = gnu99; 378 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 379 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 380 | GCC_WARN_UNDECLARED_SELECTOR = YES; 381 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 382 | GCC_WARN_UNUSED_FUNCTION = YES; 383 | GCC_WARN_UNUSED_VARIABLE = YES; 384 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 385 | SDKROOT = iphoneos; 386 | TARGETED_DEVICE_FAMILY = "1,2"; 387 | VALIDATE_PRODUCT = YES; 388 | }; 389 | name = Release; 390 | }; 391 | 83D9350F18A527DF003FFF55 /* Debug */ = { 392 | isa = XCBuildConfiguration; 393 | buildSettings = { 394 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 395 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 396 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 397 | GCC_PREFIX_HEADER = "AcknowledgementGeneratorSample/AcknowledgementGeneratorSample-Prefix.pch"; 398 | INFOPLIST_FILE = "AcknowledgementGeneratorSample/AcknowledgementGeneratorSample-Info.plist"; 399 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 400 | PRODUCT_NAME = "$(TARGET_NAME)"; 401 | WRAPPER_EXTENSION = app; 402 | }; 403 | name = Debug; 404 | }; 405 | 83D9351018A527DF003FFF55 /* Release */ = { 406 | isa = XCBuildConfiguration; 407 | buildSettings = { 408 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 409 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 410 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 411 | GCC_PREFIX_HEADER = "AcknowledgementGeneratorSample/AcknowledgementGeneratorSample-Prefix.pch"; 412 | INFOPLIST_FILE = "AcknowledgementGeneratorSample/AcknowledgementGeneratorSample-Info.plist"; 413 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 414 | PRODUCT_NAME = "$(TARGET_NAME)"; 415 | WRAPPER_EXTENSION = app; 416 | }; 417 | name = Release; 418 | }; 419 | /* End XCBuildConfiguration section */ 420 | 421 | /* Begin XCConfigurationList section */ 422 | 83D934DD18A527DF003FFF55 /* Build configuration list for PBXProject "AcknowledgementGeneratorSample" */ = { 423 | isa = XCConfigurationList; 424 | buildConfigurations = ( 425 | 83D9350C18A527DF003FFF55 /* Debug */, 426 | 83D9350D18A527DF003FFF55 /* Release */, 427 | ); 428 | defaultConfigurationIsVisible = 0; 429 | defaultConfigurationName = Release; 430 | }; 431 | 83D9350E18A527DF003FFF55 /* Build configuration list for PBXNativeTarget "AcknowledgementGeneratorSample" */ = { 432 | isa = XCConfigurationList; 433 | buildConfigurations = ( 434 | 83D9350F18A527DF003FFF55 /* Debug */, 435 | 83D9351018A527DF003FFF55 /* Release */, 436 | ); 437 | defaultConfigurationIsVisible = 0; 438 | defaultConfigurationName = Release; 439 | }; 440 | /* End XCConfigurationList section */ 441 | }; 442 | rootObject = 83D934DA18A527DF003FFF55 /* Project object */; 443 | } 444 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/AGSAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AGSAppDelegate.h 3 | // AcknowledgementGeneratorSample 4 | // 5 | // Created by Christophe Knage on 07/02/2014. 6 | // Copyright (c) 2014 Christophe Knage. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AGSAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/AGSAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AGSAppDelegate.m 3 | // AcknowledgementGeneratorSample 4 | // 5 | // Created by Christophe Knage on 07/02/2014. 6 | // Copyright (c) 2014 Christophe Knage. All rights reserved. 7 | // 8 | 9 | #import "AGSAppDelegate.h" 10 | 11 | @implementation AGSAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/AcknowledgementGeneratorSample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | net.knage.${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_iPhone 29 | UIMainStoryboardFile~ipad 30 | Main_iPad 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/AcknowledgementGeneratorSample-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_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/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 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/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 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/Main_iPad.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/Main_iPhone.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/Settings/Settings.bundle/Acknowledgement-AcknowledgementGenerator.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | StringsTable 6 | ThirdPartyLicenses 7 | PreferenceSpecifiers 8 | 9 | 10 | Type 11 | PSGroupSpecifier 12 | FooterText 13 | "THE BEER-WARE LICENSE" (Revision 42): 14 | <http://www.knage.net> wrote this file. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Christophe Vallinas Knage. 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/Settings/Settings.bundle/Acknowledgement-ObjectiveC-Basic-Blocks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | StringsTable 6 | ThirdPartyLicenses 7 | PreferenceSpecifiers 8 | 9 | 10 | Type 11 | PSGroupSpecifier 12 | FooterText 13 | The MIT License (MIT) 14 | 15 | Copyright (c) 2013 Christophe Vallinas Knage 16 | 17 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 18 | 19 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/Settings/Settings.bundle/Acknowledgement-autodescribe.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | StringsTable 6 | ThirdPartyLicenses 7 | PreferenceSpecifiers 8 | 9 | 10 | Type 11 | PSGroupSpecifier 12 | FooterText 13 | Copyright (C) 2013 Simon Strandgaard 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/Settings/Settings.bundle/Acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | StringsTable 6 | ThirdPartyLicenses 7 | PreferenceSpecifiers 8 | 9 | 10 | Type 11 | PSChildPaneSpecifier 12 | Title 13 | AcknowledgementGenerator 14 | File 15 | Acknowledgement-AcknowledgementGenerator 16 | 17 | 18 | Type 19 | PSChildPaneSpecifier 20 | Title 21 | autodescribe 22 | File 23 | Acknowledgement-autodescribe 24 | 25 | 26 | Type 27 | PSChildPaneSpecifier 28 | Title 29 | ObjectiveC-Basic-Blocks 30 | File 31 | Acknowledgement-ObjectiveC-Basic-Blocks 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/Settings/Settings.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | Type 9 | PSChildPaneSpecifier 10 | Title 11 | Acknowledgements 12 | File 13 | Acknowledgements 14 | 15 | 16 | StringsTable 17 | Root 18 | 19 | 20 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/Settings/Settings.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cvknage/iOS-AcknowledgementGenerator/ae26a88e4e27dc482a54eaec4b39fa548f0b03d0/SampleProject/AcknowledgementGeneratorSample/Settings/Settings.bundle/en.lproj/Root.strings -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/Settings/acknowledgementGenerator.rb: -------------------------------------------------------------------------------- 1 | ../../../acknowledgementGenerator.rb -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/Settings/licenses/ObjectiveC-Basic-Blocks.license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Christophe Vallinas Knage 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/Settings/licenses/autodescribe.license: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013 Simon Strandgaard 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /SampleProject/AcknowledgementGeneratorSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AcknowledgementGeneratorSample 4 | // 5 | // Created by Christophe Knage on 07/02/2014. 6 | // Copyright (c) 2014 Christophe Knage. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AGSAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AGSAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SampleProject/SampleProject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cvknage/iOS-AcknowledgementGenerator/ae26a88e4e27dc482a54eaec4b39fa548f0b03d0/SampleProject/SampleProject.png -------------------------------------------------------------------------------- /acknowledgementGenerator.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | =begin 3 | 4 | Preconditions: 5 | In order to use this 'AcknowledgementGenerator' you must have the 'CFPropertyList' gem installed. 6 | https://rubygems.org/gems/CFPropertyList 7 | 8 | 9 | Setup: (Default - Customize as you see fit) 10 | 1. Create a 'licenses' directory 11 | 2. Put each license into that directory, one per file, with filenames that end .license 12 | 3. Perform any necessary reformatting on the licenses. 13 | (eg. remove extra spaces at the beginning of lines, ensure that there are no line breaks mid-paragraph). 14 | There should be a blank line in-between each paragraph 15 | 4. Edit your settings bundle Root.plist to include a child section called 'Acknowledgements' 16 | 17 | 18 | Usage: 19 | 1. In Terminal execute: (modefy to suit your needs) 20 | ./acknowledgementGenerator.rb "path/to/Settings.bundle" "path/to/licenses" 21 | 22 | 23 | Execute Script At Build Time: 24 | If you want this script to run whenever you build your project, you can add a build phase to your target. 25 | 26 | 1. Select your project file 27 | 2. Select the target application 28 | 3. Click the 'Build Phases' tab 29 | 4. Now from the menu select: Editor > Add Build Phase > Add Run Script Build Phase 30 | 5. Enter something like the folowing script: (modefy to suit your needs) 31 | 32 | if gem list CFPropertyList -i; then 33 | ruby path/to/acknowledgementGenerator.rb "path/to/Settings.bundle" "path/to/licenses" 34 | fi 35 | 36 | 37 | License: 38 | "THE BEER-WARE LICENSE" (Revision 42): 39 | wrote this file. As long as you retain this notice you 40 | can do whatever you want with this stuff. If we meet some day, and you think 41 | this stuff is worth it, you can buy me a beer in return Christophe Vallinas Knage. 42 | 43 | 44 | Acknowledgements: 45 | Thanks to JosephH @ stackoverflow. 46 | The idea for this scripe, and the setup instructions above comes from his post: 47 | http://stackoverflow.com/questions/6428353/best-way-to-add-license-section-to-ios-settings-bundle/6453507#6453507 48 | 49 | =end 50 | 51 | require 'CFPropertyList' 52 | 53 | # Quit unless script gets two arguments 54 | unless ARGV.length == 2 55 | abort("Not the right number of arguments.\n" + 56 | "Usage: ruby acknowledgementGenerator.rb \"path/to/Settings.bundle\" \"path/to/licenses/\"") 57 | end 58 | 59 | # Constants 60 | SETTINGS_BUNDLE = ARGV[0] 61 | LICENSE_FILE_DIR_PATH = ARGV[1] 62 | LICENSE_FILE_EXTENSION = ".license" 63 | ACKNOWLEDGEMENT_GENERATOR_LICENSE = '"THE BEER-WARE LICENSE" (Revision 42):' + 64 | ' 65 | ' + 66 | ' wrote this file. As long as you retain this notice you ' + 67 | 'can do whatever you want with this stuff. If we meet some day, and you think ' + 68 | 'this stuff is worth it, you can buy me a beer in return Christophe Vallinas Knage.' 69 | 70 | class AcknowledgementGenerator 71 | def createAcknowledgement(name, content) 72 | # Create a arbitrary data structure of basic data types 73 | acknowledgement = { 74 | 'StringsTable' => 'ThirdPartyLicenses', 75 | 'PreferenceSpecifiers' => [{ 76 | 'Type' => 'PSGroupSpecifier', 77 | 'FooterText' => content 78 | }] 79 | } 80 | 81 | # Generate name for acknowledgement plist 82 | acknowledgementName = "Acknowledgement-" + name 83 | 84 | # Generate item for acknowledgement list 85 | acknowledgementListItem = { 86 | 'Type' => 'PSChildPaneSpecifier', 87 | 'Title' => name, 88 | 'File' => acknowledgementName 89 | } 90 | 91 | # Create plist file 92 | plist = CFPropertyList::List.new 93 | plist.value = CFPropertyList.guess(acknowledgement) 94 | plist.save(SETTINGS_BUNDLE + "/" + acknowledgementName + ".plist", CFPropertyList::List::FORMAT_XML) 95 | 96 | # return 97 | acknowledgementListItem 98 | end 99 | 100 | def createAcknowledgementList(acknowledgementListItems) 101 | # Create a arbitrary data structure of basic data types 102 | acknowledgementList = { 103 | 'StringsTable' => 'ThirdPartyLicenses', 104 | 'PreferenceSpecifiers' => acknowledgementListItems 105 | } 106 | 107 | # Create plist file 108 | plist = CFPropertyList::List.new 109 | plist.value = CFPropertyList.guess(acknowledgementList) 110 | plist.save(SETTINGS_BUNDLE + "/Acknowledgements.plist", CFPropertyList::List::FORMAT_XML) 111 | end 112 | end 113 | 114 | if __FILE__ == $PROGRAM_NAME 115 | acknowledgementGenerator = AcknowledgementGenerator.new 116 | 117 | # Iterate all license files and generate coresponding acknowledgement plists 118 | acknowledgementListItems = Array.new 119 | Dir.glob(LICENSE_FILE_DIR_PATH + '/*' + LICENSE_FILE_EXTENSION) do |file| 120 | print "Parsing: #{file.split('/').last}..." 121 | 122 | # Extract name 123 | licenseFileName = File.basename(file) 124 | projectName = licenseFileName.split('.').first 125 | 126 | # Extract license 127 | licenseFile = File.open(file) 128 | projectLicense = licenseFile.read 129 | 130 | # Create Acknowledgement- plist 131 | acknowledgementListItem = acknowledgementGenerator.createAcknowledgement(projectName, projectLicense) 132 | licenseFile.close 133 | acknowledgementListItems.push(acknowledgementListItem) 134 | 135 | puts " DONE" 136 | end 137 | 138 | # Push AcknowledgementGenerator License 139 | acknowledgementGeneratorLicenseListItem = acknowledgementGenerator.createAcknowledgement("AcknowledgementGenerator", ACKNOWLEDGEMENT_GENERATOR_LICENSE) 140 | acknowledgementListItems.push(acknowledgementGeneratorLicenseListItem) 141 | sortedAcknowledgementListItems = acknowledgementListItems.sort_by { |item| item["Title"].downcase } 142 | 143 | # Create Acknowledgements plist 144 | print "Adding acknowledgements to " + SETTINGS_BUNDLE + "..." 145 | acknowledgementGenerator.createAcknowledgementList(sortedAcknowledgementListItems) 146 | puts " DONE" 147 | 148 | # All finished 149 | puts "" 150 | puts "Acknowledgement Generator Finished." 151 | end 152 | --------------------------------------------------------------------------------