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
917dcf2d
Commit
917dcf2d
authored
Mar 13, 2016
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5028 from CocoaPods/mr-fix-resource-bundle-paths
Fix resource bundle build path
parents
b6152cc8
5080144e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
36 deletions
+36
-36
CHANGELOG.md
CHANGELOG.md
+4
-0
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+0
-2
pod_target.rb
lib/cocoapods/target/pod_target.rb
+9
-29
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+18
-0
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+4
-4
No files found.
CHANGELOG.md
View file @
917dcf2d
...
@@ -41,6 +41,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -41,6 +41,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Marius Rackwitz
](
https://github.com/mrackwitz
)
[
Marius Rackwitz
](
https://github.com/mrackwitz
)
[
#5022
](
https://github.com/CocoaPods/CocoaPods/issues/5022
)
[
#5022
](
https://github.com/CocoaPods/CocoaPods/issues/5022
)
*
Fixes build paths for resources bundles.
[
Marius Rackwitz
](
https://github.com/mrackwitz
)
[
#5028
](
https://github.com/CocoaPods/CocoaPods/pull/5028
)
*
Validate that a Podfile does not declare the same target twice.
*
Validate that a Podfile does not declare the same target twice.
[
Samuel Giddins
](
https://github.com/segiddins
)
[
Samuel Giddins
](
https://github.com/segiddins
)
[
#5029
](
https://github.com/CocoaPods/CocoaPods/issues/5029
)
[
#5029
](
https://github.com/CocoaPods/CocoaPods/issues/5029
)
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
917dcf2d
...
@@ -177,9 +177,7 @@ module Pod
...
@@ -177,9 +177,7 @@ module Pod
c
.
build_settings
[
'PRODUCT_NAME'
]
=
bundle_name
c
.
build_settings
[
'PRODUCT_NAME'
]
=
bundle_name
relative_info_plist_path
=
info_plist_path
.
relative_path_from
(
sandbox
.
root
)
relative_info_plist_path
=
info_plist_path
.
relative_path_from
(
sandbox
.
root
)
c
.
build_settings
[
'INFOPLIST_FILE'
]
=
relative_info_plist_path
.
to_s
c
.
build_settings
[
'INFOPLIST_FILE'
]
=
relative_info_plist_path
.
to_s
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
# Set the correct device family for this bundle, based on the platform
# Set the correct device family for this bundle, based on the platform
device_family_by_platform
=
{
device_family_by_platform
=
{
...
...
lib/cocoapods/target/pod_target.rb
View file @
917dcf2d
...
@@ -16,26 +16,10 @@ module Pod
...
@@ -16,26 +16,10 @@ module Pod
#
#
attr_reader
:build_headers
attr_reader
:build_headers
# @return [Bool] whether the target needs to be scoped by target definition,
# @return [String] used as suffix in the label
# because the spec is used with different subspec sets across them.
#
#
# @note This affects the value returned by #configuration_build_dir
# @note The target products of {PodTarget}s are named after their specs.
# and accessors relying on this as #build_product_path.
# The namespacing cannot directly happen in the product name itself,
# because this must be equal to the module name and this will be
# used in source code, which should stay agnostic over the
# dependency manager.
# We need namespacing because multiple targets can exist for the
# same podspec and their products should not collide. This
# duplication is needed when multiple user targets have the same
# dependency, but they require different sets of subspecs or they
# are on different platforms.
#
def
scoped?
!
scope_suffix
.
nil?
end
# @return [String] used for the label and the directory name, which is used to
# scope the build product in the default configuration build dir.
#
#
attr_reader
:scope_suffix
attr_reader
:scope_suffix
...
@@ -44,10 +28,10 @@ module Pod
...
@@ -44,10 +28,10 @@ module Pod
#
#
attr_accessor
:dependent_targets
attr_accessor
:dependent_targets
# @param [Array<Specification>]
@spec #see spec
# @param [Array<Specification>]
specs @see #specs
# @param [Array<TargetDefinition>] target_definitions @see target_definitions
# @param [Array<TargetDefinition>] target_definitions @see
#
target_definitions
# @param [Sandbox] sandbox @see sandbox
# @param [Sandbox] sandbox @see
#
sandbox
# @param [String] scope_suffix @see scope_suffix
# @param [String] scope_suffix @see
#
scope_suffix
#
#
def
initialize
(
specs
,
target_definitions
,
sandbox
,
scope_suffix
=
nil
)
def
initialize
(
specs
,
target_definitions
,
sandbox
,
scope_suffix
=
nil
)
raise
"Can't initialize a PodTarget without specs!"
if
specs
.
nil?
||
specs
.
empty?
raise
"Can't initialize a PodTarget without specs!"
if
specs
.
nil?
||
specs
.
empty?
...
@@ -89,15 +73,11 @@ module Pod
...
@@ -89,15 +73,11 @@ module Pod
# @return [String] the label for the target.
# @return [String] the label for the target.
#
#
def
label
def
label
if
scoped?
if
scope_suffix
.
nil?
||
scope_suffix
[
0
]
==
'.'
if
scope_suffix
[
0
]
==
'.'
"
#{
root_spec
.
name
}#{
scope_suffix
}
"
"
#{
root_spec
.
name
}#{
scope_suffix
}
"
else
else
"
#{
root_spec
.
name
}
-
#{
scope_suffix
}
"
"
#{
root_spec
.
name
}
-
#{
scope_suffix
}
"
end
end
else
root_spec
.
name
end
end
end
# @note The deployment target for the pod target is the maximum of all
# @note The deployment target for the pod target is the maximum of all
...
...
cocoapods-integration-specs
@
d194806b
Subproject commit
231c8fc93b5ab52c79f95a211a99059d596a6af2
Subproject commit
d194806b4d127ac46f137f828533d4112f2ed996
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
917dcf2d
...
@@ -176,6 +176,24 @@ module Pod
...
@@ -176,6 +176,24 @@ module Pod
end
end
end
end
it
'sets the correct product name'
do
@bundle_target
.
build_configurations
.
each
do
|
bc
|
bc
.
build_settings
[
'PRODUCT_NAME'
].
should
==
'banana_bundle'
end
end
it
'sets the correct Info.plist file path'
do
@bundle_target
.
build_configurations
.
each
do
|
bc
|
bc
.
build_settings
[
'INFOPLIST_FILE'
].
should
==
'Target Support Files/BananaLib-Pods-SampleProject/ResourceBundle-banana_bundle-Info.plist'
end
end
it
'sets the correct build dir'
do
@bundle_target
.
build_configurations
.
each
do
|
bc
|
bc
.
build_settings
[
'CONFIGURATION_BUILD_DIR'
].
should
==
'$CONFIGURATION_BUILD_DIR/BananaLib-Pods-SampleProject'
end
end
it
'sets the correct targeted device family for the resource bundle targets'
do
it
'sets the correct targeted device family for the resource bundle targets'
do
@bundle_target
.
build_configurations
.
each
do
|
bc
|
@bundle_target
.
build_configurations
.
each
do
|
bc
|
bc
.
build_settings
[
'TARGETED_DEVICE_FAMILY'
].
should
==
'1,2'
bc
.
build_settings
[
'TARGETED_DEVICE_FAMILY'
].
should
==
'1,2'
...
...
spec/unit/target/pod_target_spec.rb
View file @
917dcf2d
...
@@ -10,11 +10,11 @@ module Pod
...
@@ -10,11 +10,11 @@ module Pod
end
end
describe
'Meta'
do
describe
'Meta'
do
describe
'#scope
d
'
do
describe
'#scope
_suffix
'
do
it
'returns target copies per target definition, which are scoped'
do
it
'returns target copies per target definition, which are scoped'
do
@pod_target
.
s
hould
.
not
.
be
.
scoped
@pod_target
.
s
cope_suffix
.
should
.
be
.
nil
@pod_target
.
scoped
.
first
.
s
hould
.
be
.
scoped
@pod_target
.
scoped
.
first
.
s
cope_suffix
.
should
==
'Pods'
@pod_target
.
s
hould
.
not
.
be
.
scoped
@pod_target
.
s
cope_suffix
.
should
.
be
.
nil
end
end
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