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
168e5587
Commit
168e5587
authored
Sep 11, 2016
by
Dimitris Koutsogiorgas
Committed by
Dimitris Couchell-Koutsogiorgas
Oct 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrap generated import headers using __OBJC__ for C only pods
parent
d0f874bc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
13 deletions
+12
-13
CHANGELOG.md
CHANGELOG.md
+4
-0
header.rb
lib/cocoapods/generator/header.rb
+2
-1
prefix_header.rb
lib/cocoapods/generator/prefix_header.rb
+0
-12
header_spec.rb
spec/unit/generator/header_spec.rb
+6
-0
No files found.
CHANGELOG.md
View file @
168e5587
...
...
@@ -87,6 +87,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
*
Wrap generated import headers with __OBJC__ to fix C only pods.
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#5291
](
https://github.com/CocoaPods/CocoaPods/issues/5291
)
*
Prevent crash when generating acknowledgements when license type is not specified.
[
Marcelo Fabri
](
https://github.com/marcelofabri
)
[
#5826
](
https://github.com/CocoaPods/CocoaPods/issues/5826
)
...
...
lib/cocoapods/generator/header.rb
View file @
168e5587
...
...
@@ -40,8 +40,9 @@ module Pod
#
def
generate
result
=
''
result
<<
"#ifdef __OBJC__
\n
"
result
<<
generate_platform_import_header
result
<<
"#endif
\n
"
result
<<
"
\n
"
imports
.
each
do
|
import
|
...
...
lib/cocoapods/generator/prefix_header.rb
View file @
168e5587
...
...
@@ -55,18 +55,6 @@ module Pod
result
end
protected
# Generates the contents of the header according to the platform.
#
# @return [String]
#
def
generate_platform_import_header
result
=
"#ifdef __OBJC__
\n
"
result
<<
super
result
<<
"#endif
\n
"
end
end
end
end
spec/unit/generator/header_spec.rb
View file @
168e5587
...
...
@@ -9,7 +9,9 @@ module Pod
it
'includes the imports'
do
@gen
.
imports
<<
'header.h'
@gen
.
generate
.
should
==
<<-
EOS
.
strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
#import "header.h"
EOS
...
...
@@ -18,7 +20,9 @@ module Pod
it
'includes the module imports'
do
@gen
.
module_imports
<<
'Module'
@gen
.
generate
.
should
==
<<-
EOS
.
strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
@import Module
...
...
@@ -49,7 +53,9 @@ module Pod
path
=
temporary_directory
+
'Test.h'
@gen
.
save_as
(
path
)
path
.
read
.
should
==
<<-
EOS
.
strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
EOS
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