Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
ddbffba9
Commit
ddbffba9
authored
Jan 07, 2016
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4734 from arifken/resource-bundle-device-family-bug
parents
ebd42a7c
637e212a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
CHANGELOG.md
CHANGELOG.md
+4
-0
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+11
-0
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+10
-0
No files found.
CHANGELOG.md
View file @
ddbffba9
...
@@ -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)
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
ddbffba9
...
@@ -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
...
...
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
ddbffba9
...
@@ -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
#--------------------------------------#
#--------------------------------------#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment