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
6fdf3d6d
Commit
6fdf3d6d
authored
Aug 15, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Documentation] Document new FileAccessor methods
parent
eab14a83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+1
-1
file_accessor.rb
lib/cocoapods/sandbox/file_accessor.rb
+23
-0
No files found.
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
6fdf3d6d
...
...
@@ -53,7 +53,7 @@ module Pod
#
def
generate
includes_static_libs
=
!
target
.
requires_frameworks?
includes_static_libs
||=
pod_targets
.
flat_map
(
&
:file_accessors
).
any?
{
|
fa
|
!
fa
.
vendored_static_
libraries
.
empty?
||
!
fa
.
vendored_static_framework
s
.
empty?
}
includes_static_libs
||=
pod_targets
.
flat_map
(
&
:file_accessors
).
any?
{
|
fa
|
!
fa
.
vendored_static_
artifact
s
.
empty?
}
config
=
{
'OTHER_LDFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
default_ld_flags
(
target
,
includes_static_libs
),
'PODS_ROOT'
=>
target
.
relative_pods_root
,
...
...
lib/cocoapods/sandbox/file_accessor.rb
View file @
6fdf3d6d
...
...
@@ -152,12 +152,18 @@ module Pod
paths_for_attribute
(
:vendored_frameworks
,
true
)
end
# @return [Array<Pathname>] The paths of the dynamic framework bundles
# that come shipped with the Pod.
#
def
vendored_dynamic_frameworks
vendored_frameworks
.
select
do
|
framework
|
dynamic_binary?
(
framework
+
framework
.
basename
(
'.*'
))
end
end
# @return [Array<Pathname>] The paths of the static (fake) framework
# bundles that come shipped with the Pod.
#
def
vendored_static_frameworks
vendored_frameworks
-
vendored_dynamic_frameworks
end
...
...
@@ -197,20 +203,32 @@ module Pod
paths_for_attribute
(
:vendored_libraries
)
end
# @return [Array<Pathname>] The paths of the dynamic libraries
# that come shipped with the Pod.
#
def
vendored_dynamic_libraries
vendored_libraries
.
select
do
|
library
|
dynamic_binary?
(
library
)
end
end
# @return [Array<Pathname>] The paths of the static libraries
# that come shipped with the Pod.
#
def
vendored_static_libraries
vendored_libraries
-
vendored_dynamic_libraries
end
# @return [Array<Pathname>] The paths of the dynamic binary artifacts
# that come shipped with the Pod.
#
def
vendored_dynamic_artifacts
vendored_dynamic_libraries
+
vendored_dynamic_frameworks
end
# @return [Array<Pathname>] The paths of the static binary artifacts
# that come shipped with the Pod.
#
def
vendored_static_artifacts
vendored_static_libraries
+
vendored_static_frameworks
end
...
...
@@ -343,6 +361,11 @@ module Pod
result
.
flatten
.
compact
.
uniq
end
# @param [Pathname] binary
# The file to be checked for being a dynamic Mach-O binary.
#
# @return [Boolean] Whether `binary` can be dynamically linked.
#
def
dynamic_binary?
(
binary
)
return
unless
binary
.
file?
output
,
status
=
Executable
.
capture_command
(
'file'
,
[
binary
],
:capture
=>
:out
)
...
...
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