Permalink
Browse files

Import a fresh cocoa touch static library xcode project.

  • Loading branch information...
1 parent 08b7105 commit 145e6ba970e1ba6ac49561df94d5176eb71467b9 @alloy alloy committed Sep 11, 2011
View
1 lib/cocoa_pods.rb
@@ -8,4 +8,5 @@ module Pod
autoload :Spec, 'cocoa_pods/specification'
autoload :Specification, 'cocoa_pods/specification'
autoload :Version, 'cocoa_pods/version'
+ autoload :XcodeProject, 'cocoa_pods/xcode_project'
end
View
8 lib/cocoa_pods/specification.rb
@@ -126,9 +126,9 @@ def create_static_library!
source_files.concat(Dir.glob(pattern.to_s))
end
end
- #p source_files
- load_paths = source_files.map { |file| File.dirname(file) }.uniq
- #p load_paths
+
+ project = XcodeProject.static_library
+ project.source_files = source_files
end
include Config::Mixin
@@ -150,7 +150,7 @@ def install!
# In case this spec is part of another pod's source, we need to dowload
# the other pod's source.
- (spart_of_specification || self).download_if_necessary!
+ (part_of_specification || self).download_if_necessary!
end
def download_if_necessary!
View
22 lib/cocoa_pods/xcode_project.rb
@@ -0,0 +1,22 @@
+framework 'Foundation'
+
+module Pod
+ class XcodeProject
+ TEMPLATES_DIR = Pathname.new(File.expand_path('../../../xcode-project-templates', __FILE__))
+
+ # TODO see if we really need different templates for iOS and OS X
+ def self.static_library
+ new TEMPLATES_DIR + 'cocoa-touch-static-library.pbxproj'
+ end
+
+ def initialize(template)
+ @template = NSDictionary.dictionaryWithContentsOfFile(template.to_s)
+ p @template
+ end
+
+ def source_files=(files)
+ @source_files = files
+ @load_paths = files.map { |file| File.dirname(file) }.uniq
+ end
+ end
+end
View
228 xcode-project-templates/cocoa-touch-static-library/Pods.xcodeproj/project.pbxproj
@@ -0,0 +1,228 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 515B0F8E141D3E3A001DC3E6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 515B0F8D141D3E3A001DC3E6 /* Foundation.framework */; };
+ 515B0F94141D3E3A001DC3E6 /* Pods.m in Sources */ = {isa = PBXBuildFile; fileRef = 515B0F93141D3E3A001DC3E6 /* Pods.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 515B0F8A141D3E3A001DC3E6 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 515B0F8D141D3E3A001DC3E6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 515B0F91141D3E3A001DC3E6 /* Pods-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Pods-Prefix.pch"; sourceTree = "<group>"; };
+ 515B0F92141D3E3A001DC3E6 /* Pods.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Pods.h; sourceTree = "<group>"; };
+ 515B0F93141D3E3A001DC3E6 /* Pods.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Pods.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 515B0F87141D3E3A001DC3E6 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 515B0F8E141D3E3A001DC3E6 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 515B0F7F141D3E3A001DC3E6 = {
+ isa = PBXGroup;
+ children = (
+ 515B0F8F141D3E3A001DC3E6 /* Pods */,
+ 515B0F8C141D3E3A001DC3E6 /* Frameworks */,
+ 515B0F8B141D3E3A001DC3E6 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 515B0F8B141D3E3A001DC3E6 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 515B0F8A141D3E3A001DC3E6 /* libPods.a */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 515B0F8C141D3E3A001DC3E6 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 515B0F8D141D3E3A001DC3E6 /* Foundation.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 515B0F8F141D3E3A001DC3E6 /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ 515B0F92141D3E3A001DC3E6 /* Pods.h */,
+ 515B0F93141D3E3A001DC3E6 /* Pods.m */,
+ 515B0F90141D3E3A001DC3E6 /* Supporting Files */,
+ );
+ path = Pods;
+ sourceTree = "<group>";
+ };
+ 515B0F90141D3E3A001DC3E6 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 515B0F91141D3E3A001DC3E6 /* Pods-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 515B0F88141D3E3A001DC3E6 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 515B0F89141D3E3A001DC3E6 /* Pods */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 515B0F97141D3E3A001DC3E6 /* Build configuration list for PBXNativeTarget "Pods" */;
+ buildPhases = (
+ 515B0F86141D3E3A001DC3E6 /* Sources */,
+ 515B0F87141D3E3A001DC3E6 /* Frameworks */,
+ 515B0F88141D3E3A001DC3E6 /* Headers */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Pods;
+ productName = Pods;
+ productReference = 515B0F8A141D3E3A001DC3E6 /* libPods.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 515B0F81141D3E3A001DC3E6 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 515B0F84141D3E3A001DC3E6 /* Build configuration list for PBXProject "Pods" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 515B0F7F141D3E3A001DC3E6;
+ productRefGroup = 515B0F8B141D3E3A001DC3E6 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 515B0F89141D3E3A001DC3E6 /* Pods */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 515B0F86141D3E3A001DC3E6 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 515B0F94141D3E3A001DC3E6 /* Pods.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 515B0F95141D3E3A001DC3E6 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ 515B0F96141D3E3A001DC3E6 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 515B0F98141D3E3A001DC3E6 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DSTROOT = /tmp/Pods.dst;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "Pods/Pods-Prefix.pch";
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ 515B0F99141D3E3A001DC3E6 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DSTROOT = /tmp/Pods.dst;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "Pods/Pods-Prefix.pch";
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 515B0F84141D3E3A001DC3E6 /* Build configuration list for PBXProject "Pods" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 515B0F95141D3E3A001DC3E6 /* Debug */,
+ 515B0F96141D3E3A001DC3E6 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 515B0F97141D3E3A001DC3E6 /* Build configuration list for PBXNativeTarget "Pods" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 515B0F98141D3E3A001DC3E6 /* Debug */,
+ 515B0F99141D3E3A001DC3E6 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 515B0F81141D3E3A001DC3E6 /* Project object */;
+}
View
7 xcode-project-templates/cocoa-touch-static-library/Pods/Pods-Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'Pods' target in the 'Pods' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+#endif
View
13 xcode-project-templates/cocoa-touch-static-library/Pods/Pods.h
@@ -0,0 +1,13 @@
+//
+// Pods.h
+// Pods
+//
+// Created by Eloy Duran on 11-09-11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface Pods : NSObject
+
+@end
View
23 xcode-project-templates/cocoa-touch-static-library/Pods/Pods.m
@@ -0,0 +1,23 @@
+//
+// Pods.m
+// Pods
+//
+// Created by Eloy Duran on 11-09-11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "Pods.h"
+
+@implementation Pods
+
+- (id)init
+{
+ self = [super init];
+ if (self) {
+ // Initialization code here.
+ }
+
+ return self;
+}
+
+@end

0 comments on commit 145e6ba

Please sign in to comment.