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

parent 4fd4624c
...@@ -209,6 +209,10 @@ module Pod ...@@ -209,6 +209,10 @@ module Pod
end end
end end
ENABLE_EXTERNAL_STRINGS_FILE_FLAG = {
:ios => Version.new('6'),
:osx => Version.new('10.8')
}
# Creates a script that copies the resources to the bundle of the client # Creates a script that copies the resources to the bundle of the client
# target. # target.
# #
...@@ -222,9 +226,9 @@ module Pod ...@@ -222,9 +226,9 @@ module Pod
UI.message "- Generating copy resources script at #{UI.path(path)}" do 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 = library.file_accessors.map { |accessor| accessor.resources.flatten.map {|res| project.relativize(res)} }.flatten
resources << bridge_support_file if bridge_support_file resources << bridge_support_file if bridge_support_file
# @todo inspect library.platform to see if it is osx 10.8+ or 6.0+ platform_name = library.platform.name
greaterorquealto_osx10_8_or_ios6 = true reference_external_strings_file = library.platform.deployment_target >= ENABLE_EXTERNAL_STRINGS_FILE_FLAG[platform_name]
generator = Generator::CopyResourcesScript.new(resources, greaterorquealto_osx10_8_or_ios6) generator = Generator::CopyResourcesScript.new(resources, reference_external_strings_file)
generator.save_as(path) generator.save_as(path)
add_file_to_support_group(path) add_file_to_support_group(path)
end 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