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
4b8898ca
Commit
4b8898ca
authored
Dec 01, 2015
by
Dimitris Couchell-Koutsogiorgas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add @import UIKit; or @import Cocoa; for generated main.m
parent
ae13ab00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
validator.rb
lib/cocoapods/validator.rb
+6
-1
validator_spec.rb
spec/unit/validator_spec.rb
+3
-0
No files found.
lib/cocoapods/validator.rb
View file @
4b8898ca
...
...
@@ -421,7 +421,12 @@ module Pod
''
end
end
source_file
.
open
(
'w'
)
{
|
f
|
f
<<
"@import Foundation;
\n
#{
import_statement
}
int main() {}
\n
"
}
source_file
.
open
(
'w'
)
do
|
f
|
f
<<
"@import Foundation;
\n
"
f
<<
"@import UIKit;
\n
"
if
consumer
.
platform_name
==
:ios
||
consumer
.
platform_name
==
:tvos
f
<<
"@import Cocoa;
\n
"
if
consumer
.
platform_name
==
:osx
f
<<
"
#{
import_statement
}
int main() {}
\n
"
end
end
source_file
end
...
...
spec/unit/validator_spec.rb
View file @
4b8898ca
...
...
@@ -524,6 +524,7 @@ module Pod
file
.
basename
.
to_s
.
should
==
'main.m'
file
.
read
.
should
==
<<-
OBJC
.
strip_heredoc
@import Foundation;
@import UIKit;
@import ModuleName;
int main() {}
OBJC
...
...
@@ -547,6 +548,7 @@ module Pod
file
.
basename
.
to_s
.
should
==
'main.m'
file
.
read
.
should
==
<<-
OBJC
.
strip_heredoc
@import Foundation;
@import UIKit;
#import <ModuleName/ModuleName.h>
int main() {}
OBJC
...
...
@@ -559,6 +561,7 @@ module Pod
file
.
basename
.
to_s
.
should
==
'main.m'
file
.
read
.
should
==
<<-
OBJC
.
strip_heredoc
@import Foundation;
@import UIKit;
int main() {}
OBJC
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