[In progress] Fix copy resources script for iOS < 6 and OS X < 10.8

Remove the following flag from the script to avoid crashes

ibtool:

--reference-external-strings-file
              When combined with the --compile option, this flag indicates that the files in the Base.lproj locale  folder  should  be
              compiled  to reference the matching external strings files found in the other locales when loaded. Available on 10.8 and
              later.
parent d931a75a
......@@ -34,13 +34,14 @@ EOS
attr_reader :resources
# A list of files relative to the project pods root.
def initialize(resources = [])
def initialize(resources = [], reference_external_strings_file = false)
@resources = resources
@reference_external_strings_file = reference_external_strings_file
end
def save_as(pathname)
pathname.open('w') do |script|
script.puts CONTENT
script.puts @reference_external_strings_file ? CONTENT : CONTENT.gsub(' --reference-external-strings-file', '')
@resources.each do |resource|
script.puts "install_resource '#{resource}'"
end
......
......@@ -222,7 +222,9 @@ module Pod
UI.message "- Generating copy resources script at #{UI.path(path)}" do
resources = library.file_accessors.map { |accessor| accessor.resources.flatten.map {|res| project.relativize(res)} }.flatten
resources << bridge_support_file if bridge_support_file
generator = Generator::CopyResourcesScript.new(resources)
# @todo inspect library.platform to see if it is osx 10.8+ or 6.0+
greaterorquealto_osx10_8_or_ios6 = true
generator = Generator::CopyResourcesScript.new(resources, greaterorquealto_osx10_8_or_ios6)
generator.save_as(path)
add_file_to_support_group(path)
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment