Method: Pod::Generator::AppTargetHelper.create_app_host_main_file
- Defined in:
- lib/cocoapods/generator/app_target_helper.rb
.create_app_host_main_file(project, platform, name = 'App') ⇒ Pathname
Creates a default app host 'main.m' file.
249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/cocoapods/generator/app_target_helper.rb', line 249 def self.create_app_host_main_file(project, platform, name = 'App') source_file = project.path.dirname.+("#{name}/main.m") source_file.parent.mkpath source_file.open('w') do |f| case platform when :ios, :tvos f << IOS_APP_HOST_MAIN_CONTENTS when :osx f << MACOS_APP_HOST_MAIN_CONTENTS end end source_file end |