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
99434b69
Commit
99434b69
authored
Sep 07, 2015
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EmbedFrameworksScript] Attempt to embed each Swift stdlib just once
Before they were rsynced and codesigned multiple times.
parent
09a238e0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
embed_frameworks_script.rb
lib/cocoapods/generator/embed_frameworks_script.rb
+15
-3
No files found.
lib/cocoapods/generator/embed_frameworks_script.rb
View file @
99434b69
...
...
@@ -45,6 +45,8 @@ module Pod
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
SWIFT_RUNTIME_LIBS_TO_INTEGRATE=""
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
...
...
@@ -83,9 +85,9 @@ module Pod
local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath
\\\\
/
\\
(.+dylib
\\
).*/
\\\\
1/g | uniq -u && exit ${PIPESTATUS[0]})
for lib in $swift_runtime_libs; do
echo "rsync -auv
\\
"${SWIFT_STDLIB_PATH}/${lib}
\\
"
\\
"${FRAMEWORKS_DIR}
\\
""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${FRAMEWORKS_DIR}
"
code_sign_if_enabled "${FRAMEWORKS_DIR}/${lib}"
if [[ $SWIFT_RUNTIME_LIBS_TO_INTEGRATE != *"$lib"* ]]; then
SWIFT_RUNTIME_LIBS_TO_INTEGRATE="$SWIFT_RUNTIME_LIBS_TO_INTEGRATE $lib
"
fi
done
}
...
...
@@ -128,6 +130,16 @@ module Pod
script
<<
"fi
\n
"
end
end
script
<<
<<-
SH
.
strip_heredoc
# Embed linked Swift runtime libraries
for lib in $SWIFT_RUNTIME_LIBS_TO_INTEGRATE; do
echo "rsync -auv
\\
"${SWIFT_STDLIB_PATH}/${lib}
\\
"
\\
"${FRAMEWORKS_DIR}
\\
""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${FRAMEWORKS_DIR}"
code_sign_if_enabled "${FRAMEWORKS_DIR}/${lib}"
done
SH
script
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