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
3bbee447
Commit
3bbee447
authored
Nov 03, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate BridgeSupport for each target.
parent
10befd83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
20 deletions
+19
-20
bridge_support_generator.rb
lib/cocoapods/bridge_support_generator.rb
+2
-4
installer.rb
lib/cocoapods/installer.rb
+17
-16
No files found.
lib/cocoapods/bridge_support_generator.rb
View file @
3bbee447
...
@@ -15,11 +15,9 @@ module Pod
...
@@ -15,11 +15,9 @@ module Pod
@headers
.
map
{
|
header
|
"-I '
#{
header
.
dirname
}
'"
}.
uniq
@headers
.
map
{
|
header
|
"-I '
#{
header
.
dirname
}
'"
}.
uniq
end
end
def
create_in
(
root
)
def
save_as
(
pathname
)
puts
"==> Generating BridgeSupport metadata file"
unless
config
.
silent?
puts
"==> Generating BridgeSupport metadata file"
unless
config
.
silent?
file
=
root
+
"Pods.bridgesupport"
gen_bridge_metadata
%{-c "#{search_paths.join(' ')}" -o '#{pathname}' '#{headers.join("' '")}'}
gen_bridge_metadata
%{-c "#{search_paths.join(' ')}" -o '#{file}' '#{headers.join("' '")}'}
file
end
end
end
end
end
end
lib/cocoapods/installer.rb
View file @
3bbee447
...
@@ -15,6 +15,7 @@ module Pod
...
@@ -15,6 +15,7 @@ module Pod
end
end
class
Target
class
Target
include
Config
::
Mixin
include
Shared
include
Shared
attr_reader
:target
attr_reader
:target
...
@@ -48,6 +49,18 @@ module Pod
...
@@ -48,6 +49,18 @@ module Pod
"
#{
@definition
.
lib_name
}
-resources.sh"
"
#{
@definition
.
lib_name
}
-resources.sh"
end
end
def
bridge_support_generator
BridgeSupportGenerator
.
new
(
build_specifications
.
map
do
|
spec
|
spec
.
header_files
.
map
do
|
header
|
config
.
project_pods_root
+
header
end
end
.
flatten
)
end
def
bridge_support_filename
"
#{
@definition
.
lib_name
}
.bridgesupport"
end
# TODO move xcconfig related code into the xcconfig method, like copy_resources_script and generate_bridge_support.
# TODO move xcconfig related code into the xcconfig method, like copy_resources_script and generate_bridge_support.
def
install!
def
install!
# First add the target to the project
# First add the target to the project
...
@@ -82,6 +95,10 @@ module Pod
...
@@ -82,6 +95,10 @@ module Pod
def
create_files_in
(
root
)
def
create_files_in
(
root
)
xcconfig
.
save_as
(
root
+
xcconfig_filename
)
xcconfig
.
save_as
(
root
+
xcconfig_filename
)
if
@podfile
.
generate_bridge_support?
bridge_support_generator
.
save_as
(
root
+
bridge_support_filename
)
copy_resources_script
.
resources
<<
bridge_support_filename
end
copy_resources_script
.
save_as
(
root
+
copy_resources_filename
)
copy_resources_script
.
save_as
(
root
+
copy_resources_filename
)
end
end
end
end
...
@@ -114,14 +131,6 @@ module Pod
...
@@ -114,14 +131,6 @@ module Pod
@xcodeproj
@xcodeproj
end
end
def
bridge_support_generator
BridgeSupportGenerator
.
new
(
build_specifications
.
map
do
|
spec
|
spec
.
header_files
.
map
do
|
header
|
config
.
project_pods_root
+
header
end
end
.
flatten
)
end
def
targets
def
targets
@targets
||=
@podfile
.
targets
.
values
.
map
do
|
target_definition
|
@targets
||=
@podfile
.
targets
.
values
.
map
do
|
target_definition
|
Target
.
new
(
@podfile
,
xcodeproj
,
target_definition
)
Target
.
new
(
@podfile
,
xcodeproj
,
target_definition
)
...
@@ -136,14 +145,6 @@ module Pod
...
@@ -136,14 +145,6 @@ module Pod
puts
" * Copying contents of template directory `
#{
template
.
path
}
' to `
#{
root
}
'"
if
config
.
verbose?
puts
" * Copying contents of template directory `
#{
template
.
path
}
' to `
#{
root
}
'"
if
config
.
verbose?
template
.
copy_to
(
root
)
template
.
copy_to
(
root
)
# This has to happen before we generate the individual targets to make the specs pass.
# TODO However, this will move into the Target installer class as well, because each
# target needs its own xcconfig and bridgesupport.
#if @podfile.generate_bridge_support?
#path = bridge_support_generator.create_in(root)
#copy_resources_script.resources << path.relative_path_from(config.project_pods_root)
#end
puts
"==> Generating Xcode project and xcconfig"
unless
config
.
silent?
puts
"==> Generating Xcode project and xcconfig"
unless
config
.
silent?
targets
.
each
do
|
target
|
targets
.
each
do
|
target
|
target
.
install!
target
.
install!
...
...
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