mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-21 02:50:14 +08:00
osx: import Cocoa/Cocoa.h in vendor.pch for mac
This commit is contained in:
@@ -76,11 +76,23 @@ module Motion; module Project;
|
||||
unless File.exist?(pch)
|
||||
FileUtils.mkdir_p File.dirname(pch)
|
||||
File.open(pch, 'w') do |io|
|
||||
io.puts <<EOS
|
||||
case platform
|
||||
when "MacOSX"
|
||||
header = <<EOS
|
||||
#ifdef __OBJC__
|
||||
# import <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
EOS
|
||||
when /^iPhone/
|
||||
header = <<EOS
|
||||
#ifdef __OBJC__
|
||||
# import <UIKit/UIKit.h>
|
||||
#endif
|
||||
EOS
|
||||
else
|
||||
App.fail "Unknown platform : #{platform}"
|
||||
end
|
||||
io.puts header
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user