├── IPAExporter.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IPAExporter.xccheckout └── xcuserdata │ └── Tue.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── IPAExporter.xcscheme │ └── xcschememanagement.plist ├── IPAExporter ├── AppDelegate.h ├── AppDelegate.m ├── ArchiveWindowController.h ├── ArchiveWindowController.m ├── ArchiveWindowController.xib ├── Base.lproj │ └── MainMenu.xib ├── DirectoryWatcher.h ├── DirectoryWatcher.m ├── Export.sh ├── ExportWindowController.h ├── ExportWindowController.m ├── ExportWindowController.xib ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon_128x128.png │ │ ├── Icon_128x128@2x.png │ │ ├── Icon_16x16.png │ │ ├── Icon_16x16@2x.png │ │ ├── Icon_256x256.png │ │ ├── Icon_256x256@2x.png │ │ ├── Icon_32x32-1.png │ │ ├── Icon_32x32@2x.png │ │ ├── Icon_512x512-1.png │ │ └── Icon_512x512@2x.png │ └── Warning.imageset │ │ ├── Contents.json │ │ └── warning@2x.png ├── Info.plist ├── NSDate+Relative.h ├── NSDate+Relative.m ├── Provisioning.h ├── Provisioning.m ├── SigningIdentity.h ├── SigningIdentity.m ├── TableAppCellView.h ├── TableAppCellView.m ├── XcodeArchive.h ├── XcodeArchive.m └── main.m ├── IPAExporterTests ├── IPAExporterTests.m └── Info.plist ├── IPAExporterWorkspace.xcworkspace ├── contents.xcworkspacedata ├── xcshareddata │ ├── IPAExporter.xccheckout │ └── IPAExporterWorkspace.xccheckout └── xcuserdata │ └── Tue.xcuserdatad │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── LICENSE.txt ├── README.md ├── Screenshot ├── 1.png └── 2.png └── XcodePlugin ├── IPAExporterPlugIn.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IPAExporterPlugIn.xccheckout ├── xcshareddata │ └── xcschemes │ │ └── IPAExporterPlugIn.xcscheme └── xcuserdata │ └── Tue.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist └── IPAExporterPlugIn ├── IPAExporterPlugIn.h ├── IPAExporterPlugIn.m └── Info.plist /IPAExporter.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 814A0F6619E8B7570023B1A5 /* NSDate+Relative.m in Sources */ = {isa = PBXBuildFile; fileRef = 814A0F6519E8B7570023B1A5 /* NSDate+Relative.m */; }; 11 | 814A0F6A19E8C4500023B1A5 /* ExportWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 814A0F6819E8C4500023B1A5 /* ExportWindowController.m */; }; 12 | 814A0F6B19E8C4500023B1A5 /* ExportWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 814A0F6919E8C4500023B1A5 /* ExportWindowController.xib */; }; 13 | 814A0F6E19E8D6B30023B1A5 /* SigningIdentity.m in Sources */ = {isa = PBXBuildFile; fileRef = 814A0F6D19E8D6B30023B1A5 /* SigningIdentity.m */; }; 14 | 814A0F7019E8E4CF0023B1A5 /* Export.sh in Resources */ = {isa = PBXBuildFile; fileRef = 814A0F6F19E8E4CF0023B1A5 /* Export.sh */; }; 15 | 81AB04CC19E83963002C4964 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 81AB04CB19E83963002C4964 /* main.m */; }; 16 | 81AB04CF19E83963002C4964 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 81AB04CE19E83963002C4964 /* AppDelegate.m */; }; 17 | 81AB04D419E83963002C4964 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 81AB04D219E83963002C4964 /* MainMenu.xib */; }; 18 | 81AB04E019E83963002C4964 /* IPAExporterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 81AB04DF19E83963002C4964 /* IPAExporterTests.m */; }; 19 | 81AB04EB19E84762002C4964 /* Provisioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 81AB04EA19E84762002C4964 /* Provisioning.m */; }; 20 | 81AB04EE19E85376002C4964 /* TableAppCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81AB04ED19E85376002C4964 /* TableAppCellView.m */; }; 21 | 81AB04F119E855A2002C4964 /* XcodeArchive.m in Sources */ = {isa = PBXBuildFile; fileRef = 81AB04F019E855A2002C4964 /* XcodeArchive.m */; }; 22 | 81AC548519E90AC1004C2C3C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 81AC548419E90AC1004C2C3C /* Images.xcassets */; }; 23 | 81AC548819E94A23004C2C3C /* DirectoryWatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 81AC548719E94A23004C2C3C /* DirectoryWatcher.m */; }; 24 | 81D2A1F519EF36B00006F5D2 /* ArchiveWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D2A1F319EF36B00006F5D2 /* ArchiveWindowController.m */; }; 25 | 81D2A1F619EF36B00006F5D2 /* ArchiveWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 81D2A1F419EF36B00006F5D2 /* ArchiveWindowController.xib */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | 81AB04DA19E83963002C4964 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 81AB04BE19E83963002C4964 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 81AB04C519E83963002C4964; 34 | remoteInfo = IPAExporter; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 814A0F6419E8B7570023B1A5 /* NSDate+Relative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+Relative.h"; sourceTree = ""; }; 40 | 814A0F6519E8B7570023B1A5 /* NSDate+Relative.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+Relative.m"; sourceTree = ""; }; 41 | 814A0F6719E8C44F0023B1A5 /* ExportWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExportWindowController.h; sourceTree = ""; }; 42 | 814A0F6819E8C4500023B1A5 /* ExportWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExportWindowController.m; sourceTree = ""; }; 43 | 814A0F6919E8C4500023B1A5 /* ExportWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ExportWindowController.xib; sourceTree = ""; }; 44 | 814A0F6C19E8D6B30023B1A5 /* SigningIdentity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SigningIdentity.h; sourceTree = ""; }; 45 | 814A0F6D19E8D6B30023B1A5 /* SigningIdentity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SigningIdentity.m; sourceTree = ""; }; 46 | 814A0F6F19E8E4CF0023B1A5 /* Export.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = Export.sh; sourceTree = ""; }; 47 | 81AB04C619E83963002C4964 /* IPAExporter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IPAExporter.app; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 81AB04CA19E83963002C4964 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 81AB04CB19E83963002C4964 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 50 | 81AB04CD19E83963002C4964 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 51 | 81AB04CE19E83963002C4964 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 52 | 81AB04D319E83963002C4964 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 53 | 81AB04D919E83963002C4964 /* IPAExporterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IPAExporterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 81AB04DE19E83963002C4964 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 81AB04DF19E83963002C4964 /* IPAExporterTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IPAExporterTests.m; sourceTree = ""; }; 56 | 81AB04E919E84762002C4964 /* Provisioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Provisioning.h; sourceTree = ""; }; 57 | 81AB04EA19E84762002C4964 /* Provisioning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Provisioning.m; sourceTree = ""; }; 58 | 81AB04EC19E85376002C4964 /* TableAppCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableAppCellView.h; sourceTree = ""; }; 59 | 81AB04ED19E85376002C4964 /* TableAppCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableAppCellView.m; sourceTree = ""; }; 60 | 81AB04EF19E855A2002C4964 /* XcodeArchive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeArchive.h; sourceTree = ""; }; 61 | 81AB04F019E855A2002C4964 /* XcodeArchive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XcodeArchive.m; sourceTree = ""; }; 62 | 81AC548419E90AC1004C2C3C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 63 | 81AC548619E94A23004C2C3C /* DirectoryWatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectoryWatcher.h; sourceTree = ""; }; 64 | 81AC548719E94A23004C2C3C /* DirectoryWatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DirectoryWatcher.m; sourceTree = ""; }; 65 | 81AC548919E9534E004C2C3C /* LICENSE.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE.txt; sourceTree = SOURCE_ROOT; }; 66 | 81AC548A19E9534E004C2C3C /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; 67 | 81D2A1F219EF36B00006F5D2 /* ArchiveWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArchiveWindowController.h; sourceTree = ""; }; 68 | 81D2A1F319EF36B00006F5D2 /* ArchiveWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArchiveWindowController.m; sourceTree = ""; }; 69 | 81D2A1F419EF36B00006F5D2 /* ArchiveWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ArchiveWindowController.xib; sourceTree = ""; }; 70 | /* End PBXFileReference section */ 71 | 72 | /* Begin PBXFrameworksBuildPhase section */ 73 | 81AB04C319E83963002C4964 /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | 81AB04D619E83963002C4964 /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | /* End PBXFrameworksBuildPhase section */ 88 | 89 | /* Begin PBXGroup section */ 90 | 81AB04BD19E83963002C4964 = { 91 | isa = PBXGroup; 92 | children = ( 93 | 81AB04C819E83963002C4964 /* IPAExporter */, 94 | 81AB04DC19E83963002C4964 /* IPAExporterTests */, 95 | 81AB04C719E83963002C4964 /* Products */, 96 | ); 97 | sourceTree = ""; 98 | }; 99 | 81AB04C719E83963002C4964 /* Products */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 81AB04C619E83963002C4964 /* IPAExporter.app */, 103 | 81AB04D919E83963002C4964 /* IPAExporterTests.xctest */, 104 | ); 105 | name = Products; 106 | sourceTree = ""; 107 | }; 108 | 81AB04C819E83963002C4964 /* IPAExporter */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 81AC548319E908FE004C2C3C /* Common */, 112 | 81AC548119E908E4004C2C3C /* Models */, 113 | 81AC548219E908F6004C2C3C /* UI */, 114 | 81AB04CD19E83963002C4964 /* AppDelegate.h */, 115 | 81AB04CE19E83963002C4964 /* AppDelegate.m */, 116 | 81AB04C919E83963002C4964 /* Supporting Files */, 117 | 81AC548419E90AC1004C2C3C /* Images.xcassets */, 118 | 81AC548919E9534E004C2C3C /* LICENSE.txt */, 119 | 81AC548A19E9534E004C2C3C /* README.md */, 120 | ); 121 | path = IPAExporter; 122 | sourceTree = ""; 123 | }; 124 | 81AB04C919E83963002C4964 /* Supporting Files */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 814A0F6F19E8E4CF0023B1A5 /* Export.sh */, 128 | 81AB04CA19E83963002C4964 /* Info.plist */, 129 | 81AB04CB19E83963002C4964 /* main.m */, 130 | ); 131 | name = "Supporting Files"; 132 | sourceTree = ""; 133 | }; 134 | 81AB04DC19E83963002C4964 /* IPAExporterTests */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 81AB04DF19E83963002C4964 /* IPAExporterTests.m */, 138 | 81AB04DD19E83963002C4964 /* Supporting Files */, 139 | ); 140 | path = IPAExporterTests; 141 | sourceTree = ""; 142 | }; 143 | 81AB04DD19E83963002C4964 /* Supporting Files */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 81AB04DE19E83963002C4964 /* Info.plist */, 147 | ); 148 | name = "Supporting Files"; 149 | sourceTree = ""; 150 | }; 151 | 81AC548119E908E4004C2C3C /* Models */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 81AB04E919E84762002C4964 /* Provisioning.h */, 155 | 81AB04EA19E84762002C4964 /* Provisioning.m */, 156 | 814A0F6C19E8D6B30023B1A5 /* SigningIdentity.h */, 157 | 814A0F6D19E8D6B30023B1A5 /* SigningIdentity.m */, 158 | 81AB04EF19E855A2002C4964 /* XcodeArchive.h */, 159 | 81AB04F019E855A2002C4964 /* XcodeArchive.m */, 160 | ); 161 | name = Models; 162 | sourceTree = ""; 163 | }; 164 | 81AC548219E908F6004C2C3C /* UI */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | 81D2A1F219EF36B00006F5D2 /* ArchiveWindowController.h */, 168 | 81D2A1F319EF36B00006F5D2 /* ArchiveWindowController.m */, 169 | 81D2A1F419EF36B00006F5D2 /* ArchiveWindowController.xib */, 170 | 814A0F6719E8C44F0023B1A5 /* ExportWindowController.h */, 171 | 814A0F6819E8C4500023B1A5 /* ExportWindowController.m */, 172 | 814A0F6919E8C4500023B1A5 /* ExportWindowController.xib */, 173 | 81AB04D219E83963002C4964 /* MainMenu.xib */, 174 | 81AB04EC19E85376002C4964 /* TableAppCellView.h */, 175 | 81AB04ED19E85376002C4964 /* TableAppCellView.m */, 176 | ); 177 | name = UI; 178 | sourceTree = ""; 179 | }; 180 | 81AC548319E908FE004C2C3C /* Common */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | 81AC548619E94A23004C2C3C /* DirectoryWatcher.h */, 184 | 81AC548719E94A23004C2C3C /* DirectoryWatcher.m */, 185 | 814A0F6419E8B7570023B1A5 /* NSDate+Relative.h */, 186 | 814A0F6519E8B7570023B1A5 /* NSDate+Relative.m */, 187 | ); 188 | name = Common; 189 | sourceTree = ""; 190 | }; 191 | /* End PBXGroup section */ 192 | 193 | /* Begin PBXNativeTarget section */ 194 | 81AB04C519E83963002C4964 /* IPAExporter */ = { 195 | isa = PBXNativeTarget; 196 | buildConfigurationList = 81AB04E319E83963002C4964 /* Build configuration list for PBXNativeTarget "IPAExporter" */; 197 | buildPhases = ( 198 | 81AB04C219E83963002C4964 /* Sources */, 199 | 81AB04C319E83963002C4964 /* Frameworks */, 200 | 81AB04C419E83963002C4964 /* Resources */, 201 | ); 202 | buildRules = ( 203 | ); 204 | dependencies = ( 205 | ); 206 | name = IPAExporter; 207 | productName = IPAExporter; 208 | productReference = 81AB04C619E83963002C4964 /* IPAExporter.app */; 209 | productType = "com.apple.product-type.application"; 210 | }; 211 | 81AB04D819E83963002C4964 /* IPAExporterTests */ = { 212 | isa = PBXNativeTarget; 213 | buildConfigurationList = 81AB04E619E83963002C4964 /* Build configuration list for PBXNativeTarget "IPAExporterTests" */; 214 | buildPhases = ( 215 | 81AB04D519E83963002C4964 /* Sources */, 216 | 81AB04D619E83963002C4964 /* Frameworks */, 217 | 81AB04D719E83963002C4964 /* Resources */, 218 | ); 219 | buildRules = ( 220 | ); 221 | dependencies = ( 222 | 81AB04DB19E83963002C4964 /* PBXTargetDependency */, 223 | ); 224 | name = IPAExporterTests; 225 | productName = IPAExporterTests; 226 | productReference = 81AB04D919E83963002C4964 /* IPAExporterTests.xctest */; 227 | productType = "com.apple.product-type.bundle.unit-test"; 228 | }; 229 | /* End PBXNativeTarget section */ 230 | 231 | /* Begin PBXProject section */ 232 | 81AB04BE19E83963002C4964 /* Project object */ = { 233 | isa = PBXProject; 234 | attributes = { 235 | LastUpgradeCheck = 0600; 236 | ORGANIZATIONNAME = Pharaoh; 237 | TargetAttributes = { 238 | 81AB04C519E83963002C4964 = { 239 | CreatedOnToolsVersion = 6.0; 240 | }; 241 | 81AB04D819E83963002C4964 = { 242 | CreatedOnToolsVersion = 6.0; 243 | TestTargetID = 81AB04C519E83963002C4964; 244 | }; 245 | }; 246 | }; 247 | buildConfigurationList = 81AB04C119E83963002C4964 /* Build configuration list for PBXProject "IPAExporter" */; 248 | compatibilityVersion = "Xcode 3.2"; 249 | developmentRegion = English; 250 | hasScannedForEncodings = 0; 251 | knownRegions = ( 252 | en, 253 | Base, 254 | ); 255 | mainGroup = 81AB04BD19E83963002C4964; 256 | productRefGroup = 81AB04C719E83963002C4964 /* Products */; 257 | projectDirPath = ""; 258 | projectRoot = ""; 259 | targets = ( 260 | 81AB04C519E83963002C4964 /* IPAExporter */, 261 | 81AB04D819E83963002C4964 /* IPAExporterTests */, 262 | ); 263 | }; 264 | /* End PBXProject section */ 265 | 266 | /* Begin PBXResourcesBuildPhase section */ 267 | 81AB04C419E83963002C4964 /* Resources */ = { 268 | isa = PBXResourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | 814A0F7019E8E4CF0023B1A5 /* Export.sh in Resources */, 272 | 81D2A1F619EF36B00006F5D2 /* ArchiveWindowController.xib in Resources */, 273 | 81AC548519E90AC1004C2C3C /* Images.xcassets in Resources */, 274 | 814A0F6B19E8C4500023B1A5 /* ExportWindowController.xib in Resources */, 275 | 81AB04D419E83963002C4964 /* MainMenu.xib in Resources */, 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | 81AB04D719E83963002C4964 /* Resources */ = { 280 | isa = PBXResourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | }; 286 | /* End PBXResourcesBuildPhase section */ 287 | 288 | /* Begin PBXSourcesBuildPhase section */ 289 | 81AB04C219E83963002C4964 /* Sources */ = { 290 | isa = PBXSourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | 81AB04EB19E84762002C4964 /* Provisioning.m in Sources */, 294 | 814A0F6A19E8C4500023B1A5 /* ExportWindowController.m in Sources */, 295 | 81D2A1F519EF36B00006F5D2 /* ArchiveWindowController.m in Sources */, 296 | 81AB04EE19E85376002C4964 /* TableAppCellView.m in Sources */, 297 | 81AB04CF19E83963002C4964 /* AppDelegate.m in Sources */, 298 | 81AB04CC19E83963002C4964 /* main.m in Sources */, 299 | 814A0F6E19E8D6B30023B1A5 /* SigningIdentity.m in Sources */, 300 | 81AB04F119E855A2002C4964 /* XcodeArchive.m in Sources */, 301 | 814A0F6619E8B7570023B1A5 /* NSDate+Relative.m in Sources */, 302 | 81AC548819E94A23004C2C3C /* DirectoryWatcher.m in Sources */, 303 | ); 304 | runOnlyForDeploymentPostprocessing = 0; 305 | }; 306 | 81AB04D519E83963002C4964 /* Sources */ = { 307 | isa = PBXSourcesBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | 81AB04E019E83963002C4964 /* IPAExporterTests.m in Sources */, 311 | ); 312 | runOnlyForDeploymentPostprocessing = 0; 313 | }; 314 | /* End PBXSourcesBuildPhase section */ 315 | 316 | /* Begin PBXTargetDependency section */ 317 | 81AB04DB19E83963002C4964 /* PBXTargetDependency */ = { 318 | isa = PBXTargetDependency; 319 | target = 81AB04C519E83963002C4964 /* IPAExporter */; 320 | targetProxy = 81AB04DA19E83963002C4964 /* PBXContainerItemProxy */; 321 | }; 322 | /* End PBXTargetDependency section */ 323 | 324 | /* Begin PBXVariantGroup section */ 325 | 81AB04D219E83963002C4964 /* MainMenu.xib */ = { 326 | isa = PBXVariantGroup; 327 | children = ( 328 | 81AB04D319E83963002C4964 /* Base */, 329 | ); 330 | name = MainMenu.xib; 331 | sourceTree = ""; 332 | }; 333 | /* End PBXVariantGroup section */ 334 | 335 | /* Begin XCBuildConfiguration section */ 336 | 81AB04E119E83963002C4964 /* Debug */ = { 337 | isa = XCBuildConfiguration; 338 | buildSettings = { 339 | ALWAYS_SEARCH_USER_PATHS = NO; 340 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 341 | CLANG_CXX_LIBRARY = "libc++"; 342 | CLANG_ENABLE_MODULES = YES; 343 | CLANG_ENABLE_OBJC_ARC = YES; 344 | CLANG_WARN_BOOL_CONVERSION = YES; 345 | CLANG_WARN_CONSTANT_CONVERSION = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INT_CONVERSION = YES; 350 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 351 | CLANG_WARN_UNREACHABLE_CODE = YES; 352 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 353 | CODE_SIGN_IDENTITY = "-"; 354 | COPY_PHASE_STRIP = NO; 355 | ENABLE_STRICT_OBJC_MSGSEND = YES; 356 | GCC_C_LANGUAGE_STANDARD = gnu99; 357 | GCC_DYNAMIC_NO_PIC = NO; 358 | GCC_OPTIMIZATION_LEVEL = 0; 359 | GCC_PREPROCESSOR_DEFINITIONS = ( 360 | "DEBUG=1", 361 | "$(inherited)", 362 | ); 363 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 364 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 365 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 366 | GCC_WARN_UNDECLARED_SELECTOR = YES; 367 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 368 | GCC_WARN_UNUSED_FUNCTION = YES; 369 | GCC_WARN_UNUSED_VARIABLE = YES; 370 | MACOSX_DEPLOYMENT_TARGET = 10.10; 371 | MTL_ENABLE_DEBUG_INFO = YES; 372 | ONLY_ACTIVE_ARCH = YES; 373 | SDKROOT = macosx; 374 | }; 375 | name = Debug; 376 | }; 377 | 81AB04E219E83963002C4964 /* Release */ = { 378 | isa = XCBuildConfiguration; 379 | buildSettings = { 380 | ALWAYS_SEARCH_USER_PATHS = NO; 381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 382 | CLANG_CXX_LIBRARY = "libc++"; 383 | CLANG_ENABLE_MODULES = YES; 384 | CLANG_ENABLE_OBJC_ARC = YES; 385 | CLANG_WARN_BOOL_CONVERSION = YES; 386 | CLANG_WARN_CONSTANT_CONVERSION = YES; 387 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 388 | CLANG_WARN_EMPTY_BODY = YES; 389 | CLANG_WARN_ENUM_CONVERSION = YES; 390 | CLANG_WARN_INT_CONVERSION = YES; 391 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 392 | CLANG_WARN_UNREACHABLE_CODE = YES; 393 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 394 | CODE_SIGN_IDENTITY = "-"; 395 | COPY_PHASE_STRIP = YES; 396 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 397 | ENABLE_NS_ASSERTIONS = NO; 398 | ENABLE_STRICT_OBJC_MSGSEND = YES; 399 | GCC_C_LANGUAGE_STANDARD = gnu99; 400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 402 | GCC_WARN_UNDECLARED_SELECTOR = YES; 403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 404 | GCC_WARN_UNUSED_FUNCTION = YES; 405 | GCC_WARN_UNUSED_VARIABLE = YES; 406 | MACOSX_DEPLOYMENT_TARGET = 10.10; 407 | MTL_ENABLE_DEBUG_INFO = NO; 408 | SDKROOT = macosx; 409 | }; 410 | name = Release; 411 | }; 412 | 81AB04E419E83963002C4964 /* Debug */ = { 413 | isa = XCBuildConfiguration; 414 | buildSettings = { 415 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 416 | COMBINE_HIDPI_IMAGES = YES; 417 | INFOPLIST_FILE = IPAExporter/Info.plist; 418 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 419 | MACOSX_DEPLOYMENT_TARGET = 10.7; 420 | PRODUCT_NAME = "$(TARGET_NAME)"; 421 | }; 422 | name = Debug; 423 | }; 424 | 81AB04E519E83963002C4964 /* Release */ = { 425 | isa = XCBuildConfiguration; 426 | buildSettings = { 427 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 428 | COMBINE_HIDPI_IMAGES = YES; 429 | INFOPLIST_FILE = IPAExporter/Info.plist; 430 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 431 | MACOSX_DEPLOYMENT_TARGET = 10.7; 432 | PRODUCT_NAME = "$(TARGET_NAME)"; 433 | }; 434 | name = Release; 435 | }; 436 | 81AB04E719E83963002C4964 /* Debug */ = { 437 | isa = XCBuildConfiguration; 438 | buildSettings = { 439 | BUNDLE_LOADER = "$(TEST_HOST)"; 440 | COMBINE_HIDPI_IMAGES = YES; 441 | FRAMEWORK_SEARCH_PATHS = ( 442 | "$(DEVELOPER_FRAMEWORKS_DIR)", 443 | "$(inherited)", 444 | ); 445 | GCC_PREPROCESSOR_DEFINITIONS = ( 446 | "DEBUG=1", 447 | "$(inherited)", 448 | ); 449 | INFOPLIST_FILE = IPAExporterTests/Info.plist; 450 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/IPAExporter.app/Contents/MacOS/IPAExporter"; 453 | }; 454 | name = Debug; 455 | }; 456 | 81AB04E819E83963002C4964 /* Release */ = { 457 | isa = XCBuildConfiguration; 458 | buildSettings = { 459 | BUNDLE_LOADER = "$(TEST_HOST)"; 460 | COMBINE_HIDPI_IMAGES = YES; 461 | FRAMEWORK_SEARCH_PATHS = ( 462 | "$(DEVELOPER_FRAMEWORKS_DIR)", 463 | "$(inherited)", 464 | ); 465 | INFOPLIST_FILE = IPAExporterTests/Info.plist; 466 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 467 | PRODUCT_NAME = "$(TARGET_NAME)"; 468 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/IPAExporter.app/Contents/MacOS/IPAExporter"; 469 | }; 470 | name = Release; 471 | }; 472 | /* End XCBuildConfiguration section */ 473 | 474 | /* Begin XCConfigurationList section */ 475 | 81AB04C119E83963002C4964 /* Build configuration list for PBXProject "IPAExporter" */ = { 476 | isa = XCConfigurationList; 477 | buildConfigurations = ( 478 | 81AB04E119E83963002C4964 /* Debug */, 479 | 81AB04E219E83963002C4964 /* Release */, 480 | ); 481 | defaultConfigurationIsVisible = 0; 482 | defaultConfigurationName = Release; 483 | }; 484 | 81AB04E319E83963002C4964 /* Build configuration list for PBXNativeTarget "IPAExporter" */ = { 485 | isa = XCConfigurationList; 486 | buildConfigurations = ( 487 | 81AB04E419E83963002C4964 /* Debug */, 488 | 81AB04E519E83963002C4964 /* Release */, 489 | ); 490 | defaultConfigurationIsVisible = 0; 491 | defaultConfigurationName = Release; 492 | }; 493 | 81AB04E619E83963002C4964 /* Build configuration list for PBXNativeTarget "IPAExporterTests" */ = { 494 | isa = XCConfigurationList; 495 | buildConfigurations = ( 496 | 81AB04E719E83963002C4964 /* Debug */, 497 | 81AB04E819E83963002C4964 /* Release */, 498 | ); 499 | defaultConfigurationIsVisible = 0; 500 | defaultConfigurationName = Release; 501 | }; 502 | /* End XCConfigurationList section */ 503 | }; 504 | rootObject = 81AB04BE19E83963002C4964 /* Project object */; 505 | } 506 | -------------------------------------------------------------------------------- /IPAExporter.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /IPAExporter.xcodeproj/project.xcworkspace/xcshareddata/IPAExporter.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 0627F59D-7016-441A-AB72-7B1D1CB7E118 9 | IDESourceControlProjectName 10 | IPAExporter 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 14 | https://github.com/tue-savvy/IPAExporter.git 15 | 16 | IDESourceControlProjectPath 17 | IPAExporter.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/tue-savvy/IPAExporter.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 36 | IDESourceControlWCCName 37 | IPAExporter 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /IPAExporter.xcodeproj/xcuserdata/Tue.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /IPAExporter.xcodeproj/xcuserdata/Tue.xcuserdatad/xcschemes/IPAExporter.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /IPAExporter.xcodeproj/xcuserdata/Tue.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | IPAExporter.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 81AB04C519E83963002C4964 16 | 17 | primary 18 | 19 | 20 | 81AB04D819E83963002C4964 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /IPAExporter/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/10/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /IPAExporter/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/10/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ArchiveWindowController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @property (weak) IBOutlet NSWindow *window; 15 | @property (nonatomic, strong) ArchiveWindowController *mainWindowController; 16 | @end 17 | 18 | @implementation AppDelegate 19 | - (void)awakeFromNib { 20 | self.mainWindowController = [[ArchiveWindowController alloc] initWithWindowNibName:@"ArchiveWindowController"]; 21 | self.window = self.mainWindowController.window; 22 | } 23 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 24 | 25 | } 26 | - (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag{ 27 | 28 | if(flag == NO){ 29 | [self.window makeKeyAndOrderFront:self]; 30 | } 31 | return YES; 32 | } 33 | 34 | 35 | - (void)applicationWillTerminate:(NSNotification *)aNotification { 36 | // Insert code here to tear down your application 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /IPAExporter/ArchiveWindowController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ArchiveWindowController.h 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/16/14. 6 | // Copyright (c) 2014 Pharaoh. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ArchiveWindowController : NSWindowController 12 | @property (strong, nonatomic) NSBundle *plugInBundle; 13 | @end 14 | -------------------------------------------------------------------------------- /IPAExporter/ArchiveWindowController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ArchiveWindowController.m 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/16/14. 6 | // Copyright (c) 2014 Pharaoh. All rights reserved. 7 | // 8 | 9 | #import "ArchiveWindowController.h" 10 | #import 11 | #import "Provisioning.h" 12 | #import "XcodeArchive.h" 13 | #import "TableAppCellView.h" 14 | #import "NSDate+Relative.h" 15 | #import "ExportWindowController.h" 16 | #import "DirectoryWatcher.h" 17 | 18 | @interface ArchiveWindowController () 19 | @property (nonatomic, strong) NSMutableArray *archives; 20 | @property (weak) IBOutlet NSTableView *tableView; 21 | @property (nonatomic, strong) XcodeArchive *selectedArchive; 22 | @property (weak) IBOutlet NSImageView *selectedArchiveImageView; 23 | @property (weak) IBOutlet NSTextField *selectedAppName; 24 | @property (weak) IBOutlet NSTextField *selectedProjectName; 25 | @property (weak) IBOutlet NSTextField *selectedCreationDate; 26 | @property (weak) IBOutlet NSTextField *selectedVersion; 27 | @property (weak) IBOutlet NSTextField *selectedIdentifier; 28 | @property (nonatomic, strong) NSMutableArray *archiveWatchers; 29 | @property (nonatomic, strong) ExportWindowController *exportWindowController; 30 | @end 31 | 32 | @implementation ArchiveWindowController 33 | 34 | - (void)windowDidLoad { 35 | [super windowDidLoad]; 36 | // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. 37 | [self loadXcodeArchives]; 38 | [self registerDirectoryWatcher]; 39 | } 40 | 41 | - (NSString *)archiveDirectoryPath { 42 | NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) firstObject]; 43 | NSString *archivesFolderPath = [libraryPath stringByAppendingPathComponent:@"Developer/Xcode/Archives"]; 44 | return archivesFolderPath; 45 | } 46 | 47 | - (void)loadXcodeArchives { 48 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 49 | NSFileManager *fm = [NSFileManager defaultManager]; 50 | NSString *archivesFolderPath = [self archiveDirectoryPath]; 51 | NSArray *contents = [fm contentsOfDirectoryAtPath:archivesFolderPath error:nil]; 52 | 53 | NSMutableArray *allArchives = [NSMutableArray array]; 54 | for (NSString *folder in contents) { 55 | NSString *subfolder = [archivesFolderPath stringByAppendingPathComponent:folder]; 56 | NSArray *archiveFiles = [fm contentsOfDirectoryAtPath:subfolder error:nil]; 57 | for (NSString *archiveName in archiveFiles) { 58 | NSString *archivePath = [subfolder stringByAppendingPathComponent:archiveName]; 59 | XcodeArchive *archive = [[XcodeArchive alloc] initWithPath:archivePath]; 60 | if (archive.isValidArchive && archive.isIOSArchive) { 61 | [allArchives addObject:archive]; 62 | } 63 | } 64 | } 65 | [allArchives sortUsingDescriptors:@[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:NO]]]; 66 | dispatch_async(dispatch_get_main_queue(), ^{ 67 | self.archives = allArchives; 68 | [self.tableView reloadData]; 69 | NSInteger selectedRow = [self.tableView selectedRow]; 70 | if (selectedRow >= 0 && selectedRow < self.archives.count) { 71 | self.selectedArchive = self.archives[selectedRow]; 72 | } else { 73 | self.selectedArchive = nil; 74 | } 75 | }); 76 | }); 77 | } 78 | - (void)registerDirectoryWatcher { 79 | if (!self.archiveWatchers) self.archiveWatchers = [NSMutableArray array]; 80 | for (DirectoryWatcher *watcher in self.archiveWatchers) { 81 | [watcher invalidate]; 82 | } 83 | NSString *archiveFolder = [self archiveDirectoryPath]; 84 | DirectoryWatcher *watcher = [DirectoryWatcher watchFolderWithPath:archiveFolder delegate:self]; 85 | [self.archiveWatchers addObject:watcher]; 86 | 87 | NSArray *subfolders = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:archiveFolder error:nil]; 88 | for (NSString *name in subfolders) { 89 | if ([name hasPrefix:@"."]) continue; 90 | NSString *subPath = [archiveFolder stringByAppendingPathComponent:name]; 91 | BOOL isDirectory = NO; 92 | if ([[NSFileManager defaultManager] fileExistsAtPath:subPath isDirectory:&isDirectory] && isDirectory) { 93 | watcher = [DirectoryWatcher watchFolderWithPath:subPath delegate:self]; 94 | [self.archiveWatchers addObject:watcher]; 95 | } 96 | } 97 | } 98 | 99 | #pragma mark - DirectoryWatcherDelegate 100 | - (void)directoryDidChange:(DirectoryWatcher *)folderWatcher { 101 | [self loadXcodeArchives]; 102 | dispatch_async(dispatch_get_main_queue(), ^{ 103 | [self registerDirectoryWatcher]; 104 | }); 105 | } 106 | 107 | #pragma mark - NSTableView 108 | - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { 109 | return [self.archives count]; 110 | } 111 | - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { 112 | return self.archives[row]; 113 | } 114 | - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { 115 | TableAppCellView *view = [tableView makeViewWithIdentifier:[tableColumn identifier] owner:self]; 116 | XcodeArchive *archive = [self tableView:tableView objectValueForTableColumn:tableColumn row:row]; 117 | view.textField.stringValue = archive.applicationName; 118 | view.creationLabel.stringValue = [archive.creationDate relativeTime]; 119 | view.imageView.image = archive.applicationIcon; 120 | return view; 121 | } 122 | - (void)tableViewSelectionIsChanging:(NSNotification *)notification { 123 | NSInteger selectedRow = [self.tableView selectedRow]; 124 | if (selectedRow >= 0 && selectedRow < self.archives.count) { 125 | self.selectedArchive = self.archives[selectedRow]; 126 | } else { 127 | self.selectedArchive = nil; 128 | } 129 | } 130 | #pragma mark - SelectedArchive 131 | - (void)setSelectedArchive:(XcodeArchive *)selectedArchive { 132 | _selectedArchive = selectedArchive; 133 | self.selectedArchiveImageView.image = _selectedArchive.applicationIcon; 134 | self.selectedAppName.stringValue = _selectedArchive.applicationName; 135 | self.selectedProjectName.stringValue = _selectedArchive.name; 136 | 137 | self.selectedCreationDate.attributedStringValue = [self attributedStringWithTitle:@"Creation Date: " value:[_selectedArchive.creationDate relativeTime]]; 138 | self.selectedVersion.attributedStringValue = [self attributedStringWithTitle:@"Version: " value:_selectedArchive.version]; 139 | self.selectedIdentifier.attributedStringValue = [self attributedStringWithTitle:@"Identifier: " value:_selectedArchive.bundleID]; 140 | } 141 | 142 | - (NSAttributedString *)attributedStringWithTitle:(NSString *)title value:(NSString *)value { 143 | if (value == nil) value = @""; 144 | 145 | NSFont *boldFont = [NSFont boldSystemFontOfSize:12]; 146 | NSFont *normalFont = [NSFont systemFontOfSize:12]; 147 | NSDictionary *boldStyle = @{NSFontAttributeName:boldFont}; 148 | NSDictionary *normalStyle = @{NSFontAttributeName:normalFont}; 149 | 150 | NSAttributedString *titleAttr = [[NSAttributedString alloc] initWithString:title attributes:boldStyle]; 151 | NSAttributedString *valueAttr = [[NSAttributedString alloc] initWithString:value attributes:normalStyle]; 152 | NSMutableAttributedString *finalString = [[NSMutableAttributedString alloc] initWithAttributedString:titleAttr]; 153 | [finalString appendAttributedString:valueAttr]; 154 | return finalString; 155 | } 156 | 157 | - (IBAction)exportIPA:(id)sender { 158 | if (!self.selectedArchive) return; 159 | 160 | 161 | if (!self.exportWindowController) { 162 | self.exportWindowController = [[ExportWindowController alloc] initWithWindowNibName:@"ExportWindowController"]; 163 | self.exportWindowController.plugInBundle = self.plugInBundle; 164 | } 165 | self.exportWindowController.archive = self.selectedArchive; 166 | [self.window beginSheet:self.exportWindowController.window completionHandler:^(NSModalResponse returnCode) { 167 | 168 | }]; 169 | } 170 | 171 | @end 172 | -------------------------------------------------------------------------------- /IPAExporter/ArchiveWindowController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 114 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | -------------------------------------------------------------------------------- /IPAExporter/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | -------------------------------------------------------------------------------- /IPAExporter/DirectoryWatcher.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: DirectoryWatcher.h 3 | Abstract: 4 | Object used to monitor the contents of a given directory by using 5 | "kqueue": a kernel event notification mechanism. 6 | 7 | Version: 1.5 8 | 9 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple 10 | Inc. ("Apple") in consideration of your agreement to the following 11 | terms, and your use, installation, modification or redistribution of 12 | this Apple software constitutes acceptance of these terms. If you do 13 | not agree with these terms, please do not use, install, modify or 14 | redistribute this Apple software. 15 | 16 | In consideration of your agreement to abide by the following terms, and 17 | subject to these terms, Apple grants you a personal, non-exclusive 18 | license, under Apple's copyrights in this original Apple software (the 19 | "Apple Software"), to use, reproduce, modify and redistribute the Apple 20 | Software, with or without modifications, in source and/or binary forms; 21 | provided that if you redistribute the Apple Software in its entirety and 22 | without modifications, you must retain this notice and the following 23 | text and disclaimers in all such redistributions of the Apple Software. 24 | Neither the name, trademarks, service marks or logos of Apple Inc. may 25 | be used to endorse or promote products derived from the Apple Software 26 | without specific prior written permission from Apple. Except as 27 | expressly stated in this notice, no other rights or licenses, express or 28 | implied, are granted by Apple herein, including but not limited to any 29 | patent rights that may be infringed by your derivative works or by other 30 | works in which the Apple Software may be incorporated. 31 | 32 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE 33 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 34 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS 35 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 36 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 37 | 38 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 39 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 40 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 41 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 42 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 43 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 44 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 45 | POSSIBILITY OF SUCH DAMAGE. 46 | 47 | Copyright (C) 2013 Apple Inc. All Rights Reserved. 48 | 49 | */ 50 | 51 | #import 52 | 53 | @class DirectoryWatcher; 54 | 55 | @protocol DirectoryWatcherDelegate 56 | @required 57 | - (void)directoryDidChange:(DirectoryWatcher *)folderWatcher; 58 | @end 59 | 60 | @interface DirectoryWatcher : NSObject 61 | { 62 | id __weak delegate; 63 | 64 | int dirFD; 65 | int kq; 66 | 67 | CFFileDescriptorRef dirKQRef; 68 | } 69 | @property (strong, nonatomic, readonly) NSString *watchPath; 70 | @property (nonatomic, weak) id delegate; 71 | 72 | + (DirectoryWatcher *)watchFolderWithPath:(NSString *)watchPath delegate:(id)watchDelegate; 73 | - (void)invalidate; 74 | @end 75 | -------------------------------------------------------------------------------- /IPAExporter/DirectoryWatcher.m: -------------------------------------------------------------------------------- 1 | /* 2 | File: DirectoryWatcher.m 3 | Abstract: 4 | Object used to monitor the contents of a given directory by using 5 | "kqueue": a kernel event notification mechanism. 6 | 7 | Version: 1.5 8 | 9 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple 10 | Inc. ("Apple") in consideration of your agreement to the following 11 | terms, and your use, installation, modification or redistribution of 12 | this Apple software constitutes acceptance of these terms. If you do 13 | not agree with these terms, please do not use, install, modify or 14 | redistribute this Apple software. 15 | 16 | In consideration of your agreement to abide by the following terms, and 17 | subject to these terms, Apple grants you a personal, non-exclusive 18 | license, under Apple's copyrights in this original Apple software (the 19 | "Apple Software"), to use, reproduce, modify and redistribute the Apple 20 | Software, with or without modifications, in source and/or binary forms; 21 | provided that if you redistribute the Apple Software in its entirety and 22 | without modifications, you must retain this notice and the following 23 | text and disclaimers in all such redistributions of the Apple Software. 24 | Neither the name, trademarks, service marks or logos of Apple Inc. may 25 | be used to endorse or promote products derived from the Apple Software 26 | without specific prior written permission from Apple. Except as 27 | expressly stated in this notice, no other rights or licenses, express or 28 | implied, are granted by Apple herein, including but not limited to any 29 | patent rights that may be infringed by your derivative works or by other 30 | works in which the Apple Software may be incorporated. 31 | 32 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE 33 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 34 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS 35 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 36 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 37 | 38 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 39 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 40 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 41 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 42 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 43 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 44 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 45 | POSSIBILITY OF SUCH DAMAGE. 46 | 47 | Copyright (C) 2013 Apple Inc. All Rights Reserved. 48 | 49 | */ 50 | 51 | #import "DirectoryWatcher.h" 52 | 53 | #include 54 | #include 55 | #include 56 | #include 57 | #include 58 | 59 | #import 60 | 61 | @interface DirectoryWatcher () 62 | @property (strong, nonatomic, readwrite) NSString *watchPath; 63 | - (BOOL)startMonitoringDirectory:(NSString *)dirPath; 64 | - (void)kqueueFired; 65 | 66 | @end 67 | 68 | 69 | #pragma mark - 70 | 71 | @implementation DirectoryWatcher 72 | 73 | @synthesize delegate; 74 | @synthesize watchPath; 75 | 76 | - (instancetype)init 77 | { 78 | self = [super init]; 79 | delegate = NULL; 80 | 81 | dirFD = -1; 82 | kq = -1; 83 | dirKQRef = NULL; 84 | 85 | return self; 86 | } 87 | 88 | - (void)dealloc 89 | { 90 | [self invalidate]; 91 | } 92 | 93 | + (DirectoryWatcher *)watchFolderWithPath:(NSString *)watchPath delegate:(id)watchDelegate 94 | { 95 | DirectoryWatcher *retVal = NULL; 96 | if ((watchDelegate != NULL) && (watchPath != NULL)) 97 | { 98 | DirectoryWatcher *tempManager = [[DirectoryWatcher alloc] init]; 99 | tempManager.delegate = watchDelegate; 100 | if ([tempManager startMonitoringDirectory: watchPath]) 101 | { 102 | // Everything appears to be in order, so return the DirectoryWatcher. 103 | // Otherwise we'll fall through and return NULL. 104 | retVal = tempManager; 105 | } 106 | } 107 | return retVal; 108 | } 109 | 110 | - (void)invalidate 111 | { 112 | if (dirKQRef != NULL) 113 | { 114 | CFFileDescriptorInvalidate(dirKQRef); 115 | CFRelease(dirKQRef); 116 | dirKQRef = NULL; 117 | // We don't need to close the kq, CFFileDescriptorInvalidate closed it instead. 118 | // Change the value so no one thinks it's still live. 119 | kq = -1; 120 | } 121 | 122 | if(dirFD != -1) 123 | { 124 | close(dirFD); 125 | dirFD = -1; 126 | } 127 | } 128 | 129 | #pragma mark - DirectoryWatcherPrivate 130 | 131 | - (void)kqueueFired 132 | { 133 | assert(kq >= 0); 134 | 135 | struct kevent event; 136 | struct timespec timeout = {0, 0}; 137 | int eventCount; 138 | 139 | eventCount = kevent(kq, NULL, 0, &event, 1, &timeout); 140 | assert((eventCount >= 0) && (eventCount < 2)); 141 | 142 | // call our delegate of the directory change 143 | [delegate directoryDidChange:self]; 144 | 145 | CFFileDescriptorEnableCallBacks(dirKQRef, kCFFileDescriptorReadCallBack); 146 | } 147 | 148 | static void KQCallback(CFFileDescriptorRef kqRef, CFOptionFlags callBackTypes, void *info) 149 | { 150 | DirectoryWatcher *obj; 151 | 152 | obj = (__bridge DirectoryWatcher *)info; 153 | assert([obj isKindOfClass:[DirectoryWatcher class]]); 154 | assert(kqRef == obj->dirKQRef); 155 | assert(callBackTypes == kCFFileDescriptorReadCallBack); 156 | 157 | [obj kqueueFired]; 158 | } 159 | 160 | - (BOOL)startMonitoringDirectory:(NSString *)dirPath 161 | { 162 | // Double initializing is not going to work... 163 | if ((dirKQRef == NULL) && (dirFD == -1) && (kq == -1)) 164 | { 165 | // Open the directory we're going to watch 166 | dirFD = open([dirPath fileSystemRepresentation], O_EVTONLY); 167 | if (dirFD >= 0) 168 | { 169 | self.watchPath = dirPath; 170 | // Create a kqueue for our event messages... 171 | kq = kqueue(); 172 | if (kq >= 0) 173 | { 174 | struct kevent eventToAdd; 175 | eventToAdd.ident = dirFD; 176 | eventToAdd.filter = EVFILT_VNODE; 177 | eventToAdd.flags = EV_ADD | EV_CLEAR; 178 | eventToAdd.fflags = NOTE_WRITE; 179 | eventToAdd.data = 0; 180 | eventToAdd.udata = NULL; 181 | 182 | int errNum = kevent(kq, &eventToAdd, 1, NULL, 0, NULL); 183 | if (errNum == 0) 184 | { 185 | CFFileDescriptorContext context = { 0, (__bridge void *)(self), NULL, NULL, NULL }; 186 | CFRunLoopSourceRef rls; 187 | 188 | // Passing true in the third argument so CFFileDescriptorInvalidate will close kq. 189 | dirKQRef = CFFileDescriptorCreate(NULL, kq, true, KQCallback, &context); 190 | if (dirKQRef != NULL) 191 | { 192 | rls = CFFileDescriptorCreateRunLoopSource(NULL, dirKQRef, 0); 193 | if (rls != NULL) 194 | { 195 | CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); 196 | CFRelease(rls); 197 | CFFileDescriptorEnableCallBacks(dirKQRef, kCFFileDescriptorReadCallBack); 198 | 199 | // If everything worked, return early and bypass shutting things down 200 | return YES; 201 | } 202 | // Couldn't create a runloop source, invalidate and release the CFFileDescriptorRef 203 | CFFileDescriptorInvalidate(dirKQRef); 204 | CFRelease(dirKQRef); 205 | dirKQRef = NULL; 206 | } 207 | } 208 | // kq is active, but something failed, close the handle... 209 | close(kq); 210 | kq = -1; 211 | } 212 | // file handle is open, but something failed, close the handle... 213 | close(dirFD); 214 | dirFD = -1; 215 | } 216 | } 217 | return NO; 218 | } 219 | 220 | @end 221 | -------------------------------------------------------------------------------- /IPAExporter/Export.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Export.sh 4 | # IPAExporter 5 | # 6 | # Created by Tue Nguyen on 10/11/14. 7 | # Copyright (c) 2014 HOME. All rights reserved. 8 | 9 | echo "*********************************" 10 | echo "Build Started" 11 | echo "*********************************" 12 | 13 | echo "*********************************" 14 | echo "Beginning Build Process" 15 | echo "*********************************" 16 | 17 | #xcodebuild -exportArchive -exportFormat ipa -archivePath "${1}" -exportPath "${2}" -exportProvisioningProfile "${3}" -exportSigningIdentity "${4}" 18 | xcrun -sdk iphoneos PackageApplication -v "${1}" -o "${2}" --sign "${3}" --embed "${4}" 19 | 20 | 21 | echo "*********************************" 22 | echo "Creating IPA" 23 | echo "*********************************" -------------------------------------------------------------------------------- /IPAExporter/ExportWindowController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ExportWindowController.h 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/11/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import 10 | @class XcodeArchive; 11 | @interface ExportWindowController : NSWindowController 12 | @property (nonatomic, strong) XcodeArchive *archive; 13 | @property (strong, nonatomic) NSBundle *plugInBundle; 14 | @end 15 | -------------------------------------------------------------------------------- /IPAExporter/ExportWindowController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ExportWindowController.m 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/11/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import "ExportWindowController.h" 10 | #import "Provisioning.h" 11 | #import "XcodeArchive.h" 12 | #import "NSDate+Relative.h" 13 | 14 | #define LastSelectPathKey @"LastPath" 15 | 16 | @interface ExportWindowController () 17 | 18 | @property (strong) IBOutlet NSMenu *popupMenu; 19 | @property (nonatomic, strong) NSMutableArray *provisioningArray; 20 | @property (strong) IBOutlet NSPopUpButton *popupButton; 21 | @property (strong) IBOutlet NSProgressIndicator *progressView; 22 | @property (strong) IBOutlet NSButton *exportButton; 23 | @property (strong) IBOutlet NSTextField *destinationTextField; 24 | @property (strong) IBOutlet NSButton *changeDestButton; 25 | @property (strong) IBOutlet NSButton *cancelButton; 26 | 27 | @property (weak) IBOutlet NSImageView *selectedArchiveImageView; 28 | @property (weak) IBOutlet NSTextField *selectedAppName; 29 | @property (weak) IBOutlet NSTextField *selectedProjectName; 30 | @property (weak) IBOutlet NSTextField *selectedCreationDate; 31 | @property (weak) IBOutlet NSTextField *selectedVersion; 32 | @property (weak) IBOutlet NSTextField *selectedIdentifier; 33 | 34 | @property (nonatomic, strong) NSTask *exportingTask; 35 | @end 36 | 37 | @implementation ExportWindowController 38 | 39 | - (void)windowDidLoad { 40 | [super windowDidLoad]; 41 | self.provisioningArray = [NSMutableArray array]; 42 | 43 | [self buildListIdentity]; 44 | 45 | [self updateArchiveInfo:self.archive]; 46 | [self lookupBestIdentity]; 47 | } 48 | 49 | - (void)setArchive:(XcodeArchive *)archive { 50 | _archive = archive; 51 | if ([self isWindowLoaded]) { 52 | [self updateArchiveInfo:_archive]; 53 | [self lookupBestIdentity]; 54 | } 55 | } 56 | 57 | - (void)updateArchiveInfo:(XcodeArchive *)selectedArchive { 58 | self.selectedArchiveImageView.image = selectedArchive.applicationIcon; 59 | self.selectedAppName.stringValue = selectedArchive.applicationName; 60 | self.selectedProjectName.stringValue = selectedArchive.name; 61 | 62 | self.selectedCreationDate.attributedStringValue = [self attributedStringWithTitle:@"Creation Date: " value:[selectedArchive.creationDate relativeTime]]; 63 | self.selectedVersion.attributedStringValue = [self attributedStringWithTitle:@"Version: " value:selectedArchive.version]; 64 | self.selectedIdentifier.attributedStringValue = [self attributedStringWithTitle:@"Identifier: " value:selectedArchive.bundleID]; 65 | 66 | if ([[NSUserDefaults standardUserDefaults] objectForKey:LastSelectPathKey]) { 67 | self.destinationTextField.stringValue = [[NSUserDefaults standardUserDefaults] objectForKey:LastSelectPathKey]; 68 | } else { 69 | NSString *desktop = [NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES) firstObject]; 70 | self.destinationTextField.stringValue = [desktop stringByAppendingPathComponent:[self.archive.name stringByAppendingPathExtension:@"ipa"]]; 71 | } 72 | } 73 | - (NSAttributedString *)attributedStringWithTitle:(NSString *)title value:(NSString *)value { 74 | if (value == nil) value = @""; 75 | 76 | NSFont *boldFont = [NSFont boldSystemFontOfSize:12]; 77 | NSFont *normalFont = [NSFont systemFontOfSize:12]; 78 | NSDictionary *boldStyle = @{NSFontAttributeName:boldFont}; 79 | NSDictionary *normalStyle = @{NSFontAttributeName:normalFont}; 80 | 81 | NSAttributedString *titleAttr = [[NSAttributedString alloc] initWithString:title attributes:boldStyle]; 82 | NSAttributedString *valueAttr = [[NSAttributedString alloc] initWithString:value attributes:normalStyle]; 83 | NSMutableAttributedString *finalString = [[NSMutableAttributedString alloc] initWithAttributedString:titleAttr]; 84 | [finalString appendAttributedString:valueAttr]; 85 | return finalString; 86 | } 87 | 88 | - (IBAction)export:(id)sender { 89 | [self updateUIWhenTaskRunning:YES]; 90 | [self runExportTaskWithCompletion:^{ 91 | [self updateUIWhenTaskRunning:NO]; 92 | [[NSUserDefaults standardUserDefaults] setObject:self.destinationTextField.stringValue forKey:LastSelectPathKey]; 93 | [[NSUserDefaults standardUserDefaults] synchronize]; 94 | 95 | [self.window.sheetParent endSheet:self.window returnCode:NSOKButton]; 96 | }]; 97 | } 98 | 99 | 100 | - (IBAction)cancel:(id)sender { 101 | if (self.exportingTask.isRunning) { 102 | [self.exportingTask terminate]; 103 | self.exportingTask = nil; 104 | } else { 105 | [self.window.sheetParent endSheet:self.window returnCode:NSCancelButton]; 106 | } 107 | } 108 | 109 | - (void)buildListIdentity { 110 | [self.popupMenu removeAllItems]; 111 | 112 | NSArray *keychainsIdentities = [SigningIdentity keychainsIdenities]; 113 | 114 | NSString *library = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) firstObject]; 115 | 116 | NSString *mobileProvisioningFolder = [library stringByAppendingPathComponent:@"MobileDevice/Provisioning Profiles"]; 117 | NSFileManager *fm = [NSFileManager defaultManager]; 118 | NSArray *contents = [fm contentsOfDirectoryAtPath:mobileProvisioningFolder error:nil]; 119 | [self.provisioningArray removeAllObjects]; 120 | 121 | for (NSString *name in contents) { 122 | if ([name hasPrefix:@"."]) continue; 123 | if ([name.pathExtension caseInsensitiveCompare:@"mobileprovision"] != NSOrderedSame) continue; 124 | 125 | NSString *path = [mobileProvisioningFolder stringByAppendingPathComponent:name]; 126 | Provisioning *provisioning = [[Provisioning alloc] initWithPath:path]; 127 | [self.provisioningArray addObject:provisioning]; 128 | } 129 | [self.provisioningArray sortUsingDescriptors:@[[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES selector:@selector(caseInsensitiveCompare:)]]]; 130 | NSString *archiveBundleID = self.archive.bundleID; 131 | 132 | for (Provisioning *provision in self.provisioningArray) { 133 | //Ignore expired provisioning 134 | if (provision.isExpired) continue; 135 | 136 | if ([provision.applicationIdentifier hasSuffix:@"*"]) {//wildcast appid 137 | NSString *provisionAppPrefix = [provision.applicationIdentifier substringToIndex:provision.applicationIdentifier.length - 1]; 138 | if (![archiveBundleID hasPrefix:provisionAppPrefix] && provisionAppPrefix.length > 0) { 139 | continue; 140 | } 141 | } else if (![provision.applicationIdentifier isEqual:archiveBundleID]) { 142 | continue; 143 | } 144 | 145 | NSMenuItem *item = [[NSMenuItem alloc] init]; 146 | item.title = [NSString stringWithFormat:@"%@ (%@)", provision.name, provision.applicationIdentifier]; 147 | 148 | [item setEnabled:NO]; 149 | [self.popupMenu addItem:item]; 150 | for (SigningIdentity *identity in provision.signingIdentities) { 151 | BOOL matchInKeychains = NO; 152 | for (SigningIdentity *keyhainsIdentity in keychainsIdentities) { 153 | if ([identity.certificateData isEqualToData:keyhainsIdentity.certificateData]) { 154 | matchInKeychains = YES; 155 | break; 156 | } 157 | } 158 | //The signing identity no found in keychains. So we skip it 159 | if (!matchInKeychains) continue; 160 | 161 | NSMenuItem *itemIdentity = [[NSMenuItem alloc] init]; 162 | itemIdentity.title = identity.commonName; 163 | itemIdentity.indentationLevel = 1; 164 | itemIdentity.representedObject = identity; 165 | [self.popupMenu addItem:itemIdentity]; 166 | } 167 | [self.popupMenu addItem:[NSMenuItem separatorItem]]; 168 | } 169 | if (self.popupButton.numberOfItems > 0) { 170 | [self.popupButton selectItemAtIndex:1]; 171 | } 172 | } 173 | - (void)runExportTaskWithCompletion:(dispatch_block_t)completion { 174 | SigningIdentity *selectedIdentity = [self.popupButton selectedItem].representedObject; 175 | NSBundle *bundle = self.plugInBundle ? self.plugInBundle : [NSBundle mainBundle]; 176 | NSString *exportCommand = [bundle pathForResource:@"Export" ofType:@"sh"]; 177 | NSString *appPath = self.archive.absoluteApplicationPath; 178 | NSString *desticationPath = self.destinationTextField.stringValue; 179 | NSString *provisionName = selectedIdentity.provision.path; 180 | NSString *identityName = selectedIdentity.commonName; 181 | 182 | NSTask *exportTask = [NSTask new]; 183 | self.exportingTask = exportTask; 184 | [exportTask setLaunchPath:exportCommand]; 185 | [exportTask setArguments:@[appPath, desticationPath, identityName, provisionName]]; 186 | 187 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 188 | [exportTask launch]; 189 | [exportTask waitUntilExit]; 190 | dispatch_async(dispatch_get_main_queue(), ^{ 191 | if (completion) completion(); 192 | }); 193 | }); 194 | } 195 | - (void)updateUIWhenTaskRunning:(BOOL)running { 196 | if (running) { 197 | [self.progressView startAnimation:nil]; 198 | [self.exportButton setEnabled:NO]; 199 | } else { 200 | [self.progressView stopAnimation:nil]; 201 | [self.exportButton setEnabled:YES]; 202 | } 203 | } 204 | - (IBAction)chageDestination:(id)sender { 205 | NSSavePanel *savePanel = [NSSavePanel savePanel]; 206 | savePanel.allowedFileTypes = @[@"ipa"]; 207 | savePanel.allowsOtherFileTypes = NO; 208 | NSString *destPath = self.destinationTextField.stringValue; 209 | 210 | savePanel.directoryURL = [NSURL fileURLWithPath:destPath.stringByDeletingLastPathComponent]; 211 | [savePanel setNameFieldStringValue:destPath.lastPathComponent]; 212 | 213 | [savePanel beginWithCompletionHandler:^(NSInteger result) { 214 | if (result == NSFileHandlingPanelOKButton) { 215 | self.destinationTextField.stringValue = savePanel.URL.path; 216 | } 217 | }]; 218 | 219 | } 220 | - (IBAction)reloadIdentities:(id)sender { 221 | [self buildListIdentity]; 222 | [self lookupBestIdentity]; 223 | } 224 | - (void)lookupBestIdentity { 225 | 226 | NSString *applicationPath = [self.archive absoluteApplicationPath]; 227 | NSString *embededProvision = [applicationPath stringByAppendingPathComponent:@"embedded.mobileprovision"]; 228 | Provisioning *embed = [[Provisioning alloc] initWithPath:embededProvision]; 229 | SigningIdentity *identity = [embed.signingIdentities firstObject]; 230 | if (!identity) return; 231 | 232 | for (NSInteger index = 0; index < self.popupButton.numberOfItems; index++) { 233 | NSMenuItem *item = [self.popupButton itemAtIndex:index]; 234 | SigningIdentity *itemSigning = item.representedObject; 235 | if (!itemSigning) continue; 236 | 237 | if ([identity.commonName isEqualTo:itemSigning.commonName]) { 238 | [self.popupButton selectItemAtIndex:index]; 239 | break; 240 | } 241 | } 242 | } 243 | @end 244 | -------------------------------------------------------------------------------- /IPAExporter/ExportWindowController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 83 | 93 | 94 | 95 | 96 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "Icon_16x16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "Icon_16x16@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "Icon_32x32-1.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "Icon_32x32@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "Icon_128x128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "Icon_128x128@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "Icon_256x256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "Icon_256x256@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "Icon_512x512-1.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "Icon_512x512@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_128x128.png -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_128x128@2x.png -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_16x16.png -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_16x16@2x.png -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_256x256.png -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_256x256@2x.png -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_32x32-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_32x32-1.png -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_32x32@2x.png -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_512x512-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_512x512-1.png -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/IPAExporter/Images.xcassets/AppIcon.appiconset/Icon_512x512@2x.png -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/Warning.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "warning@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /IPAExporter/Images.xcassets/Warning.imageset/warning@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/IPAExporter/Images.xcassets/Warning.imageset/warning@2x.png -------------------------------------------------------------------------------- /IPAExporter/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | IPA Exporter 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | paraoh.$(PRODUCT_NAME:rfc1034identifier) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | $(PRODUCT_NAME) 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.1 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 2 27 | LSMinimumSystemVersion 28 | $(MACOSX_DEPLOYMENT_TARGET) 29 | NSHumanReadableCopyright 30 | Copyright © 2014 Pharaoh. All rights reserved. 31 | NSMainNibFile 32 | MainMenu 33 | NSPrincipalClass 34 | NSApplication 35 | 36 | 37 | -------------------------------------------------------------------------------- /IPAExporter/NSDate+Relative.h: -------------------------------------------------------------------------------- 1 | // 2 | // DateHelper.h 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/11/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDate(Relative) 12 | - (NSString *)relativeTime; 13 | + (NSString *)relativeTime:(NSDate *)aDate; 14 | @end 15 | -------------------------------------------------------------------------------- /IPAExporter/NSDate+Relative.m: -------------------------------------------------------------------------------- 1 | // 2 | // DateHelper.m 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/11/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import "NSDate+Relative.h" 10 | 11 | @implementation NSDate(Relative) 12 | - (NSString *)relativeTime { 13 | return [[self class] relativeTime:self]; 14 | } 15 | + (NSString *)relativeTime:(NSDate *)aDate { 16 | static dispatch_once_t onceToken; 17 | static NSDateFormatter *todayFormatter; 18 | static NSDateFormatter *yesterdayFormatter; 19 | static NSDateFormatter *weekFormatter; 20 | static NSDateFormatter *monthFormatter; 21 | static NSDateFormatter *yearFormatter; 22 | dispatch_once(&onceToken, ^{ 23 | todayFormatter = [NSDateFormatter new]; 24 | todayFormatter.dateFormat = @"h:mm a"; 25 | 26 | yesterdayFormatter = [NSDateFormatter new]; 27 | yesterdayFormatter.dateFormat = @"'Yesterday at' h:mm a"; 28 | 29 | weekFormatter = [NSDateFormatter new]; 30 | weekFormatter.dateFormat = @"EEEE 'at' h:mm a"; 31 | 32 | monthFormatter = [NSDateFormatter new]; 33 | monthFormatter.dateFormat = @"MMM dd 'at' h:mm a"; 34 | 35 | yearFormatter = [NSDateFormatter new]; 36 | yearFormatter.dateFormat = @"MMM dd yyyy"; 37 | }); 38 | 39 | 40 | NSCalendar *calendar = [NSCalendar currentCalendar]; 41 | unsigned int unitFlags = NSYearCalendarUnit|NSMonthCalendarUnit|NSWeekCalendarUnit|NSWeekdayOrdinalCalendarUnit|NSWeekdayCalendarUnit|NSDayCalendarUnit|NSHourCalendarUnit|NSMinuteCalendarUnit; 42 | NSDateComponents *messageDateComponents = [calendar components:unitFlags fromDate:aDate]; 43 | NSDateComponents *todayDateComponents = [calendar components:unitFlags fromDate:[NSDate date]]; 44 | 45 | NSUInteger dayOfYearForMessage = [calendar ordinalityOfUnit:NSDayCalendarUnit inUnit:NSYearCalendarUnit forDate:aDate]; 46 | NSUInteger dayOfYearForToday = [calendar ordinalityOfUnit:NSDayCalendarUnit inUnit:NSYearCalendarUnit forDate:[NSDate date]]; 47 | 48 | 49 | NSString *dateString; 50 | //Same day 51 | if ([messageDateComponents year] == [todayDateComponents year] && 52 | [messageDateComponents month] == [todayDateComponents month] && 53 | [messageDateComponents day] == [todayDateComponents day]) 54 | { 55 | dateString = [todayFormatter stringFromDate:aDate]; 56 | } else if ([messageDateComponents year] == [todayDateComponents year] && 57 | dayOfYearForMessage == (dayOfYearForToday-1)) 58 | { 59 | dateString = [yesterdayFormatter stringFromDate:aDate]; 60 | } else if ([messageDateComponents year] == [todayDateComponents year] && 61 | dayOfYearForMessage > (dayOfYearForToday-6)) 62 | { 63 | dateString = [weekFormatter stringFromDate:aDate]; 64 | 65 | } else if ([messageDateComponents year] == [todayDateComponents year]) { 66 | dateString = [monthFormatter stringFromDate:aDate]; 67 | } else { 68 | dateString = [yearFormatter stringFromDate:aDate]; 69 | } 70 | 71 | return dateString; 72 | } 73 | @end 74 | -------------------------------------------------------------------------------- /IPAExporter/Provisioning.h: -------------------------------------------------------------------------------- 1 | // 2 | // Provisioning.h 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/10/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "SigningIdentity.h" 12 | 13 | @interface Provisioning : NSObject 14 | 15 | @property (nonatomic, strong) NSString *path; 16 | @property (nonatomic, strong) NSString *name; 17 | @property (nonatomic, strong) NSDate *creationDate; 18 | @property (nonatomic, strong) NSDate *expirationDate; 19 | @property (nonatomic, strong) NSString *applicationIdentifier; 20 | @property (nonatomic, strong) NSArray *provisionedDevices; 21 | @property (nonatomic, strong) NSArray *developerCertificates; 22 | @property (nonatomic, strong) NSArray *signingIdentities; 23 | - (instancetype)initWithPath:(NSString *)path; 24 | 25 | - (BOOL)isExpired; 26 | @end 27 | -------------------------------------------------------------------------------- /IPAExporter/Provisioning.m: -------------------------------------------------------------------------------- 1 | // 2 | // Provisioning.m 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/10/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import "Provisioning.h" 10 | #import "SigningIdentity.h" 11 | 12 | @implementation Provisioning 13 | - (instancetype)initWithPath:(NSString *)path { 14 | self = [super init]; 15 | if (self) { 16 | self.path = path; 17 | [self _readProvisioningData]; 18 | } 19 | return self; 20 | } 21 | - (void)_readProvisioningData { 22 | NSData *fileData = [NSData dataWithContentsOfFile:self.path]; 23 | if (!fileData) return; 24 | 25 | // Insert code here to initialize your application 26 | CMSDecoderRef decoder = NULL; 27 | CMSDecoderCreate(&decoder); 28 | CMSDecoderUpdateMessage(decoder, fileData.bytes, fileData.length); 29 | CMSDecoderFinalizeMessage(decoder); 30 | 31 | CFDataRef dataRef = NULL; 32 | CMSDecoderCopyContent(decoder, &dataRef); 33 | NSData *data = (NSData *)CFBridgingRelease(dataRef); 34 | 35 | NSDictionary *propertyList = [NSPropertyListSerialization propertyListWithData:data options:0 format:NULL error:NULL]; 36 | 37 | self.name = propertyList[@"Name"]; 38 | self.expirationDate = propertyList[@"ExpirationDate"]; 39 | self.creationDate = propertyList[@"CreationDate"]; 40 | self.provisionedDevices = propertyList[@"ProvisionedDevices"]; 41 | 42 | NSDictionary *Entitlements = propertyList[@"Entitlements"]; 43 | self.applicationIdentifier = Entitlements[@"application-identifier"]; 44 | //Remove team id in app id 45 | NSString *appIDPrefix = [propertyList[@"ApplicationIdentifierPrefix"] firstObject]; 46 | if ([self.applicationIdentifier hasPrefix:appIDPrefix]) { 47 | self.applicationIdentifier = [self.applicationIdentifier substringFromIndex:appIDPrefix.length + 1]; 48 | } 49 | self.developerCertificates = propertyList[@"DeveloperCertificates"]; 50 | 51 | [self _loadSigningIdentities]; 52 | } 53 | - (void)_loadSigningIdentities { 54 | NSMutableArray *result = [NSMutableArray array]; 55 | for (NSData *certData in self.developerCertificates) { 56 | SigningIdentity *identity = [[SigningIdentity alloc] initWithProvision:self certificateData:certData]; 57 | [result addObject:identity]; 58 | } 59 | self.signingIdentities = result; 60 | } 61 | - (BOOL)isExpired { 62 | return [[NSDate date] compare:self.expirationDate] == NSOrderedDescending; 63 | } 64 | @end 65 | -------------------------------------------------------------------------------- /IPAExporter/SigningIdentity.h: -------------------------------------------------------------------------------- 1 | // 2 | // SigningIdentity.h 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/11/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class Provisioning; 12 | @interface SigningIdentity : NSObject 13 | @property (nonatomic, strong) NSString *commonName; 14 | @property (nonatomic, weak) Provisioning *provision; 15 | @property (nonatomic, strong, readonly) NSData *certificateData; 16 | - (instancetype)initWithProvision:(Provisioning *)provision certificateData:(NSData *)certificateData; 17 | /* Return only valid keychains certificate from Keychains */ 18 | + (NSArray *)keychainsIdenities; 19 | @end 20 | -------------------------------------------------------------------------------- /IPAExporter/SigningIdentity.m: -------------------------------------------------------------------------------- 1 | // 2 | // SigningIdentity.m 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/11/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import "SigningIdentity.h" 10 | #import "Provisioning.h" 11 | #import 12 | 13 | @interface SigningIdentity() 14 | 15 | @end 16 | @implementation SigningIdentity 17 | - (instancetype)initWithProvision:(Provisioning *)provision certificateData:(NSData *)certificateData { 18 | self = [super init]; 19 | if (self) { 20 | self.provision = provision; 21 | _certificateData = certificateData; 22 | [self _loadCertData]; 23 | } 24 | return self; 25 | } 26 | - (void)_loadCertData { 27 | SecCertificateRef certRef = SecCertificateCreateWithData(kCFAllocatorDefault, (__bridge CFDataRef)(self.certificateData)); 28 | CFStringRef commonName; 29 | SecCertificateCopyCommonName(certRef, &commonName); 30 | self.commonName = CFBridgingRelease(commonName); 31 | CFRelease(certRef); 32 | } 33 | 34 | + (NSArray *)keychainsIdenities { 35 | NSMutableArray *keychainsIdentities = [NSMutableArray array]; 36 | 37 | NSMutableDictionary *query = [NSMutableDictionary dictionaryWithObjectsAndKeys: 38 | (__bridge id)kCFBooleanTrue, (__bridge id)kSecReturnRef, 39 | (__bridge id)kSecMatchLimitAll, (__bridge id)kSecMatchLimit, 40 | kCFNull, kSecMatchValidOnDate, 41 | @"iPhone", kSecMatchSubjectStartsWith, 42 | nil]; 43 | 44 | NSArray *secItemClasses = [NSArray arrayWithObjects: 45 | // (__bridge id)kSecClassGenericPassword, 46 | // (__bridge id)kSecClassInternetPassword, 47 | // (__bridge id)kSecClassCertificate, 48 | // (__bridge id)kSecClassKey, 49 | (__bridge id)kSecClassIdentity, 50 | nil]; 51 | 52 | for (id secItemClass in secItemClasses) { 53 | [query setObject:secItemClass forKey:(__bridge id)kSecClass]; 54 | 55 | CFTypeRef result = NULL; 56 | SecItemCopyMatching((__bridge CFDictionaryRef)query, &result); 57 | 58 | if (result) { 59 | NSArray *identityArray = (__bridge NSArray *)(result); 60 | for (id obj in identityArray) { 61 | SecIdentityRef identityRef = (__bridge SecIdentityRef)(obj); 62 | SecCertificateRef certKeychains = NULL; 63 | SecIdentityCopyCertificate(identityRef, &certKeychains); 64 | if (certKeychains != NULL) { 65 | NSData *keychainCertData = (NSData *)CFBridgingRelease(SecCertificateCopyData(certKeychains)); 66 | SigningIdentity *si = [[SigningIdentity alloc] initWithProvision:nil certificateData:keychainCertData]; 67 | if ([si.commonName hasPrefix:@"iPhone Developer"] || [si.commonName hasPrefix:@"iPhone Distribution"]) { 68 | [keychainsIdentities addObject:si]; 69 | } 70 | CFRelease(certKeychains); 71 | } 72 | } 73 | } 74 | 75 | 76 | if (result != NULL) CFRelease(result); 77 | } 78 | return keychainsIdentities; 79 | } 80 | @end 81 | 82 | 83 | // NSURL *URL = [NSURL fileURLWithPath:@"/Users/Tue/Desktop/LOCFOOD_Merchant_DEV.mobileprovision"]; 84 | // 85 | // NSData *fileData = nil; 86 | // 87 | // fileData = [NSData dataWithContentsOfURL:URL]; 88 | // 89 | // // Insert code here to initialize your application 90 | // CMSDecoderRef decoder = NULL; 91 | // CMSDecoderCreate(&decoder); 92 | // CMSDecoderUpdateMessage(decoder, fileData.bytes, fileData.length); 93 | // CMSDecoderFinalizeMessage(decoder); 94 | // CFDataRef dataRef = NULL; 95 | // CMSDecoderCopyContent(decoder, &dataRef); 96 | // NSData *data = (NSData *)CFBridgingRelease(dataRef); 97 | // 98 | // NSDictionary *propertyList = [NSPropertyListSerialization propertyListWithData:data options:0 format:NULL error:NULL]; 99 | // NSData *certData = [propertyList[@"DeveloperCertificates"] firstObject]; 100 | // SecCertificateRef certRef = SecCertificateCreateWithData(kCFAllocatorDefault, (__bridge CFDataRef)(certData)); 101 | // NSData *serialFromProvisioning = (__bridge NSData *)(SecCertificateCopySerialNumber(certRef, NULL)); 102 | // NSLog(@"%@", propertyList); 103 | // 104 | // NSMutableDictionary *query = [NSMutableDictionary dictionaryWithObjectsAndKeys: 105 | // (__bridge id)kCFBooleanTrue, (__bridge id)kSecReturnRef, 106 | // (__bridge id)kSecMatchLimitAll, (__bridge id)kSecMatchLimit, 107 | // nil]; 108 | // 109 | // NSArray *secItemClasses = [NSArray arrayWithObjects: 110 | //// (__bridge id)kSecClassGenericPassword, 111 | //// (__bridge id)kSecClassInternetPassword, 112 | //// (__bridge id)kSecClassCertificate, 113 | //// (__bridge id)kSecClassKey, 114 | // (__bridge id)kSecClassIdentity, 115 | // nil]; 116 | // 117 | // for (id secItemClass in secItemClasses) { 118 | // [query setObject:secItemClass forKey:(__bridge id)kSecClass]; 119 | // 120 | // CFTypeRef result = NULL; 121 | // SecItemCopyMatching((__bridge CFDictionaryRef)query, &result); 122 | // 123 | // if (result) { 124 | // NSArray *identityArray = (__bridge NSArray *)(result); 125 | // for (id obj in identityArray) { 126 | // SecIdentityRef identityRef = (__bridge SecIdentityRef)(obj); 127 | // SecCertificateRef certKeychains = NULL; 128 | // SecIdentityCopyCertificate(identityRef, &certKeychains); 129 | // NSData *keychainCertData = (__bridge NSData *)(SecCertificateCopyData(certKeychains)); 130 | // BOOL isEqual = [keychainCertData isEqualToData:certData]; 131 | // NSLog(@"%d", isEqual); 132 | // } 133 | // } 134 | // 135 | // NSLog(@"%@", (__bridge id)result); 136 | // 137 | // if (result != NULL) CFRelease(result); 138 | // } -------------------------------------------------------------------------------- /IPAExporter/TableAppCellView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TableAppCellView.h 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/11/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TableAppCellView : NSTableCellView 12 | @property (nonatomic, weak) IBOutlet NSTextField *creationLabel; 13 | @end 14 | -------------------------------------------------------------------------------- /IPAExporter/TableAppCellView.m: -------------------------------------------------------------------------------- 1 | // 2 | // TableAppCellView.m 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/11/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import "TableAppCellView.h" 10 | 11 | @implementation TableAppCellView 12 | - (void) setBackgroundStyle:(NSBackgroundStyle)backgroundStyle 13 | { 14 | [super setBackgroundStyle:backgroundStyle]; 15 | 16 | NSTableRowView *row = (NSTableRowView*)self.superview; 17 | if (row.isSelected) { 18 | self.creationLabel.textColor = [NSColor alternateSelectedControlTextColor]; 19 | } else { 20 | self.creationLabel.textColor = [NSColor grayColor]; 21 | } 22 | 23 | } 24 | @end 25 | -------------------------------------------------------------------------------- /IPAExporter/XcodeArchive.h: -------------------------------------------------------------------------------- 1 | // 2 | // XcodeArchive.h 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/11/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface XcodeArchive : NSObject 12 | @property (nonatomic, strong) NSString *path; 13 | @property (nonatomic, strong) NSString *name; 14 | @property (nonatomic, strong) NSString *bundleID; 15 | @property (nonatomic, strong) NSDate *creationDate; 16 | @property (nonatomic, strong) NSString *version; 17 | @property (nonatomic, strong) NSArray *iconPaths; 18 | @property (nonatomic, assign) BOOL isValidArchive; 19 | @property (nonatomic, assign) BOOL isIOSArchive; 20 | 21 | @property (nonatomic, strong) NSImage *applicationIcon; 22 | @property (nonatomic, strong) NSString *applicationName; 23 | @property (nonatomic, strong) NSString *absoluteApplicationPath; 24 | - (instancetype)initWithPath:(NSString *)path; 25 | @end 26 | -------------------------------------------------------------------------------- /IPAExporter/XcodeArchive.m: -------------------------------------------------------------------------------- 1 | // 2 | // XcodeArchive.m 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/11/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import "XcodeArchive.h" 10 | #import 11 | @interface XcodeArchive() 12 | @property (nonatomic, strong) NSString *applicationPath; 13 | @end 14 | @implementation XcodeArchive 15 | - (instancetype)initWithPath:(NSString *)path { 16 | self = [super init]; 17 | if (self) { 18 | self.path = path; 19 | [self _loadArchiveInfo]; 20 | } 21 | return self; 22 | } 23 | - (void)_loadArchiveInfo { 24 | NSString *archivePlist = [self.path stringByAppendingPathComponent:@"Info.plist"]; 25 | NSDictionary *infoDictionary = [NSDictionary dictionaryWithContentsOfFile:archivePlist]; 26 | if (infoDictionary) { 27 | 28 | 29 | self.name = infoDictionary[@"Name"]; 30 | self.creationDate = infoDictionary[@"CreationDate"]; 31 | NSDictionary *applicationProperties = infoDictionary[@"ApplicationProperties"]; 32 | self.applicationPath = applicationProperties[@"ApplicationPath"]; 33 | 34 | self.bundleID = applicationProperties[@"CFBundleIdentifier"]; 35 | self.version = applicationProperties[@"CFBundleVersion"]; 36 | self.iconPaths = applicationProperties[@"IconPaths"]; 37 | self.isValidArchive = YES; 38 | 39 | [self _readApplicationInfo]; 40 | [self _findBestIcons]; 41 | } else { 42 | self.isValidArchive = NO; 43 | } 44 | } 45 | - (void)_readApplicationInfo { 46 | NSString *productsPath = [self.path stringByAppendingPathComponent:@"Products"]; 47 | self.absoluteApplicationPath = [productsPath stringByAppendingPathComponent:self.applicationPath]; 48 | NSString *applicationInfoPath = [self.absoluteApplicationPath stringByAppendingPathComponent:@"Info.plist"]; 49 | NSDictionary *appInfo = [NSDictionary dictionaryWithContentsOfFile:applicationInfoPath]; 50 | self.applicationName = appInfo[@"CFBundleDisplayName"]; 51 | 52 | if (!self.applicationName) { 53 | self.applicationName = appInfo[@"CFBundleName"]; 54 | } 55 | 56 | if ([appInfo[@"DTPlatformName"] isEqualTo:@"iphoneos"]) { 57 | self.isIOSArchive = YES; 58 | } else { 59 | self.isIOSArchive = NO; 60 | } 61 | } 62 | - (void)_findBestIcons { 63 | NSString *productsPath = [self.path stringByAppendingPathComponent:@"Products"]; 64 | NSImage *bestImage = nil; 65 | for (NSString *iconSubPath in self.iconPaths) { 66 | NSString *iconPath = [productsPath stringByAppendingPathComponent:iconSubPath]; 67 | 68 | NSImage *image = [[NSImage alloc] initWithContentsOfFile:iconPath]; 69 | if (!bestImage) bestImage = image; 70 | else if (bestImage.size.width < image.size.width) { 71 | bestImage = image; 72 | } 73 | } 74 | self.applicationIcon = bestImage; 75 | } 76 | @end 77 | -------------------------------------------------------------------------------- /IPAExporter/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // IPAExporter 4 | // 5 | // Created by Tue Nguyen on 10/10/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /IPAExporterTests/IPAExporterTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // IPAExporterTests.m 3 | // IPAExporterTests 4 | // 5 | // Created by Tue Nguyen on 10/10/14. 6 | // Copyright (c) 2014 HOME. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface IPAExporterTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation IPAExporterTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /IPAExporterTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | paraoh.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /IPAExporterWorkspace.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /IPAExporterWorkspace.xcworkspace/xcshareddata/IPAExporter.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 0627F59D-7016-441A-AB72-7B1D1CB7E118 9 | IDESourceControlProjectName 10 | IPAExporter 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 14 | https://github.com/tue-savvy/IPAExporter.git 15 | 16 | IDESourceControlProjectPath 17 | IPAExporter.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/tue-savvy/IPAExporter.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 36 | IDESourceControlWCCName 37 | IPAExporter 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /IPAExporterWorkspace.xcworkspace/xcshareddata/IPAExporterWorkspace.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | FD09820A-0ABF-45A0-96DC-1E7B57B7B677 9 | IDESourceControlProjectName 10 | IPAExporterWorkspace 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 14 | https://github.com/tue-savvy/IPAExporter.git 15 | 16 | IDESourceControlProjectPath 17 | IPAExporterWorkspace.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 21 | .. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/tue-savvy/IPAExporter.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 36 | IDESourceControlWCCName 37 | IPAExporter 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /IPAExporterWorkspace.xcworkspace/xcuserdata/Tue.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Pharaoh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | IPA Exporter 2 | ================ 3 | 4 | NOTE: On Mac OSX 10.10. If you cannot export IPA file. Please try to add this into Build Settings: 5 | 6 | **Code Signing Resource Rule Path**: $(SDKROOT)/ResourceRules.plist 7 | 8 | New version 1.1 include: 9 | - Improve Keychains Identities matching 10 | - Support Xcode 6 Plug-In for Quick Access the application. 11 | 12 | Version 1.0: 13 | - Initial version support export / sign IPA from Xcode archive. 14 | 15 | The Mac Application used to export IPA from Xcode Archive. This app require Xcode command line tools is installed. 16 | 17 | ![Screen Shot](/Screenshot/1.png?raw=true "Main Screen") 18 | 19 | ![Screen Shot](/Screenshot/2.png?raw=true "Exporting Screen") 20 | 21 | The MIT License (MIT) 22 | ================ 23 | 24 | Copyright (c) 2014 Pharaoh 25 | 26 | Permission is hereby granted, free of charge, to any person obtaining a copy 27 | of this software and associated documentation files (the "Software"), to deal 28 | in the Software without restriction, including without limitation the rights 29 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 30 | copies of the Software, and to permit persons to whom the Software is 31 | furnished to do so, subject to the following conditions: 32 | 33 | The above copyright notice and this permission notice shall be included in all 34 | copies or substantial portions of the Software. 35 | 36 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 37 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 38 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 39 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 40 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 41 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 42 | SOFTWARE. 43 | -------------------------------------------------------------------------------- /Screenshot/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/Screenshot/1.png -------------------------------------------------------------------------------- /Screenshot/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tue-savvy/IPAExporter/cae4f35138086b452a478e5c8c56469fa5dd65b3/Screenshot/2.png -------------------------------------------------------------------------------- /XcodePlugin/IPAExporterPlugIn.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8162556119EF6594002E5E85 /* Export.sh in Resources */ = {isa = PBXBuildFile; fileRef = 8162556019EF6594002E5E85 /* Export.sh */; }; 11 | 81D2A1E219EF31630006F5D2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81D2A1E119EF31630006F5D2 /* AppKit.framework */; }; 12 | 81D2A1E419EF31630006F5D2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81D2A1E319EF31630006F5D2 /* Foundation.framework */; }; 13 | 81D2A1EC19EF31630006F5D2 /* IPAExporterPlugIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D2A1EB19EF31630006F5D2 /* IPAExporterPlugIn.m */; }; 14 | 81D2A20619EF3B8C0006F5D2 /* ArchiveWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D2A20119EF3B8C0006F5D2 /* ArchiveWindowController.m */; }; 15 | 81D2A20719EF3B8C0006F5D2 /* ArchiveWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 81D2A20219EF3B8C0006F5D2 /* ArchiveWindowController.xib */; }; 16 | 81D2A20819EF3B8C0006F5D2 /* ExportWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D2A20419EF3B8C0006F5D2 /* ExportWindowController.m */; }; 17 | 81D2A20919EF3B8C0006F5D2 /* ExportWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 81D2A20519EF3B8C0006F5D2 /* ExportWindowController.xib */; }; 18 | 81D2A21219EF3B9D0006F5D2 /* Provisioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D2A20C19EF3B9D0006F5D2 /* Provisioning.m */; }; 19 | 81D2A21319EF3B9D0006F5D2 /* SigningIdentity.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D2A20E19EF3B9D0006F5D2 /* SigningIdentity.m */; }; 20 | 81D2A21419EF3B9D0006F5D2 /* XcodeArchive.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D2A21019EF3B9D0006F5D2 /* XcodeArchive.m */; }; 21 | 81D2A21A19EF3BA20006F5D2 /* DirectoryWatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D2A21619EF3BA20006F5D2 /* DirectoryWatcher.m */; }; 22 | 81D2A21B19EF3BA20006F5D2 /* NSDate+Relative.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D2A21819EF3BA20006F5D2 /* NSDate+Relative.m */; }; 23 | 81D2A21E19EF3D740006F5D2 /* TableAppCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D2A21D19EF3D740006F5D2 /* TableAppCellView.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | 8162556019EF6594002E5E85 /* Export.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = Export.sh; path = ../../IPAExporter/Export.sh; sourceTree = ""; }; 28 | 81D2A1DE19EF31630006F5D2 /* IPAExporterPlugIn.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IPAExporterPlugIn.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | 81D2A1E119EF31630006F5D2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 30 | 81D2A1E319EF31630006F5D2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 31 | 81D2A1E719EF31630006F5D2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 81D2A1E819EF31630006F5D2 /* IPAExporterPlugIn.xcscheme */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = IPAExporterPlugIn.xcscheme; path = IPAExporterPlugIn.xcodeproj/xcshareddata/xcschemes/IPAExporterPlugIn.xcscheme; sourceTree = SOURCE_ROOT; }; 33 | 81D2A1EA19EF31630006F5D2 /* IPAExporterPlugIn.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IPAExporterPlugIn.h; sourceTree = ""; }; 34 | 81D2A1EB19EF31630006F5D2 /* IPAExporterPlugIn.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IPAExporterPlugIn.m; sourceTree = ""; }; 35 | 81D2A20019EF3B8C0006F5D2 /* ArchiveWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ArchiveWindowController.h; path = ../../IPAExporter/ArchiveWindowController.h; sourceTree = ""; }; 36 | 81D2A20119EF3B8C0006F5D2 /* ArchiveWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ArchiveWindowController.m; path = ../../IPAExporter/ArchiveWindowController.m; sourceTree = ""; }; 37 | 81D2A20219EF3B8C0006F5D2 /* ArchiveWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ArchiveWindowController.xib; path = ../../IPAExporter/ArchiveWindowController.xib; sourceTree = ""; }; 38 | 81D2A20319EF3B8C0006F5D2 /* ExportWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExportWindowController.h; path = ../../IPAExporter/ExportWindowController.h; sourceTree = ""; }; 39 | 81D2A20419EF3B8C0006F5D2 /* ExportWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ExportWindowController.m; path = ../../IPAExporter/ExportWindowController.m; sourceTree = ""; }; 40 | 81D2A20519EF3B8C0006F5D2 /* ExportWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ExportWindowController.xib; path = ../../IPAExporter/ExportWindowController.xib; sourceTree = ""; }; 41 | 81D2A20B19EF3B9D0006F5D2 /* Provisioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Provisioning.h; sourceTree = ""; }; 42 | 81D2A20C19EF3B9D0006F5D2 /* Provisioning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Provisioning.m; sourceTree = ""; }; 43 | 81D2A20D19EF3B9D0006F5D2 /* SigningIdentity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SigningIdentity.h; sourceTree = ""; }; 44 | 81D2A20E19EF3B9D0006F5D2 /* SigningIdentity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SigningIdentity.m; sourceTree = ""; }; 45 | 81D2A20F19EF3B9D0006F5D2 /* XcodeArchive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeArchive.h; sourceTree = ""; }; 46 | 81D2A21019EF3B9D0006F5D2 /* XcodeArchive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XcodeArchive.m; sourceTree = ""; }; 47 | 81D2A21519EF3BA20006F5D2 /* DirectoryWatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectoryWatcher.h; sourceTree = ""; }; 48 | 81D2A21619EF3BA20006F5D2 /* DirectoryWatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DirectoryWatcher.m; sourceTree = ""; }; 49 | 81D2A21719EF3BA20006F5D2 /* NSDate+Relative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+Relative.h"; sourceTree = ""; }; 50 | 81D2A21819EF3BA20006F5D2 /* NSDate+Relative.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+Relative.m"; sourceTree = ""; }; 51 | 81D2A21C19EF3D740006F5D2 /* TableAppCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TableAppCellView.h; path = ../../IPAExporter/TableAppCellView.h; sourceTree = ""; }; 52 | 81D2A21D19EF3D740006F5D2 /* TableAppCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TableAppCellView.m; path = ../../IPAExporter/TableAppCellView.m; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 81D2A1DC19EF31630006F5D2 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 81D2A1E219EF31630006F5D2 /* AppKit.framework in Frameworks */, 61 | 81D2A1E419EF31630006F5D2 /* Foundation.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | /* End PBXFrameworksBuildPhase section */ 66 | 67 | /* Begin PBXGroup section */ 68 | 81D2A1D519EF31630006F5D2 = { 69 | isa = PBXGroup; 70 | children = ( 71 | 81D2A1E519EF31630006F5D2 /* IPAExporterPlugIn */, 72 | 81D2A1E019EF31630006F5D2 /* Frameworks */, 73 | 81D2A1DF19EF31630006F5D2 /* Products */, 74 | ); 75 | sourceTree = ""; 76 | }; 77 | 81D2A1DF19EF31630006F5D2 /* Products */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 81D2A1DE19EF31630006F5D2 /* IPAExporterPlugIn.xcplugin */, 81 | ); 82 | name = Products; 83 | sourceTree = ""; 84 | }; 85 | 81D2A1E019EF31630006F5D2 /* Frameworks */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 81D2A1E119EF31630006F5D2 /* AppKit.framework */, 89 | 81D2A1E319EF31630006F5D2 /* Foundation.framework */, 90 | ); 91 | name = Frameworks; 92 | sourceTree = ""; 93 | }; 94 | 81D2A1E519EF31630006F5D2 /* IPAExporterPlugIn */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 81D2A1EA19EF31630006F5D2 /* IPAExporterPlugIn.h */, 98 | 81D2A1EB19EF31630006F5D2 /* IPAExporterPlugIn.m */, 99 | 81D2A21919EF3BA20006F5D2 /* Common */, 100 | 81D2A21119EF3B9D0006F5D2 /* Models */, 101 | 81D2A20A19EF3B930006F5D2 /* UI */, 102 | 81D2A1E619EF31630006F5D2 /* Supporting Files */, 103 | ); 104 | path = IPAExporterPlugIn; 105 | sourceTree = ""; 106 | }; 107 | 81D2A1E619EF31630006F5D2 /* Supporting Files */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 8162556019EF6594002E5E85 /* Export.sh */, 111 | 81D2A1E719EF31630006F5D2 /* Info.plist */, 112 | 81D2A1E819EF31630006F5D2 /* IPAExporterPlugIn.xcscheme */, 113 | ); 114 | name = "Supporting Files"; 115 | sourceTree = ""; 116 | }; 117 | 81D2A20A19EF3B930006F5D2 /* UI */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 81D2A20019EF3B8C0006F5D2 /* ArchiveWindowController.h */, 121 | 81D2A20119EF3B8C0006F5D2 /* ArchiveWindowController.m */, 122 | 81D2A20219EF3B8C0006F5D2 /* ArchiveWindowController.xib */, 123 | 81D2A20319EF3B8C0006F5D2 /* ExportWindowController.h */, 124 | 81D2A20419EF3B8C0006F5D2 /* ExportWindowController.m */, 125 | 81D2A20519EF3B8C0006F5D2 /* ExportWindowController.xib */, 126 | 81D2A21C19EF3D740006F5D2 /* TableAppCellView.h */, 127 | 81D2A21D19EF3D740006F5D2 /* TableAppCellView.m */, 128 | ); 129 | name = UI; 130 | sourceTree = ""; 131 | }; 132 | 81D2A21119EF3B9D0006F5D2 /* Models */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 81D2A20B19EF3B9D0006F5D2 /* Provisioning.h */, 136 | 81D2A20C19EF3B9D0006F5D2 /* Provisioning.m */, 137 | 81D2A20D19EF3B9D0006F5D2 /* SigningIdentity.h */, 138 | 81D2A20E19EF3B9D0006F5D2 /* SigningIdentity.m */, 139 | 81D2A20F19EF3B9D0006F5D2 /* XcodeArchive.h */, 140 | 81D2A21019EF3B9D0006F5D2 /* XcodeArchive.m */, 141 | ); 142 | name = Models; 143 | path = ../../IPAExporter; 144 | sourceTree = ""; 145 | }; 146 | 81D2A21919EF3BA20006F5D2 /* Common */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 81D2A21519EF3BA20006F5D2 /* DirectoryWatcher.h */, 150 | 81D2A21619EF3BA20006F5D2 /* DirectoryWatcher.m */, 151 | 81D2A21719EF3BA20006F5D2 /* NSDate+Relative.h */, 152 | 81D2A21819EF3BA20006F5D2 /* NSDate+Relative.m */, 153 | ); 154 | name = Common; 155 | path = ../../IPAExporter; 156 | sourceTree = ""; 157 | }; 158 | /* End PBXGroup section */ 159 | 160 | /* Begin PBXNativeTarget section */ 161 | 81D2A1DD19EF31630006F5D2 /* IPAExporterPlugIn */ = { 162 | isa = PBXNativeTarget; 163 | buildConfigurationList = 81D2A1EF19EF31630006F5D2 /* Build configuration list for PBXNativeTarget "IPAExporterPlugIn" */; 164 | buildPhases = ( 165 | 81D2A1DA19EF31630006F5D2 /* Sources */, 166 | 81D2A1DB19EF31630006F5D2 /* Resources */, 167 | 81D2A1DC19EF31630006F5D2 /* Frameworks */, 168 | ); 169 | buildRules = ( 170 | ); 171 | dependencies = ( 172 | ); 173 | name = IPAExporterPlugIn; 174 | productName = IPAExporterPlugIn; 175 | productReference = 81D2A1DE19EF31630006F5D2 /* IPAExporterPlugIn.xcplugin */; 176 | productType = "com.apple.product-type.bundle"; 177 | }; 178 | /* End PBXNativeTarget section */ 179 | 180 | /* Begin PBXProject section */ 181 | 81D2A1D619EF31630006F5D2 /* Project object */ = { 182 | isa = PBXProject; 183 | attributes = { 184 | LastUpgradeCheck = 0600; 185 | ORGANIZATIONNAME = Pharaoh; 186 | TargetAttributes = { 187 | 81D2A1DD19EF31630006F5D2 = { 188 | CreatedOnToolsVersion = 6.0; 189 | }; 190 | }; 191 | }; 192 | buildConfigurationList = 81D2A1D919EF31630006F5D2 /* Build configuration list for PBXProject "IPAExporterPlugIn" */; 193 | compatibilityVersion = "Xcode 3.2"; 194 | developmentRegion = English; 195 | hasScannedForEncodings = 0; 196 | knownRegions = ( 197 | en, 198 | ); 199 | mainGroup = 81D2A1D519EF31630006F5D2; 200 | productRefGroup = 81D2A1DF19EF31630006F5D2 /* Products */; 201 | projectDirPath = ""; 202 | projectRoot = ""; 203 | targets = ( 204 | 81D2A1DD19EF31630006F5D2 /* IPAExporterPlugIn */, 205 | ); 206 | }; 207 | /* End PBXProject section */ 208 | 209 | /* Begin PBXResourcesBuildPhase section */ 210 | 81D2A1DB19EF31630006F5D2 /* Resources */ = { 211 | isa = PBXResourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | 81D2A20919EF3B8C0006F5D2 /* ExportWindowController.xib in Resources */, 215 | 81D2A20719EF3B8C0006F5D2 /* ArchiveWindowController.xib in Resources */, 216 | 8162556119EF6594002E5E85 /* Export.sh in Resources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXResourcesBuildPhase section */ 221 | 222 | /* Begin PBXSourcesBuildPhase section */ 223 | 81D2A1DA19EF31630006F5D2 /* Sources */ = { 224 | isa = PBXSourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | 81D2A21219EF3B9D0006F5D2 /* Provisioning.m in Sources */, 228 | 81D2A20619EF3B8C0006F5D2 /* ArchiveWindowController.m in Sources */, 229 | 81D2A21B19EF3BA20006F5D2 /* NSDate+Relative.m in Sources */, 230 | 81D2A21419EF3B9D0006F5D2 /* XcodeArchive.m in Sources */, 231 | 81D2A20819EF3B8C0006F5D2 /* ExportWindowController.m in Sources */, 232 | 81D2A21319EF3B9D0006F5D2 /* SigningIdentity.m in Sources */, 233 | 81D2A21A19EF3BA20006F5D2 /* DirectoryWatcher.m in Sources */, 234 | 81D2A1EC19EF31630006F5D2 /* IPAExporterPlugIn.m in Sources */, 235 | 81D2A21E19EF3D740006F5D2 /* TableAppCellView.m in Sources */, 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | }; 239 | /* End PBXSourcesBuildPhase section */ 240 | 241 | /* Begin XCBuildConfiguration section */ 242 | 81D2A1ED19EF31630006F5D2 /* Debug */ = { 243 | isa = XCBuildConfiguration; 244 | buildSettings = { 245 | ALWAYS_SEARCH_USER_PATHS = NO; 246 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 247 | CLANG_CXX_LIBRARY = "libc++"; 248 | CLANG_ENABLE_MODULES = YES; 249 | CLANG_ENABLE_OBJC_ARC = YES; 250 | CLANG_WARN_BOOL_CONVERSION = YES; 251 | CLANG_WARN_CONSTANT_CONVERSION = YES; 252 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 253 | CLANG_WARN_EMPTY_BODY = YES; 254 | CLANG_WARN_ENUM_CONVERSION = YES; 255 | CLANG_WARN_INT_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_UNREACHABLE_CODE = YES; 258 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 259 | COPY_PHASE_STRIP = NO; 260 | ENABLE_STRICT_OBJC_MSGSEND = YES; 261 | GCC_C_LANGUAGE_STANDARD = gnu99; 262 | GCC_DYNAMIC_NO_PIC = NO; 263 | GCC_OPTIMIZATION_LEVEL = 0; 264 | GCC_PREPROCESSOR_DEFINITIONS = ( 265 | "DEBUG=1", 266 | "$(inherited)", 267 | ); 268 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | MTL_ENABLE_DEBUG_INFO = YES; 276 | ONLY_ACTIVE_ARCH = YES; 277 | }; 278 | name = Debug; 279 | }; 280 | 81D2A1EE19EF31630006F5D2 /* Release */ = { 281 | isa = XCBuildConfiguration; 282 | buildSettings = { 283 | ALWAYS_SEARCH_USER_PATHS = NO; 284 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 285 | CLANG_CXX_LIBRARY = "libc++"; 286 | CLANG_ENABLE_MODULES = YES; 287 | CLANG_ENABLE_OBJC_ARC = YES; 288 | CLANG_WARN_BOOL_CONVERSION = YES; 289 | CLANG_WARN_CONSTANT_CONVERSION = YES; 290 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 291 | CLANG_WARN_EMPTY_BODY = YES; 292 | CLANG_WARN_ENUM_CONVERSION = YES; 293 | CLANG_WARN_INT_CONVERSION = YES; 294 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 295 | CLANG_WARN_UNREACHABLE_CODE = YES; 296 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 297 | COPY_PHASE_STRIP = YES; 298 | ENABLE_NS_ASSERTIONS = NO; 299 | ENABLE_STRICT_OBJC_MSGSEND = YES; 300 | GCC_C_LANGUAGE_STANDARD = gnu99; 301 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 302 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 303 | GCC_WARN_UNDECLARED_SELECTOR = YES; 304 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 305 | GCC_WARN_UNUSED_FUNCTION = YES; 306 | GCC_WARN_UNUSED_VARIABLE = YES; 307 | MTL_ENABLE_DEBUG_INFO = NO; 308 | }; 309 | name = Release; 310 | }; 311 | 81D2A1F019EF31630006F5D2 /* Debug */ = { 312 | isa = XCBuildConfiguration; 313 | buildSettings = { 314 | COMBINE_HIDPI_IMAGES = YES; 315 | DEPLOYMENT_LOCATION = YES; 316 | DSTROOT = "$(HOME)"; 317 | INFOPLIST_FILE = IPAExporterPlugIn/Info.plist; 318 | INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; 319 | MACOSX_DEPLOYMENT_TARGET = 10.8; 320 | PRODUCT_NAME = "$(TARGET_NAME)"; 321 | WRAPPER_EXTENSION = xcplugin; 322 | }; 323 | name = Debug; 324 | }; 325 | 81D2A1F119EF31630006F5D2 /* Release */ = { 326 | isa = XCBuildConfiguration; 327 | buildSettings = { 328 | COMBINE_HIDPI_IMAGES = YES; 329 | DEPLOYMENT_LOCATION = YES; 330 | DSTROOT = "$(HOME)"; 331 | INFOPLIST_FILE = IPAExporterPlugIn/Info.plist; 332 | INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; 333 | MACOSX_DEPLOYMENT_TARGET = 10.8; 334 | PRODUCT_NAME = "$(TARGET_NAME)"; 335 | WRAPPER_EXTENSION = xcplugin; 336 | }; 337 | name = Release; 338 | }; 339 | /* End XCBuildConfiguration section */ 340 | 341 | /* Begin XCConfigurationList section */ 342 | 81D2A1D919EF31630006F5D2 /* Build configuration list for PBXProject "IPAExporterPlugIn" */ = { 343 | isa = XCConfigurationList; 344 | buildConfigurations = ( 345 | 81D2A1ED19EF31630006F5D2 /* Debug */, 346 | 81D2A1EE19EF31630006F5D2 /* Release */, 347 | ); 348 | defaultConfigurationIsVisible = 0; 349 | defaultConfigurationName = Release; 350 | }; 351 | 81D2A1EF19EF31630006F5D2 /* Build configuration list for PBXNativeTarget "IPAExporterPlugIn" */ = { 352 | isa = XCConfigurationList; 353 | buildConfigurations = ( 354 | 81D2A1F019EF31630006F5D2 /* Debug */, 355 | 81D2A1F119EF31630006F5D2 /* Release */, 356 | ); 357 | defaultConfigurationIsVisible = 0; 358 | defaultConfigurationName = Release; 359 | }; 360 | /* End XCConfigurationList section */ 361 | }; 362 | rootObject = 81D2A1D619EF31630006F5D2 /* Project object */; 363 | } 364 | -------------------------------------------------------------------------------- /XcodePlugin/IPAExporterPlugIn.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /XcodePlugin/IPAExporterPlugIn.xcodeproj/project.xcworkspace/xcshareddata/IPAExporterPlugIn.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 9C51F224-2133-4DF5-BD9C-77F94B3591AB 9 | IDESourceControlProjectName 10 | IPAExporterPlugIn 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 14 | https://github.com/tue-savvy/IPAExporter.git 15 | 16 | IDESourceControlProjectPath 17 | XcodePlugin/IPAExporterPlugIn.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/tue-savvy/IPAExporter.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 15B9983E03CE2400A617C7170DDFBD401DDC98B1 36 | IDESourceControlWCCName 37 | IPAExporter 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /XcodePlugin/IPAExporterPlugIn.xcodeproj/xcshareddata/xcschemes/IPAExporterPlugIn.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 46 | 47 | 58 | 60 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /XcodePlugin/IPAExporterPlugIn.xcodeproj/xcuserdata/Tue.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /XcodePlugin/IPAExporterPlugIn.xcodeproj/xcuserdata/Tue.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SuppressBuildableAutocreation 6 | 7 | 81D2A1DD19EF31630006F5D2 8 | 9 | primary 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /XcodePlugin/IPAExporterPlugIn/IPAExporterPlugIn.h: -------------------------------------------------------------------------------- 1 | // 2 | // IPAExporterPlugIn.h 3 | // IPAExporterPlugIn 4 | // 5 | // Created by Tue Nguyen on 10/16/14. 6 | // Copyright (c) 2014 Pharaoh. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface IPAExporterPlugIn : NSObject 12 | 13 | + (instancetype)sharedPlugin; 14 | 15 | @property (nonatomic, strong, readonly) NSBundle* bundle; 16 | @end -------------------------------------------------------------------------------- /XcodePlugin/IPAExporterPlugIn/IPAExporterPlugIn.m: -------------------------------------------------------------------------------- 1 | // 2 | // IPAExporterPlugIn.m 3 | // IPAExporterPlugIn 4 | // 5 | // Created by Tue Nguyen on 10/16/14. 6 | // Copyright (c) 2014 Pharaoh. All rights reserved. 7 | // 8 | 9 | #import "IPAExporterPlugIn.h" 10 | #import "ArchiveWindowController.h" 11 | 12 | static IPAExporterPlugIn *sharedPlugin; 13 | 14 | @interface IPAExporterPlugIn() 15 | @property (nonatomic, strong) ArchiveWindowController *archiveController; 16 | @property (nonatomic, strong, readwrite) NSBundle *bundle; 17 | @end 18 | 19 | @implementation IPAExporterPlugIn 20 | 21 | + (void)pluginDidLoad:(NSBundle *)plugin 22 | { 23 | static dispatch_once_t onceToken; 24 | NSString *currentApplicationName = [[NSBundle mainBundle] infoDictionary][@"CFBundleName"]; 25 | if ([currentApplicationName isEqual:@"Xcode"]) { 26 | dispatch_once(&onceToken, ^{ 27 | sharedPlugin = [[self alloc] initWithBundle:plugin]; 28 | }); 29 | } 30 | } 31 | 32 | + (instancetype)sharedPlugin 33 | { 34 | return sharedPlugin; 35 | } 36 | 37 | - (id)initWithBundle:(NSBundle *)plugin 38 | { 39 | if (self = [super init]) { 40 | NSLog(@"Bundle: %@", plugin.bundleURL); 41 | // reference to plugin's bundle, for resource access 42 | self.bundle = plugin; 43 | // Create menu items, initialize UI, etc. 44 | 45 | // Sample Menu Item: 46 | NSMenuItem *menuItem = [[NSApp mainMenu] itemWithTitle:@"Window"]; 47 | if (menuItem) { 48 | [[menuItem submenu] addItem:[NSMenuItem separatorItem]]; 49 | NSInteger organizerIndex = [[menuItem submenu] indexOfItemWithTitle:@"Organizer"]; 50 | NSMenuItem *actionMenuItem = [[NSMenuItem alloc] initWithTitle:@"Export IPA" action:@selector(doMenuAction) keyEquivalent:@"8"]; 51 | actionMenuItem.keyEquivalentModifierMask = NSCommandKeyMask | NSShiftKeyMask; 52 | [actionMenuItem setTarget:self]; 53 | [[menuItem submenu] insertItem:actionMenuItem atIndex:organizerIndex + 1]; 54 | } 55 | } 56 | return self; 57 | } 58 | 59 | // Sample Action, for menu item: 60 | - (void)doMenuAction 61 | { 62 | if (!self.archiveController) { 63 | self.archiveController = [[ArchiveWindowController alloc] initWithWindowNibName:@"ArchiveWindowController"]; 64 | self.archiveController.plugInBundle = self.bundle; 65 | } 66 | 67 | [self.archiveController.window makeKeyAndOrderFront:self]; 68 | } 69 | 70 | - (void)dealloc 71 | { 72 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /XcodePlugin/IPAExporterPlugIn/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | paraoh.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | DVTPlugInCompatibilityUUIDs 26 | 27 | C4A681B0-4A26-480E-93EC-1218098B9AA0 28 | AD68E85B-441B-4301-B564-A45E4919A6AD 29 | 30 | LSMinimumSystemVersion 31 | $(MACOSX_DEPLOYMENT_TARGET) 32 | NSPrincipalClass 33 | IPAExporterPlugIn 34 | XC4Compatible 35 | 36 | XCPluginHasUI 37 | 38 | 39 | 40 | --------------------------------------------------------------------------------