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
7300c82c
Commit
7300c82c
authored
Jan 29, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Target] Always use the #product_module_name as the $PRODUCT_NAME
parent
83787fab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
17 deletions
+28
-17
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+23
-10
target_installer.rb
...nstaller/xcode/pods_project_generator/target_installer.rb
+3
-1
target.rb
lib/cocoapods/target.rb
+2
-6
No files found.
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
7300c82c
...
...
@@ -101,9 +101,6 @@ module Pod
settings
[
'SWIFT_VERSION'
]
=
target
.
swift_version
end
if
target
.
requires_frameworks?
||
target
.
uses_swift?
settings
[
'DEFINES_MODULE'
]
=
'YES'
end
settings
end
...
...
@@ -610,14 +607,22 @@ module Pod
return
super
unless
custom_module_map
path
=
target
.
module_map_path
UI
.
message
"- Copying module map file to
#{
UI
.
path
(
path
)
}
"
do
unless
path
.
exist?
&&
FileUtils
.
identical?
(
custom_module_map
,
path
)
FileUtils
.
cp
(
custom_module_map
,
path
)
end
add_file_to_support_group
(
path
)
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
)
native_target
.
build_configurations
.
each
do
|
c
|
relative_path
=
path
.
relative_path_from
(
sandbox
.
root
)
c
.
build_settings
[
'MODULEMAP_FILE'
]
=
relative_path
.
to_s
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
end
...
...
@@ -696,6 +701,14 @@ module Pod
ditto "${PODS_ROOT}/
#{
target
.
module_map_path
.
relative_path_from
(
target
.
sandbox
.
root
)
}
" "${MODULE_MAP_PATH}"
printf "
\\
n
\\
nmodule ${PRODUCT_MODULE_NAME}.Swift {
\\
n header
\\
"${COMPATIBILITY_HEADER_PATH}
\\
"
\\
n requires objc
\\
n}
\\
n" >> "${MODULE_MAP_PATH}"
SH
build_phase
.
input_paths
=
%W[
${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h
${PODS_ROOT}/
#{
target
.
module_map_path
.
relative_path_from
(
target
.
sandbox
.
root
)
}
]
build_phase
.
output_paths
=
%W[
${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap
${BUILT_PRODUCTS_DIR}/Swift
\
Compatibility
\
Header/${PRODUCT_MODULE_NAME}-Swift.h
]
end
#-----------------------------------------------------------------------#
...
...
lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb
View file @
7300c82c
...
...
@@ -74,7 +74,9 @@ module Pod
# @return [Hash{String => String}]
#
def
custom_build_settings
settings
=
{}
settings
=
{
'PRODUCT_NAME'
=>
target
.
product_module_name
}
unless
target
.
archs
.
empty?
settings
[
'ARCHS'
]
=
target
.
archs
...
...
lib/cocoapods/target.rb
View file @
7300c82c
...
...
@@ -45,11 +45,7 @@ module Pod
# and #product_module_name or #label.
#
def
product_basename
if
requires_frameworks?
product_module_name
else
label
end
product_module_name
end
# @return [String] the name of the framework, depends on #label.
...
...
@@ -67,7 +63,7 @@ module Pod
# used for migration.
#
def
static_library_name
"lib
#{
label
}
.a"
"lib
#{
product_module_name
}
.a"
end
# @return [Symbol] either :framework or :static_library, depends on
...
...
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