Skip to content
Browse files

Make assigning the PBXProject#products= method work.

  • Loading branch information...
1 parent ffbb3b9 commit 9ee4b9b5538da13ed37071c7db22148fd1f811c7 @alloy committed Nov 6, 2011
Showing with 13 additions and 12 deletions.
  1. +11 −10 lib/cocoapods/project_template.rb
  2. +2 −2 lib/cocoapods/xcode/project.rb
View
21 lib/cocoapods/project_template.rb
@@ -63,31 +63,32 @@ def self.for_platform(platform)
'GCC_C_LANGUAGE_STANDARD' => 'gnu99',
'INSTALL_PATH' => "$(BUILT_PRODUCTS_DIR)",
'GCC_WARN_ABOUT_MISSING_PROTOTYPES' => 'YES',
- 'GCC_WARN_ABOUT_RETURN_TYPE' => 'YES',
- 'GCC_WARN_UNUSED_VARIABLE' => 'YES'
- },
- :debug => {
+ 'GCC_WARN_ABOUT_RETURN_TYPE' => 'YES',
+ 'GCC_WARN_UNUSED_VARIABLE' => 'YES'
+ },
+ :debug => {
'GCC_DYNAMIC_NO_PIC' => 'NO',
- 'GCC_PREPROCESSOR_DEFINITIONS' => ["DEBUG=1", "$(inherited)"],
- 'GCC_SYMBOLS_PRIVATE_EXTERN' => 'NO',
+ 'GCC_PREPROCESSOR_DEFINITIONS' => ["DEBUG=1", "$(inherited)"],
+ 'GCC_SYMBOLS_PRIVATE_EXTERN' => 'NO',
'GCC_OPTIMIZATION_LEVEL' => '0'
},
:ios => {
'ARCHS' => "$(ARCHS_STANDARD_32_BIT)",
- 'GCC_VERSION' => 'com.apple.compilers.llvmgcc42',
+ 'GCC_VERSION' => 'com.apple.compilers.llvmgcc42',
'IPHONEOS_DEPLOYMENT_TARGET' => '4.3',
'PUBLIC_HEADERS_FOLDER_PATH' => "$(TARGET_NAME)",
'SDKROOT' => 'iphoneos'
},
:osx => {
'ARCHS' => "$(ARCHS_STANDARD_64_BIT)",
- 'GCC_ENABLE_OBJC_EXCEPTIONS' => 'YES',
- 'GCC_WARN_64_TO_32_BIT_CONVERSION' => 'YES',
- 'GCC_VERSION' => 'com.apple.compilers.llvm.clang.1_0',
+ 'GCC_ENABLE_OBJC_EXCEPTIONS' => 'YES',
+ 'GCC_WARN_64_TO_32_BIT_CONVERSION' => 'YES',
+ 'GCC_VERSION' => 'com.apple.compilers.llvm.clang.1_0',
'MACOSX_DEPLOYMENT_TARGET' => '10.7',
'SDKROOT' => 'macosx'
}
}
+
def self.build_settings(platform, scheme)
settings = COMMON_BUILD_SETTINGS[:all].merge(COMMON_BUILD_SETTINGS[platform])
settings['COPY_PHASE_STRIP'] = scheme == :debug ? 'NO' : 'YES'
View
4 lib/cocoapods/xcode/project.rb
@@ -32,7 +32,7 @@ def inverse?
end
def singular_name
- @name.singularize
+ @options[:singular_name] || @name.singularize
end
def singular_getter
@@ -459,7 +459,7 @@ def initialize(*)
class PBXProject < PBXObject
has_many :targets, :class => PBXNativeTarget
- has_one :products, :uuid => :productRefGroup, :class => PBXGroup
+ has_one :products, :singular_name => :products, :uuid => :productRefGroup, :class => PBXGroup
end
class PBXObjectList

0 comments on commit 9ee4b9b

Please sign in to comment.
Something went wrong with that request. Please try again.