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
f8edd737
Commit
f8edd737
authored
Apr 13, 2017
by
Danielle Tomlinson
Committed by
GitHub
Apr 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6536 from dnkoutso/copy_dsym
Copy dSYM for vendored frameworks
parents
b9c6f34d
2c4e647e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
13 deletions
+34
-13
CHANGELOG.md
CHANGELOG.md
+3
-1
embed_frameworks_script.rb
lib/cocoapods/generator/embed_frameworks_script.rb
+16
-4
aggregate_target_installer.rb
...code/pods_project_generator/aggregate_target_installer.rb
+11
-5
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
embed_frameworks_script_spec.rb
spec/unit/generator/embed_frameworks_script_spec.rb
+3
-2
No files found.
CHANGELOG.md
View file @
f8edd737
...
...
@@ -8,7 +8,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Enhancements
*
None.
*
Copy dSYM for vendored frameworks.
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#1698
](
https://github.com/CocoaPods/CocoaPods/issues/1698
)
##### Bug Fixes
...
...
lib/cocoapods/generator/embed_frameworks_script.rb
View file @
f8edd737
...
...
@@ -91,6 +91,15 @@ module Pod
fi
}
# Copies the dSYM of a vendored framework
install_dsym() {
local source="$1"
if [ -r "$source" ]; then
echo "rsync -av --filter
\\
"- CVS/
\\
" --filter
\\
"- .svn/
\\
" --filter
\\
"- .git/
\\
" --filter
\\
"- .hg/
\\
" --filter
\\
"- Headers
\\
" --filter
\\
"- PrivateHeaders
\\
" --filter
\\
"- Modules
\\
"
\\
"${source}
\\
"
\\
"${DWARF_DSYM_FOLDER_PATH}
\\
""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}"
fi
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
...
...
@@ -126,11 +135,14 @@ module Pod
SH
script
<<
"
\n
"
unless
frameworks_by_config
.
values
.
all?
(
&
:empty?
)
frameworks_by_config
.
each
do
|
config
,
frameworks
|
unless
frameworks
.
empty?
frameworks_by_config
.
each
do
|
config
,
frameworks
_with_dsyms
|
unless
frameworks
_with_dsyms
.
empty?
script
<<
%(if [[ "$CONFIGURATION" == "#{config}" ]]; then\n)
frameworks
.
each
do
|
framework
|
script
<<
%( install_framework "#{framework}"\n)
frameworks_with_dsyms
.
each
do
|
framework_with_dsym
|
script
<<
%( install_framework "#{framework_with_dsym[:framework]}"\n)
# Vendored frameworks might have a dSYM file next to them so ensure its copied. Frameworks built from
# sources will have their dSYM generated and copied by Xcode.
script
<<
%( install_dsym "#{framework_with_dsym[:dSYM]}"\n)
unless
framework_with_dsym
[
:dSYM
].
nil?
end
script
<<
"fi
\n
"
end
...
...
lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb
View file @
f8edd737
...
...
@@ -158,18 +158,24 @@ module Pod
#
def
create_embed_frameworks_script
path
=
target
.
embed_frameworks_script_path
frameworks_by_config
=
{}
frameworks_
and_dsyms_
by_config
=
{}
target
.
user_build_configurations
.
keys
.
each
do
|
config
|
relevant_pod_targets
=
target
.
pod_targets
.
select
do
|
pod_target
|
pod_target
.
include_in_build_config?
(
target_definition
,
config
)
end
frameworks_by_config
[
config
]
=
relevant_pod_targets
.
flat_map
do
|
pod_target
|
frameworks
=
pod_target
.
file_accessors
.
flat_map
(
&
:vendored_dynamic_artifacts
).
map
{
|
fw
|
"${PODS_ROOT}/
#{
fw
.
relative_path_from
(
sandbox
.
root
)
}
"
}
frameworks
<<
pod_target
.
build_product_path
(
'$BUILT_PRODUCTS_DIR'
)
if
pod_target
.
should_build?
&&
pod_target
.
requires_frameworks?
frameworks_and_dsyms_by_config
[
config
]
=
relevant_pod_targets
.
flat_map
do
|
pod_target
|
frameworks
=
pod_target
.
file_accessors
.
flat_map
(
&
:vendored_dynamic_artifacts
).
map
do
|
fw
|
path_to_framework
=
"${PODS_ROOT}/
#{
fw
.
relative_path_from
(
sandbox
.
root
)
}
"
# Until this can be configured, assume the dSYM file uses the file name as the framework.
# See https://github.com/CocoaPods/CocoaPods/issues/1698
{
:framework
=>
path_to_framework
,
:dSYM
=>
"
#{
path_to_framework
}
.dSYM"
}
end
# For non vendored frameworks Xcode will generate the dSYM and copy it instead.
frameworks
<<
{
:framework
=>
pod_target
.
build_product_path
(
'$BUILT_PRODUCTS_DIR'
),
:dSYM
=>
nil
}
if
pod_target
.
should_build?
&&
pod_target
.
requires_frameworks?
frameworks
end
end
generator
=
Generator
::
EmbedFrameworksScript
.
new
(
frameworks_by_config
)
generator
=
Generator
::
EmbedFrameworksScript
.
new
(
frameworks_
and_dsyms_
by_config
)
generator
.
save_as
(
path
)
add_file_to_support_group
(
path
)
end
...
...
cocoapods-integration-specs
@
04072c13
Subproject commit
11064dbaee00b46980afd8589a428d3d1a06108b
Subproject commit
04072c13296783a87f1afb5947cb84097d0d3808
spec/unit/generator/embed_frameworks_script_spec.rb
View file @
f8edd737
...
...
@@ -4,13 +4,14 @@ module Pod
describe
Generator
::
EmbedFrameworksScript
do
it
'returns the embed frameworks script'
do
frameworks
=
{
'Debug'
=>
%w(Pods/Loopback.framework Reveal.framework)
,
'Release'
=>
%w(CrashlyticsFramework.framework)
,
'Debug'
=>
[{
:framework
=>
'Pods/Loopback.framework'
,
:dSYM
=>
'Pods/Loopback.framework.dSYM'
},
{
:framework
=>
'Reveal.framework'
,
:dSYM
=>
nil
}]
,
'Release'
=>
[{
:framework
=>
'CrashlyticsFramework.framework'
,
:dSYM
=>
nil
}]
,
}
generator
=
Pod
::
Generator
::
EmbedFrameworksScript
.
new
(
frameworks
)
generator
.
send
(
:script
).
should
.
include
<<-
SH
.
strip_heredoc
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "Pods/Loopback.framework"
install_dsym "Pods/Loopback.framework.dSYM"
install_framework "Reveal.framework"
fi
SH
...
...
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