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
4cd5da0c
Commit
4cd5da0c
authored
Oct 24, 2017
by
Paul Beusterien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix archiving apps with static frameworks
parent
74b6bb6d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
CHANGELOG.md
CHANGELOG.md
+3
-2
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+5
-2
pod_target_installer_spec.rb
...xcode/pods_project_generator/pod_target_installer_spec.rb
+2
-1
No files found.
CHANGELOG.md
View file @
4cd5da0c
...
@@ -12,8 +12,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -12,8 +12,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
##### Bug Fixes
*
None.
*
Fix archiving apps with static frameworks
[
Paul Beusterien
](
https://github.com/paulb777
)
[
#7158
](
https://github.com/CocoaPods/CocoaPods/issues/7158
)
## 1.4.0.beta.2 (2017-10-24)
## 1.4.0.beta.2 (2017-10-24)
...
...
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
4cd5da0c
...
@@ -456,7 +456,7 @@ module Pod
...
@@ -456,7 +456,7 @@ module Pod
eos
eos
end
end
# Creates a build phase to put the static framework
archive
in the appropriate framework location
# Creates a build phase to put the static framework in the appropriate framework location
# Since Xcode does not provide template support for static library frameworks, we've built a static library
# Since Xcode does not provide template support for static library frameworks, we've built a static library
# of the form lib{LibraryName}.a. We need to move that to the framework location -
# of the form lib{LibraryName}.a. We need to move that to the framework location -
# {LibraryName}.framework/{LibraryName}.
# {LibraryName}.framework/{LibraryName}.
...
@@ -464,13 +464,16 @@ module Pod
...
@@ -464,13 +464,16 @@ module Pod
# @return [void]
# @return [void]
#
#
def
create_build_phase_to_move_static_framework_archive
def
create_build_phase_to_move_static_framework_archive
build_phase
=
native_target
.
new_shell_script_build_phase
(
'Setup Static Framework
Archive
'
)
build_phase
=
native_target
.
new_shell_script_build_phase
(
'Setup Static Framework'
)
build_phase
.
shell_script
=
<<-
eos
.
strip_heredoc
build_phase
.
shell_script
=
<<-
eos
.
strip_heredoc
mkdir -p "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Modules"
mkdir -p "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Modules"
cp "${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/${PRODUCT_NAME}"
cp "${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/${PRODUCT_NAME}"
cp "${MODULEMAP_FILE}" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Modules/module.modulemap"
cp "${MODULEMAP_FILE}" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Modules/module.modulemap"
# If there's a .swiftmodule, copy it into the framework's Modules folder
# If there's a .swiftmodule, copy it into the framework's Modules folder
cp -r "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}".swiftmodule "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Modules/" 2>/dev/null || :
cp -r "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}".swiftmodule "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Modules/" 2>/dev/null || :
# If archiving, Headers copy is needed
cp -r "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.framework/Headers" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/" 2>/dev/null || :
cp -r "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.framework/PrivateHeaders" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/" 2>/dev/null || :
eos
eos
end
end
...
...
spec/unit/installer/xcode/pods_project_generator/pod_target_installer_spec.rb
View file @
4cd5da0c
...
@@ -713,9 +713,10 @@ module Pod
...
@@ -713,9 +713,10 @@ module Pod
target
=
@project
.
native_targets
.
first
target
=
@project
.
native_targets
.
first
build_phase
=
target
.
shell_script_build_phases
.
find
do
|
bp
|
build_phase
=
target
.
shell_script_build_phases
.
find
do
|
bp
|
bp
.
name
==
'Setup Static Framework
Archive
'
bp
.
name
==
'Setup Static Framework'
end
end
build_phase
.
shell_script
.
should
.
include?
(
'swiftmodule'
)
build_phase
.
shell_script
.
should
.
include?
(
'swiftmodule'
)
build_phase
.
shell_script
.
should
.
include?
(
'PrivateHeaders'
)
build_phase
.
should
.
not
.
be
.
nil
build_phase
.
should
.
not
.
be
.
nil
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