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
847e309e
Commit
847e309e
authored
Feb 01, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PodTargetInstaller] Write custom module maps using a generator
parent
d9e19706
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+11
-16
No files found.
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
847e309e
...
...
@@ -614,25 +614,20 @@ module Pod
def
create_module_map
return
super
unless
custom_module_map
path
=
target
.
module_map_path
path
.
mkpath
UI
.
message
"- Copying module map file to
#{
UI
.
path
(
path
)
}
"
do
Tempfile
.
open
(
path
.
basename
.
to_s
)
do
|
tmp_module_map
|
contents
=
custom_module_map
.
read
unless
target
.
requires_frameworks?
contents
.
gsub!
(
/^(\s*)framework\s+module/
,
'\1module'
)
end
tmp_module_map
.
write
contents
tmp_module_map
.
rewind
unless
path
.
exist?
&&
FileUtils
.
identical?
(
tmp_module_map
,
path
)
FileUtils
.
cp
(
tmp_module_map
,
path
)
end
add_file_to_support_group
(
path
)
contents
=
custom_module_map
.
read
unless
target
.
requires_frameworks?
contents
.
gsub!
(
/^(\s*)framework\s+module/
,
'\1module'
)
end
generator
=
Generator
::
Constant
.
new
(
contents
)
update_changed_file
(
generator
,
path
)
add_file_to_support_group
(
path
)
native_target
.
build_configurations
.
each
do
|
c
|
relative_path
=
path
.
relative_path_from
(
sandbox
.
root
)
c
.
build_settings
[
'MODULEMAP_FILE'
]
=
relative_path
.
to_s
end
native_target
.
build_configurations
.
each
do
|
c
|
relative_path
=
path
.
relative_path_from
(
sandbox
.
root
)
c
.
build_settings
[
'MODULEMAP_FILE'
]
=
relative_path
.
to_s
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