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
3bb835b5
Commit
3bb835b5
authored
Dec 22, 2014
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that resource bundles are named like specified
parent
ccfcee2d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+8
-6
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+4
-1
No files found.
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
3bb835b5
...
@@ -82,12 +82,6 @@ module Pod
...
@@ -82,12 +82,6 @@ module Pod
project
.
reference_for_path
(
res
)
project
.
reference_for_path
(
res
)
end
end
resource_refs
+=
project
.
products_group
.
files
.
select
do
|
product_ref
|
file_accessor
.
resource_bundles
.
keys
.
any?
do
|
bundle_name
|
product_ref
.
path
==
"
#{
bundle_name
}
.bundle"
end
end
native_target
.
add_resources
(
resource_refs
)
native_target
.
add_resources
(
resource_refs
)
end
end
end
end
...
@@ -105,6 +99,11 @@ module Pod
...
@@ -105,6 +99,11 @@ module Pod
file_references
=
paths
.
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
file_references
=
paths
.
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
label
=
target
.
resources_bundle_target_label
(
bundle_name
)
label
=
target
.
resources_bundle_target_label
(
bundle_name
)
bundle_target
=
project
.
new_resources_bundle
(
label
,
file_accessor
.
spec_consumer
.
platform_name
)
bundle_target
=
project
.
new_resources_bundle
(
label
,
file_accessor
.
spec_consumer
.
platform_name
)
bundle_target
.
product_reference
.
tap
do
|
bundle_product
|
bundle_file_name
=
"
#{
bundle_name
}
.bundle"
bundle_product
.
name
=
bundle_file_name
bundle_product
.
path
=
bundle_file_name
end
bundle_target
.
add_resources
(
file_references
)
bundle_target
.
add_resources
(
file_references
)
target
.
user_build_configurations
.
each
do
|
bc_name
,
type
|
target
.
user_build_configurations
.
each
do
|
bc_name
,
type
|
...
@@ -115,6 +114,9 @@ module Pod
...
@@ -115,6 +114,9 @@ module Pod
if
target
.
should_build?
if
target
.
should_build?
native_target
.
add_dependency
(
bundle_target
)
native_target
.
add_dependency
(
bundle_target
)
if
target
.
requires_frameworks?
native_target
.
add_resources
([
bundle_target
.
product_reference
])
end
end
end
bundle_target
.
build_configurations
.
each
do
|
c
|
bundle_target
.
build_configurations
.
each
do
|
c
|
...
...
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
3bb835b5
...
@@ -103,7 +103,10 @@ module Pod
...
@@ -103,7 +103,10 @@ module Pod
it
'adds the resource bundle targets'
do
it
'adds the resource bundle targets'
do
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
@installer
.
install!
@installer
.
install!
@project
.
targets
.
map
(
&
:name
).
should
==
[
'Pods-BananaLib'
,
'Pods-BananaLib-banana_bundle'
]
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'Pods-BananaLib-banana_bundle'
}
bundle_target
.
should
.
be
.
an
.
instance_of
Xcodeproj
::
Project
::
Object
::
PBXNativeTarget
bundle_target
.
product_reference
.
name
.
should
==
'banana_bundle.bundle'
bundle_target
.
product_reference
.
path
.
should
==
'banana_bundle.bundle'
end
end
it
'adds framework resources to the framework target'
do
it
'adds framework resources to the framework target'
do
...
...
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