Commit ddbffba9 authored by Samuel Giddins's avatar Samuel Giddins

Merge pull request #4734 from arifken/resource-bundle-device-family-bug

parents ebd42a7c 637e212a
...@@ -13,6 +13,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -13,6 +13,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
* Fix suggestion of sudo when it actually isn't needed. * Fix suggestion of sudo when it actually isn't needed.
[Marcel Jackwerth](https://github.com/sirlantis) [Marcel Jackwerth](https://github.com/sirlantis)
* Set the `TARGET_DEVICE_FAMILY` to support both iPhone and iPad for iOS
resource bundle targets.
[Andy Rifken](https://github.com/arifken)
## 1.0.0.beta.2 (2016-01-05) ## 1.0.0.beta.2 (2016-01-05)
......
...@@ -180,6 +180,17 @@ module Pod ...@@ -180,6 +180,17 @@ module Pod
if target.requires_frameworks? && target.scoped? if target.requires_frameworks? && target.scoped?
c.build_settings['CONFIGURATION_BUILD_DIR'] = target.configuration_build_dir c.build_settings['CONFIGURATION_BUILD_DIR'] = target.configuration_build_dir
end end
# Set the correct device family for this bundle, based on the platform
device_family_by_platform = {
:ios => '1,2',
:tvos => '3',
:watchos => '1,2' # The device family for watchOS is 4, but Xcode creates watchkit-compatible bundles as 1,2
}
if family = device_family_by_platform[target.platform.name]
c.build_settings['TARGETED_DEVICE_FAMILY'] = family
end
end end
end end
end end
......
...@@ -171,6 +171,16 @@ module Pod ...@@ -171,6 +171,16 @@ module Pod
bc.base_configuration_reference.real_path.should == file bc.base_configuration_reference.real_path.should == file
end end
end end
it 'sets the correct targeted device family for the resource bundle targets' do
@pod_target.file_accessors.first.stubs(:resource_bundles).returns('banana_bundle' => [])
@installer.install!
bundle_target = @project.targets.find { |t| t.name == 'Pods-BananaLib-banana_bundle' }
bundle_target.build_configurations.each do |bc|
bc.build_settings['TARGETED_DEVICE_FAMILY'].should == '1,2'
end
end
end end
#--------------------------------------# #--------------------------------------#
......
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