Commit d1c6f442 authored by Eloy Duran's avatar Eloy Duran

Allow a user to define a post install hook in the Podfile, which allows her to…

Allow a user to define a post install hook in the Podfile, which allows her to customize the generated Xcode project. Closes #56.

Add MacRubySample to the rake build_examples task, now that it can
specify that it needs garbage collection support.
parent cf662d16
......@@ -81,7 +81,7 @@ task :build_examples do
require 'pathname'
examples = Pathname.new(File.expand_path('../examples', __FILE__))
examples.entries.each do |example|
next if %w{ . .. ConfigureTest MacRubySample }.include?(example.basename.to_s)
next if %w{ . .. }.include?(example.basename.to_s)
example = examples + example
next unless example.directory?
puts "Building example: #{example}"
......@@ -91,6 +91,7 @@ task :build_examples do
sh "../../bin/pod install --verbose"
command = "xcodebuild -workspace '#{example.basename}.xcworkspace' -scheme '#{example.basename}'"
if (example + 'Podfile').read.include?('platform :ios')
# Specifically build against the simulator SDK so we don't have to deal with code signing.
command << " -sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk"
end
sh command
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>archiveVersion</key>
<string>1</string>
<key>classes</key>
<dict/>
<key>objectVersion</key>
<string>46</string>
<key>objects</key>
<dict>
<key>1FCB00F9333B4E83B1FEBF70</key>
<dict>
<key>fileRef</key>
<string>F08D5ACC836446268BF48194</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>516164A7145623DE0045B749</key>
<dict>
<key>children</key>
<array>
<string>516164BC145623DF0045B749</string>
<string>516164B5145623DE0045B749</string>
<string>516164B3145623DE0045B749</string>
<string>C3E4C0061587490794951548</string>
<string>F08D5ACC836446268BF48194</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164A9145623DE0045B749</key>
<dict>
<key>attributes</key>
<dict>
<key>LastUpgradeCheck</key>
<string>0420</string>
</dict>
<key>buildConfigurationList</key>
<string>516164AC145623DE0045B749</string>
<key>compatibilityVersion</key>
<string>Xcode 3.2</string>
<key>developmentRegion</key>
<string>English</string>
<key>hasScannedForEncodings</key>
<string>0</string>
<key>isa</key>
<string>PBXProject</string>
<key>knownRegions</key>
<array>
<string>en</string>
</array>
<key>mainGroup</key>
<string>516164A7145623DE0045B749</string>
<key>productRefGroup</key>
<string>516164B3145623DE0045B749</string>
<key>projectDirPath</key>
<string></string>
<key>projectRoot</key>
<string></string>
<key>targets</key>
<array>
<string>516164B1145623DE0045B749</string>
</array>
</dict>
<key>516164AC145623DE0045B749</key>
<dict>
<key>buildConfigurations</key>
<array>
<string>516164CE145623DF0045B749</string>
<string>516164CF145623DF0045B749</string>
</array>
<key>defaultConfigurationIsVisible</key>
<string>0</string>
<key>defaultConfigurationName</key>
<string>Release</string>
<key>isa</key>
<string>XCConfigurationList</string>
</dict>
<key>516164AE145623DE0045B749</key>
<dict>
<key>buildActionMask</key>
<string>2147483647</string>
<key>files</key>
<array>
<string>516164C3145623DF0045B749</string>
<string>516164CA145623DF0045B749</string>
</array>
<key>isa</key>
<string>PBXSourcesBuildPhase</string>
<key>runOnlyForDeploymentPostprocessing</key>
<string>0</string>
</dict>
<key>516164AF145623DE0045B749</key>
<dict>
<key>buildActionMask</key>
<string>2147483647</string>
<key>files</key>
<array>
<string>516164B7145623DE0045B749</string>
<string>1FCB00F9333B4E83B1FEBF70</string>
</array>
<key>isa</key>
<string>PBXFrameworksBuildPhase</string>
<key>runOnlyForDeploymentPostprocessing</key>
<string>0</string>
</dict>
<key>516164B0145623DE0045B749</key>
<dict>
<key>buildActionMask</key>
<string>2147483647</string>
<key>files</key>
<array>
<string>516164C1145623DF0045B749</string>
<string>516164C7145623DF0045B749</string>
<string>516164CD145623DF0045B749</string>
</array>
<key>isa</key>
<string>PBXResourcesBuildPhase</string>
<key>runOnlyForDeploymentPostprocessing</key>
<string>0</string>
</dict>
<key>516164B1145623DE0045B749</key>
<dict>
<key>buildConfigurationList</key>
<string>516164D0145623DF0045B749</string>
<key>buildPhases</key>
<array>
<string>516164AE145623DE0045B749</string>
<string>516164AF145623DE0045B749</string>
<string>516164B0145623DE0045B749</string>
</array>
<key>buildRules</key>
<array/>
<key>dependencies</key>
<array/>
<key>isa</key>
<string>PBXNativeTarget</string>
<key>name</key>
<string>ConfigureTest</string>
<key>productName</key>
<string>ConfigureTest</string>
<key>productReference</key>
<string>516164B2145623DE0045B749</string>
<key>productType</key>
<string>com.apple.product-type.application</string>
</dict>
<key>516164B2145623DE0045B749</key>
<dict>
<key>explicitFileType</key>
<string>wrapper.application</string>
<key>includeInIndex</key>
<string>0</string>
<key>isa</key>
<string>PBXFileReference</string>
<key>name</key>
<string>ConfigureTest.app</string>
<key>path</key>
<string>ConfigureTest.app</string>
<key>sourceTree</key>
<string>BUILT_PRODUCTS_DIR</string>
</dict>
<key>516164B3145623DE0045B749</key>
<dict>
<key>children</key>
<array>
<string>516164B2145623DE0045B749</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
<key>name</key>
<string>Products</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164B5145623DE0045B749</key>
<dict>
<key>children</key>
<array>
<string>516164B6145623DE0045B749</string>
<string>516164B8145623DE0045B749</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
<key>name</key>
<string>Frameworks</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164B6145623DE0045B749</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>wrapper.framework</string>
<key>name</key>
<string>Cocoa.framework</string>
<key>path</key>
<string>System/Library/Frameworks/Cocoa.framework</string>
<key>sourceTree</key>
<string>SDKROOT</string>
</dict>
<key>516164B7145623DE0045B749</key>
<dict>
<key>fileRef</key>
<string>516164B6145623DE0045B749</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>516164B8145623DE0045B749</key>
<dict>
<key>children</key>
<array>
<string>516164B9145623DF0045B749</string>
<string>516164BA145623DF0045B749</string>
<string>516164BB145623DF0045B749</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
<key>name</key>
<string>Other Frameworks</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164B9145623DF0045B749</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>wrapper.framework</string>
<key>name</key>
<string>AppKit.framework</string>
<key>path</key>
<string>System/Library/Frameworks/AppKit.framework</string>
<key>sourceTree</key>
<string>SDKROOT</string>
</dict>
<key>516164BA145623DF0045B749</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>wrapper.framework</string>
<key>name</key>
<string>CoreData.framework</string>
<key>path</key>
<string>System/Library/Frameworks/CoreData.framework</string>
<key>sourceTree</key>
<string>SDKROOT</string>
</dict>
<key>516164BB145623DF0045B749</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>wrapper.framework</string>
<key>name</key>
<string>Foundation.framework</string>
<key>path</key>
<string>System/Library/Frameworks/Foundation.framework</string>
<key>sourceTree</key>
<string>SDKROOT</string>
</dict>
<key>516164BC145623DF0045B749</key>
<dict>
<key>children</key>
<array>
<string>516164C8145623DF0045B749</string>
<string>516164C9145623DF0045B749</string>
<string>516164CB145623DF0045B749</string>
<string>516164BD145623DF0045B749</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
<key>path</key>
<string>ConfigureTest</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164BD145623DF0045B749</key>
<dict>
<key>children</key>
<array>
<string>516164BE145623DF0045B749</string>
<string>516164BF145623DF0045B749</string>
<string>516164C2145623DF0045B749</string>
<string>516164C4145623DF0045B749</string>
<string>516164C5145623DF0045B749</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
<key>name</key>
<string>Supporting Files</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164BE145623DF0045B749</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>text.plist.xml</string>
<key>name</key>
<string>ConfigureTest-Info.plist</string>
<key>path</key>
<string>ConfigureTest-Info.plist</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164BF145623DF0045B749</key>
<dict>
<key>children</key>
<array>
<string>516164C0145623DF0045B749</string>
</array>
<key>isa</key>
<string>PBXVariantGroup</string>
<key>name</key>
<string>InfoPlist.strings</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164C0145623DF0045B749</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>text.plist.strings</string>
<key>name</key>
<string>en</string>
<key>path</key>
<string>en.lproj/InfoPlist.strings</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164C1145623DF0045B749</key>
<dict>
<key>fileRef</key>
<string>516164BF145623DF0045B749</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>516164C2145623DF0045B749</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>sourcecode.c.objc</string>
<key>name</key>
<string>main.m</string>
<key>path</key>
<string>main.m</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164C3145623DF0045B749</key>
<dict>
<key>fileRef</key>
<string>516164C2145623DF0045B749</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>516164C4145623DF0045B749</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>sourcecode.c.h</string>
<key>name</key>
<string>ConfigureTest-Prefix.pch</string>
<key>path</key>
<string>ConfigureTest-Prefix.pch</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164C5145623DF0045B749</key>
<dict>
<key>children</key>
<array>
<string>516164C6145623DF0045B749</string>
</array>
<key>isa</key>
<string>PBXVariantGroup</string>
<key>name</key>
<string>Credits.rtf</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164C6145623DF0045B749</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>text.rtf</string>
<key>name</key>
<string>en</string>
<key>path</key>
<string>en.lproj/Credits.rtf</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164C7145623DF0045B749</key>
<dict>
<key>fileRef</key>
<string>516164C5145623DF0045B749</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>516164C8145623DF0045B749</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>sourcecode.c.h</string>
<key>name</key>
<string>AppDelegate.h</string>
<key>path</key>
<string>AppDelegate.h</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164C9145623DF0045B749</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>sourcecode.c.objc</string>
<key>name</key>
<string>AppDelegate.m</string>
<key>path</key>
<string>AppDelegate.m</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164CA145623DF0045B749</key>
<dict>
<key>fileRef</key>
<string>516164C9145623DF0045B749</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>516164CB145623DF0045B749</key>
<dict>
<key>children</key>
<array>
<string>516164CC145623DF0045B749</string>
</array>
<key>isa</key>
<string>PBXVariantGroup</string>
<key>name</key>
<string>MainMenu.xib</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164CC145623DF0045B749</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>file.xib</string>
<key>name</key>
<string>en</string>
<key>path</key>
<string>en.lproj/MainMenu.xib</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>516164CD145623DF0045B749</key>
<dict>
<key>fileRef</key>
<string>516164CB145623DF0045B749</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>516164CE145623DF0045B749</key>
<dict>
<key>buildSettings</key>
<dict>
<key>ALWAYS_SEARCH_USER_PATHS</key>
<string>NO</string>
<key>ARCHS</key>
<string>$(ARCHS_STANDARD_64_BIT)</string>
<key>COPY_PHASE_STRIP</key>
<string>NO</string>
<key>GCC_C_LANGUAGE_STANDARD</key>
<string>gnu99</string>
<key>GCC_DYNAMIC_NO_PIC</key>
<string>NO</string>
<key>GCC_ENABLE_OBJC_EXCEPTIONS</key>
<string>YES</string>
<key>GCC_OPTIMIZATION_LEVEL</key>
<string>0</string>
<key>GCC_PREPROCESSOR_DEFINITIONS</key>
<array>
<string>DEBUG=1</string>
<string>$(inherited)</string>
</array>
<key>GCC_SYMBOLS_PRIVATE_EXTERN</key>
<string>NO</string>
<key>GCC_VERSION</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>GCC_WARN_64_TO_32_BIT_CONVERSION</key>
<string>YES</string>
<key>GCC_WARN_ABOUT_MISSING_PROTOTYPES</key>
<string>YES</string>
<key>GCC_WARN_ABOUT_RETURN_TYPE</key>
<string>YES</string>
<key>GCC_WARN_UNUSED_VARIABLE</key>
<string>YES</string>
<key>MACOSX_DEPLOYMENT_TARGET</key>
<string>10.7</string>
<key>ONLY_ACTIVE_ARCH</key>
<string>YES</string>
<key>SDKROOT</key>
<string>macosx</string>
</dict>
<key>isa</key>
<string>XCBuildConfiguration</string>
<key>name</key>
<string>Debug</string>
</dict>
<key>516164CF145623DF0045B749</key>
<dict>
<key>buildSettings</key>
<dict>
<key>ALWAYS_SEARCH_USER_PATHS</key>
<string>NO</string>
<key>ARCHS</key>
<string>$(ARCHS_STANDARD_64_BIT)</string>
<key>COPY_PHASE_STRIP</key>
<string>YES</string>
<key>DEBUG_INFORMATION_FORMAT</key>
<string>dwarf-with-dsym</string>
<key>GCC_C_LANGUAGE_STANDARD</key>
<string>gnu99</string>
<key>GCC_ENABLE_OBJC_EXCEPTIONS</key>
<string>YES</string>
<key>GCC_VERSION</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>GCC_WARN_64_TO_32_BIT_CONVERSION</key>
<string>YES</string>
<key>GCC_WARN_ABOUT_MISSING_PROTOTYPES</key>
<string>YES</string>
<key>GCC_WARN_ABOUT_RETURN_TYPE</key>
<string>YES</string>
<key>GCC_WARN_UNUSED_VARIABLE</key>
<string>YES</string>
<key>MACOSX_DEPLOYMENT_TARGET</key>
<string>10.7</string>
<key>SDKROOT</key>
<string>macosx</string>
</dict>
<key>isa</key>
<string>XCBuildConfiguration</string>
<key>name</key>
<string>Release</string>
</dict>
<key>516164D0145623DF0045B749</key>
<dict>
<key>buildConfigurations</key>
<array>
<string>516164D1145623DF0045B749</string>
<string>516164D2145623DF0045B749</string>
</array>
<key>defaultConfigurationIsVisible</key>
<string>0</string>
<key>isa</key>
<string>XCConfigurationList</string>
</dict>
<key>516164D1145623DF0045B749</key>
<dict>
<key>baseConfigurationReference</key>
<string>C3E4C0061587490794951548</string>
<key>buildSettings</key>
<dict>
<key>GCC_PRECOMPILE_PREFIX_HEADER</key>
<string>YES</string>
<key>GCC_PREFIX_HEADER</key>
<string>ConfigureTest/ConfigureTest-Prefix.pch</string>
<key>INFOPLIST_FILE</key>
<string>ConfigureTest/ConfigureTest-Info.plist</string>
<key>PRODUCT_NAME</key>
<string>$(TARGET_NAME)</string>
<key>WRAPPER_EXTENSION</key>
<string>app</string>
</dict>
<key>isa</key>
<string>XCBuildConfiguration</string>
<key>name</key>
<string>Debug</string>
</dict>
<key>516164D2145623DF0045B749</key>
<dict>
<key>baseConfigurationReference</key>
<string>C3E4C0061587490794951548</string>
<key>buildSettings</key>
<dict>
<key>GCC_PRECOMPILE_PREFIX_HEADER</key>
<string>YES</string>
<key>GCC_PREFIX_HEADER</key>
<string>ConfigureTest/ConfigureTest-Prefix.pch</string>
<key>INFOPLIST_FILE</key>
<string>ConfigureTest/ConfigureTest-Info.plist</string>
<key>PRODUCT_NAME</key>
<string>$(TARGET_NAME)</string>
<key>WRAPPER_EXTENSION</key>
<string>app</string>
</dict>
<key>isa</key>
<string>XCBuildConfiguration</string>
<key>name</key>
<string>Release</string>
</dict>
<key>6786F1960A40426590889C9F</key>
<dict>
<key>fileRef</key>
<string>C3E4C0061587490794951548</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>C3E4C0061587490794951548</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>text.xcconfig</string>
<key>name</key>
<string>Pods.xcconfig</string>
<key>path</key>
<string>Pods/Pods.xcconfig</string>
<key>sourceTree</key>
<string>SOURCE_ROOT</string>
</dict>
<key>F08D5ACC836446268BF48194</key>
<dict>
<key>includeInIndex</key>
<string>0</string>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>archive.ar</string>
<key>name</key>
<string>libPods.a</string>
<key>path</key>
<string>libPods.a</string>
<key>sourceTree</key>
<string>BUILT_PRODUCTS_DIR</string>
</dict>
</dict>
<key>rootObject</key>
<string>516164A9145623DE0045B749</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Workspace version="1.0"><FileRef location="group:ConfigureTest.xcodeproj"></FileRef><FileRef location="group:Pods/Pods.xcodeproj"></FileRef></Workspace>
\ No newline at end of file
//
// AppDelegate.h
// ConfigureTest
//
// Created by Eloy Duran on 25-10-11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet NSWindow *window;
@end
//
// AppDelegate.m
// ConfigureTest
//
// Created by Eloy Duran on 25-10-11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "AppDelegate.h"
@implementation AppDelegate
@synthesize window = _window;
- (void)dealloc
{
[super dealloc];
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Insert code here to initialize your application
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2011 __MyCompanyName__. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
//
// Prefix header for all source files of the 'ConfigureTest' target in the 'ConfigureTest' project
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw9840\paperh8400
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f0\b\fs24 \cf0 Engineering:
\b0 \
Some people\
\
\b Human Interface Design:
\b0 \
Some other people\
\
\b Testing:
\b0 \
Hopefully not nobody\
\
\b Documentation:
\b0 \
Whoever\
\
\b With special thanks to:
\b0 \
Mom\
}
This source diff could not be displayed because it is too large. You can view the blob instead.
//
// main.m
// ConfigureTest
//
// Created by Eloy Duran on 25-10-11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
int main(int argc, char *argv[])
{
return NSApplicationMain(argc, (const char **)argv);
}
platform :osx
dependency 'JSONKit'
......@@ -190,7 +190,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "${SRCROOT}/Pods/PodsResources.sh";
shellScript = "${SRCROOT}/Pods/Pods-resources.sh";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
......
......@@ -9,6 +9,15 @@ target :debug do
dependency 'CocoaLumberjack'
end
target :test, :exclusive => true do
dependency 'Kiwi'
#target :test, :exclusive => true do
# dependency 'Kiwi'
#end
# Enable garbage collection support, which MacRuby requires.
post_install do |installer|
installer.project.targets.each do |target|
target.buildConfigurations.each do |config|
config.buildSettings['GCC_ENABLE_OBJC_GC'] = 'supported'
end
end
end
PODS:
- ASIHTTPRequest (1.8.1)
- CocoaLumberjack (1.2.1)
- Kiwi (1.0.0)
- SBJson (3.0.4)
DEPENDENCIES:
- ASIHTTPRequest
- CocoaLumberjack
- Kiwi
- SBJson
......@@ -196,23 +196,26 @@ EOS
def install!
puts "Installing dependencies of: #{@podfile.defined_in_file}" unless config.silent?
build_specifications.each(&:install!)
root = config.project_pods_root
puts "==> Generating Xcode project and xcconfig" unless config.silent?
puts "==> Generating support files" unless config.silent?
target_installers.each do |target_installer|
target_installer.install!
target_installer.create_files_in(root)
end
projpath = File.join(root, 'Pods.xcodeproj')
puts " * Writing Xcode project file to `#{projpath}'" if config.verbose?
project.save_as(projpath)
generate_lock_file!
# Post install hooks run last!
puts "==> Running post install hooks" unless config.silent?
# Post install hooks run _before_ saving of project, so that they can alter it before saving.
target_installers.each do |target_installer|
target_installer.build_specifications.each { |spec| spec.post_install(target_installer) }
end
@podfile.post_install!(self)
puts "==> Generating Xcode project" unless config.silent?
projpath = File.join(root, 'Pods.xcodeproj')
puts " * Writing Xcode project file to `#{projpath}'" if config.verbose?
project.save_as(projpath)
end
def generate_lock_file!
......
......@@ -135,16 +135,10 @@ module Pod
#
# For more info on the definition of a Pod::Specification see:
# https://github.com/CocoaPods/CocoaPods/wiki/A-pod-specification
#
#
def dependency(*name_and_version_requirements, &block)
@target_definition.target_dependencies << Dependency.new(*name_and_version_requirements, &block)
end
def dependencies
@target_definitions.values.map(&:target_dependencies).flatten
end
# Specifies that a BridgeSupport metadata should be generated from the
# headers of all installed Pods.
#
......@@ -154,8 +148,6 @@ module Pod
@generate_bridge_support = true
end
attr_reader :target_definitions
# Defines a new static library target and scopes dependencies defined from
# the given block. The target will by default include the dependencies
# defined outside of the block, unless the `:exclusive => true` option is
......@@ -190,23 +182,48 @@ module Pod
@target_definition = parent
end
# This is to be compatible with a Specification for use in the Installer and
# Resolver.
# This hook allows you to make any last changes to the generated Xcode project
# before it is written to disk, or any other tasks you might want to perform.
#
# For instance, say you'd want to customize the `OTHER_LDFLAGS` of all targets:
#
# post_install do |installer|
# installer.project.targets.each do |target|
# target.buildConfigurations.each do |config|
# config.buildSettings['GCC_ENABLE_OBJC_GC'] = 'supported'
# end
# end
# end
def post_install(&block)
@post_install_callback = block
end
# Not attributes
def podfile?
true
end
attr_accessor :defined_in_file
attr_reader :target_definitions
def generate_bridge_support?
@generate_bridge_support
def dependencies
@target_definitions.values.map(&:target_dependencies).flatten
end
def dependency_by_name(name)
dependencies.find { |d| d.name == name }
end
def generate_bridge_support?
@generate_bridge_support
end
def post_install!(installer)
@post_install_callback.call(installer) if @post_install_callback
end
def validate!
lines = []
lines << "* the `platform` attribute should be either `:osx` or `:ios`" unless [:osx, :ios].include?(@platform)
......
......@@ -121,6 +121,26 @@ else
FileUtils.cp_r(fixture('integration/.'), config.project_pods_root)
end
it "runs the optional post_install callback defined in the Podfile _before_ the project is saved to disk" do
podfile = Pod::Podfile.new do
config.rootspec = self
self.platform platform
post_install do |installer|
target = installer.project.targets.first
target.buildConfigurations.each do |config|
config.buildSettings['GCC_ENABLE_OBJC_GC'] = 'supported'
end
end
end
SpecHelper::Installer.new(podfile).install!
project = Xcodeproj::Project.new(config.project_pods_root + 'Pods.xcodeproj')
project.targets.first.buildConfigurations.map do |config|
config.buildSettings['GCC_ENABLE_OBJC_GC']
end.should == %w{ supported supported }
end
if false
# TODO add a simple source file which uses the compiled lib to check that it really really works
it "should activate required pods and create a working static library xcode project" do
spec = Pod::Podfile.new do
......@@ -308,3 +328,4 @@ else
end
end
end
......@@ -49,6 +49,16 @@ describe "Pod::Podfile" do
Pod::Podfile.new { generate_bridge_support! }.should.generate_bridge_support
end
it "stores a block that will be called with the Installer instance once installation is finished (but the project is not written to disk yet)" do
yielded = nil
Pod::Podfile.new do
post_install do |installer|
yielded = installer
end
end.post_install!(:an_installer)
yielded.should == :an_installer
end
describe "concerning targets (dependency groups)" do
before do
@podfile = Pod::Podfile.new do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment