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
9cee0a2a
Commit
9cee0a2a
authored
Mar 20, 2018
by
Paul Beusterien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mixed language static frameworks
parent
6680e71f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
62 deletions
+12
-62
CHANGELOG.md
CHANGELOG.md
+4
-1
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+0
-25
target_installer.rb
...nstaller/xcode/pods_project_generator/target_installer.rb
+1
-3
target.rb
lib/cocoapods/target.rb
+1
-1
pod_target_installer_spec.rb
...xcode/pods_project_generator/pod_target_installer_spec.rb
+0
-14
target_installer_spec.rb
...ler/xcode/pods_project_generator/target_installer_spec.rb
+6
-18
No files found.
CHANGELOG.md
View file @
9cee0a2a
...
...
@@ -8,11 +8,14 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Enhancements
*
Add
`--exclude-pods`
option to
`pod update`
to allow excluding specific pods from update
[
Oleksandr Kruk
](
https://github.com/0mega
)
[
#7334
](
https://github.com/CocoaPods/CocoaPods/issues/7334
)
*
Add support for mixed Objective-C and Swift static frameworks
[
Paul Beusterien
](
https://github.com/paulb777
)
[
#7213
](
https://github.com/CocoaPods/CocoaPods/issues/7213
)
*
Improve
`pod install`
performance for pods with exact file paths rather than glob patterns
[
Muhammed Yavuz Nuzumlalı
](
https://github.com/manuyavuz
)
[
#7473
](
https://github.com/CocoaPods/CocoaPods/pull/7473
)
...
...
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
9cee0a2a
...
...
@@ -50,9 +50,6 @@ module Pod
create_info_plist_file
(
target
.
info_plist_path
,
native_target
,
target
.
version
,
target
.
platform
)
end
create_build_phase_to_symlink_header_folders
if
target
.
static_framework?
create_build_phase_to_move_static_framework_archive
end
elsif
target
.
uses_swift?
add_swift_static_library_compatibility_header_phase
end
...
...
@@ -484,28 +481,6 @@ module Pod
eos
end
# 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
# of the form lib{LibraryName}.a. We need to move that to the framework location -
# {LibraryName}.framework/{LibraryName}.
#
# @return [void]
#
def
create_build_phase_to_move_static_framework_archive
build_phase
=
native_target
.
new_shell_script_build_phase
(
'Setup Static Framework'
)
build_phase
.
shell_script
=
<<-
eos
.
strip_heredoc
mkdir -p "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Modules"
# The fat library archive is at a file symbolic link when archiving, so use -L option
rsync -tL "${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/${PRODUCT_NAME}"
rsync -t "${MODULEMAP_FILE}" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Modules/module.modulemap"
# If there's a .swiftmodule, copy it into the framework's Modules folder
rsync -tr "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}".swiftmodule "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Modules/" 2>/dev/null || :
# If archiving, Headers copy is needed
rsync -tr "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.framework/Headers" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/" 2>/dev/null || :
rsync -tr "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.framework/PrivateHeaders" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/" 2>/dev/null || :
eos
end
# Creates a prefix header file which imports `UIKit` or `Cocoa` according
# to the platform of the target. This file also include any prefix header
# content reported by the specification of the pods.
...
...
lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb
View file @
9cee0a2a
...
...
@@ -81,10 +81,8 @@ module Pod
end
if
target
.
requires_frameworks?
framework_name
=
target
.
product_module_name
if
target
.
static_framework?
settings
[
'PUBLIC_HEADERS_FOLDER_PATH'
]
=
framework_name
+
'.framework'
+
'/Headers'
settings
[
'PRIVATE_HEADERS_FOLDER_PATH'
]
=
framework_name
+
'.framework'
+
'/PrivateHeaders'
settings
[
'MACH_O_TYPE'
]
=
'staticlib'
end
else
settings
.
merge!
(
'OTHER_LDFLAGS'
=>
''
,
'OTHER_LIBTOOLFLAGS'
=>
''
)
...
...
lib/cocoapods/target.rb
View file @
9cee0a2a
...
...
@@ -74,7 +74,7 @@ module Pod
# #requires_frameworks?.
#
def
product_type
requires_frameworks?
&&
!
static_framework?
?
:
framework
:
:static_library
requires_frameworks?
?
:
framework
:
:static_library
end
# @return [String] A string suitable for debugging.
...
...
spec/unit/installer/xcode/pods_project_generator/pod_target_installer_spec.rb
View file @
9cee0a2a
...
...
@@ -818,20 +818,6 @@ module Pod
build_phase
.
should
.
not
.
be
.
nil
end
it
'creates a build phase to set up a static library framework'
do
@pod_target
.
stubs
(
:static_framework?
).
returns
(
true
)
@installer
.
install!
target
=
@project
.
native_targets
.
first
build_phase
=
target
.
shell_script_build_phases
.
find
do
|
bp
|
bp
.
name
==
'Setup Static Framework'
end
build_phase
.
shell_script
.
should
.
include?
(
'swiftmodule'
)
build_phase
.
shell_script
.
should
.
include?
(
'PrivateHeaders'
)
build_phase
.
should
.
not
.
be
.
nil
end
it
'verifies that headers in build phase for static libraries are all Project headers'
do
@pod_target
.
stubs
(
:requires_frameworks?
).
returns
(
false
)
...
...
spec/unit/installer/xcode/pods_project_generator/target_installer_spec.rb
View file @
9cee0a2a
...
...
@@ -61,27 +61,15 @@ module Pod
}
end
it
'verify
header path for a static library framework
'
do
it
'verify
static framework is building a static library
'
do
@pod_target
.
stubs
(
:requires_frameworks?
).
returns
(
true
)
@pod_target
.
stubs
(
:static_framework?
).
returns
(
true
)
@installer
.
send
(
:add_target
)
@installer
.
send
(
:native_target
).
resolved_build_setting
(
'PUBLIC_HEADERS_FOLDER_PATH'
).
should
==
{
'Release'
=>
'BananaLib.framework/Headers'
,
'Debug'
=>
'BananaLib.framework/Headers'
,
'Test'
=>
'BananaLib.framework/Headers'
,
'AppStore'
=>
'BananaLib.framework/Headers'
,
}
end
it
'verify private header path for a static library framework'
do
@pod_target
.
stubs
(
:requires_frameworks?
).
returns
(
true
)
@pod_target
.
stubs
(
:static_framework?
).
returns
(
true
)
@installer
.
send
(
:add_target
)
@installer
.
send
(
:native_target
).
resolved_build_setting
(
'PRIVATE_HEADERS_FOLDER_PATH'
).
should
==
{
'Release'
=>
'BananaLib.framework/PrivateHeaders'
,
'Debug'
=>
'BananaLib.framework/PrivateHeaders'
,
'Test'
=>
'BananaLib.framework/PrivateHeaders'
,
'AppStore'
=>
'BananaLib.framework/PrivateHeaders'
,
@installer
.
send
(
:native_target
).
resolved_build_setting
(
'MACH_O_TYPE'
).
should
==
{
'Release'
=>
'staticlib'
,
'Debug'
=>
'staticlib'
,
'Test'
=>
'staticlib'
,
'AppStore'
=>
'staticlib'
,
}
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