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
a86e24cb
Commit
a86e24cb
authored
Oct 11, 2016
by
Samuel Giddins
Committed by
GitHub
Oct 11, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5844 from dnkoutso/fix/5291
Wrap generated import headers using __OBJC__ for C only pods
parents
d0f874bc
ccfa78f2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
14 deletions
+13
-14
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
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
header_spec.rb
spec/unit/generator/header_spec.rb
+6
-0
No files found.
CHANGELOG.md
View file @
a86e24cb
...
@@ -87,6 +87,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -87,6 +87,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
##### 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.
*
Prevent crash when generating acknowledgements when license type is not specified.
[
Marcelo Fabri
](
https://github.com/marcelofabri
)
[
Marcelo Fabri
](
https://github.com/marcelofabri
)
[
#5826
](
https://github.com/CocoaPods/CocoaPods/issues/5826
)
[
#5826
](
https://github.com/CocoaPods/CocoaPods/issues/5826
)
...
...
lib/cocoapods/generator/header.rb
View file @
a86e24cb
...
@@ -40,8 +40,9 @@ module Pod
...
@@ -40,8 +40,9 @@ module Pod
#
#
def
generate
def
generate
result
=
''
result
=
''
result
<<
"#ifdef __OBJC__
\n
"
result
<<
generate_platform_import_header
result
<<
generate_platform_import_header
result
<<
"#endif
\n
"
result
<<
"
\n
"
result
<<
"
\n
"
imports
.
each
do
|
import
|
imports
.
each
do
|
import
|
...
...
lib/cocoapods/generator/prefix_header.rb
View file @
a86e24cb
...
@@ -55,18 +55,6 @@ module Pod
...
@@ -55,18 +55,6 @@ module Pod
result
result
end
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
end
end
end
cocoapods-integration-specs
@
3ccf80e8
Subproject commit
c58c9df1fed4f993062a58eb22a5bf567720c2b
b
Subproject commit
3ccf80e8c7adc855611e2f98fc60a190abf6531
b
spec/unit/generator/header_spec.rb
View file @
a86e24cb
...
@@ -9,7 +9,9 @@ module Pod
...
@@ -9,7 +9,9 @@ module Pod
it
'includes the imports'
do
it
'includes the imports'
do
@gen
.
imports
<<
'header.h'
@gen
.
imports
<<
'header.h'
@gen
.
generate
.
should
==
<<-
EOS
.
strip_heredoc
@gen
.
generate
.
should
==
<<-
EOS
.
strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#endif
#import "header.h"
#import "header.h"
EOS
EOS
...
@@ -18,7 +20,9 @@ module Pod
...
@@ -18,7 +20,9 @@ module Pod
it
'includes the module imports'
do
it
'includes the module imports'
do
@gen
.
module_imports
<<
'Module'
@gen
.
module_imports
<<
'Module'
@gen
.
generate
.
should
==
<<-
EOS
.
strip_heredoc
@gen
.
generate
.
should
==
<<-
EOS
.
strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#endif
@import Module
@import Module
...
@@ -49,7 +53,9 @@ module Pod
...
@@ -49,7 +53,9 @@ module Pod
path
=
temporary_directory
+
'Test.h'
path
=
temporary_directory
+
'Test.h'
@gen
.
save_as
(
path
)
@gen
.
save_as
(
path
)
path
.
read
.
should
==
<<-
EOS
.
strip_heredoc
path
.
read
.
should
==
<<-
EOS
.
strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#endif
EOS
EOS
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