Sha256: 5cd254fc35b1749df2acab8968c4092d0a0cbc00e1c37bc72bff338e9dabb3b6

Contents?: true

Size: 559 Bytes

Versions: 1

Compression:

Stored size: 559 Bytes

Contents

# frozen_string_literal: true

require 'xcodeproj'

module GoNative
  module Plugins
    module IOS
      class AddLanguage
        extend DSL::Serviceable

        attr_reader :language

        def initialize(language)
          @language = language
        end

        def call
          proj = Xcodeproj::Project.open('MedianIOS.xcodeproj')
          file = proj.new_file("#{language}.lproj")
          file.move(proj.groups.first)
          proj.targets.first.add_resources([file])
          
          proj.save
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gonative-cli-1.3.6 lib/gonative/plugins/ios/add_language.rb