Method: IOS::ProjectManipulator#createModuleInterfaceDummies

Defined in:
lib/ios/module/setup/ProjectManipulator.rb

#createModuleInterfaceDummiesObject



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/ios/module/setup/ProjectManipulator.rb', line 195

def createModuleInterfaceDummies
    @configurator.printMessage("Gerando arquivos de exemplo na Interface")
    FileUtils.touch File.join(@module_path + "Interface", "Sources", "DummyInterface.swift")

    # Info.plist
    FileUtils.cp(
        File.join(@configurator.template_path, "Feature", "Info_template"),
        File.join(@module_path + "Interface", "Resources", "Info.plist")
    )

    # Header.h
    headerFilename = File.join(@module_path + "Interface", "Resources", @configurator.pod_name + ".h")
    FileUtils.cp(
        File.join(@configurator.template_path, "Feature", "Header_template"),
        headerFilename
    )
    text = File.read(headerFilename)
    text.gsub!("${POD_NAME}", @configurator.pod_name)
    File.open(headerFilename, "w") { |file| file.puts text}

    @configurator.printDone
end