Pass the user build configurations to the Pods project #1294

Merged
merged 11 commits into from Aug 22, 2013

Projects

None yet

4 participants

@0xced
0xced commented Aug 15, 2013

This is related to #1217. If the user project has more that just the Debug and Release configurations then the STRIP_INSTALLED_PRODUCT = NO setting can not be applied at the project level since only the Debug and Release configurations are created at the project level.

If the user project has an App Store configuration, it must be specified in the Podfile like this so that all the configurations are created at the project level:

xcodeproj 'SampleProject', 'App Store' => :release, 'Debug' => :debug, 'Release' => :release
@coveralls

Coverage Status

Coverage remained the same when pulling fb8aa98 on 0xced/copy-user_project-build_configurations into 80b0dc9 on master.

@coveralls

Coverage Status

Coverage remained the same when pulling 719bac4 on 0xced/copy-user_project-build_configurations into 80b0dc9 on master.

@coveralls

Coverage Status

Coverage remained the same when pulling 8f5a57d on 0xced/copy-user_project-build_configurations into 80b0dc9 on master.

@coveralls

Coverage Status

Coverage remained the same when pulling 5c07f17 on 0xced/copy-user_project-build_configurations into 80b0dc9 on master.

@coveralls

Coverage Status

Coverage remained the same when pulling 5b30b39 on 0xced/copy-user_project-build_configurations into 80b0dc9 on master.

@alloy
Member
alloy commented Aug 16, 2013

Ok, with these last changes it should automatically pick up any configurations in your project(s). They will, however all be defined as :release, so if you want :debug you will have to explicitly specify it in your Podfile.

@coveralls

Coverage Status

Coverage remained the same when pulling 63c80b1 on 0xced/copy-user_project-build_configurations into 80b0dc9 on master.

@0xced

Shouldn’t we do @podfile.target_definitions['Pods'].build_configurations || analysis_result.all_user_build_configurations instead? If the user explicitly defines build configurations in the target, wouldn’t it be better to use that instead of the automatic discovery?

Member

all_user_build_configurations resolves both explicit and implicit configurations. In addition, just @podfile.target_definitions['Pods'] doesn’t necessarily include all configs that the user might have specified, but just those for the top level target definition of the Podfile.

@alloy
Member
alloy commented Aug 22, 2013

What’s the status on this? Have you tried it on your project(s)?

@0xced
0xced commented Aug 22, 2013

Everything seems alright, either by explicitly defining build configurations in the Podfile or with the automatic detection of build configurations.

@alloy
Member
alloy commented Aug 22, 2013

Awesome.

@alloy alloy merged commit 7fa9814 into master Aug 22, 2013

1 check passed

Details default The Travis CI build passed
@0xced 0xced deleted the 0xced/copy-user_project-build_configurations branch Aug 22, 2013
@0xced 0xced added a commit that referenced this pull request Aug 22, 2013
@0xced 0xced Update CHANGELOG for #1294 65e7a39
@fabiopelosin
Member

ah, this has been bitting me for a while! 🍻

Member

🍻

@fabiopelosin fabiopelosin added a commit that referenced this pull request Aug 22, 2013
@fabiopelosin fabiopelosin Merge branch 'master' into pod-init
* master:
  Update CHANGELOG for #1294
  [rake] Welcome to the real world, where envs don’t automagically work.
  [Installer] Add all the user's build configurations to the Pods project.
  [Analyzer] Resolve all user build configurations.
  Misc small changes.
  Rebuild integration specs.
  Update Xcodeproj to the latest master revision
  Use the build configurations from the Podfile for the Pods project
  Add test for STRIP_INSTALLED_PRODUCT = NO at project level
  Fix all callers of Pod::Project.new()
  Handle the build_configurations parameter in Xcodeproj::Project subclasses
  Pass the user build configurations to the Pods project
c95e3cf
@fabiopelosin fabiopelosin added a commit that referenced this pull request Aug 22, 2013
@fabiopelosin fabiopelosin Merge branch 'master' into sandbox_reorganization_544
* master: (46 commits)
  [Command::Init] Update specs for recent changes
  [Command::Init] Add dependencies of the normal targets inside the target block
  [Command::Init] Add note about the configuration files to the description
  Update CHANGELOG for #1294
  [rake] Welcome to the real world, where envs don’t automagically work.
  [Installer] Add all the user's build configurations to the Pods project.
  [Analyzer] Resolve all user build configurations.
  Misc small changes.
  Rebuild integration specs.
  Update Xcodeproj to the latest master revision
  Use the build configurations from the Podfile for the Pods project
  Add test for STRIP_INSTALLED_PRODUCT = NO at project level
  Fix all callers of Pod::Project.new()
  Handle the build_configurations parameter in Xcodeproj::Project subclasses
  Pass the user build configurations to the Pods project
  Add link to Gemfile regarding local repos.
  Add that this is the MIT license.
  [CONTRIBUTING] Update CocoaPods.
  [Xcodeproj] Use Pod::UI for warnings and messages
  [Changelog]
  ...

Conflicts:
	spec/cocoapods-integration-specs
e3cfdfd
@fabiopelosin fabiopelosin added a commit that referenced this pull request Aug 22, 2013
@fabiopelosin fabiopelosin Merge branch 'sandbox_reorganization_544' into refactor-target
* sandbox_reorganization_544: (46 commits)
  [Command::Init] Update specs for recent changes
  [Command::Init] Add dependencies of the normal targets inside the target block
  [Command::Init] Add note about the configuration files to the description
  Update CHANGELOG for #1294
  [rake] Welcome to the real world, where envs don’t automagically work.
  [Installer] Add all the user's build configurations to the Pods project.
  [Analyzer] Resolve all user build configurations.
  Misc small changes.
  Rebuild integration specs.
  Update Xcodeproj to the latest master revision
  Use the build configurations from the Podfile for the Pods project
  Add test for STRIP_INSTALLED_PRODUCT = NO at project level
  Fix all callers of Pod::Project.new()
  Handle the build_configurations parameter in Xcodeproj::Project subclasses
  Pass the user build configurations to the Pods project
  Add link to Gemfile regarding local repos.
  Add that this is the MIT license.
  [CONTRIBUTING] Update CocoaPods.
  [Xcodeproj] Use Pod::UI for warnings and messages
  [Changelog]
  ...

Conflicts:
	Gemfile.lock
	lib/cocoapods/installer/analyzer.rb
	spec/unit/installer/analyzer_spec.rb
4ce0471
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment