lib/ib/project.rb in ib-0.4.8 vs lib/ib/project.rb in ib-0.4.9
- old
+ new
@@ -86,10 +86,16 @@
file = support_files.new_file File.join(ib_project_path, 'Stubs.m')
target.add_file_references([ file ])
end
def add_resources
- Dir.glob("#{resources.path}/**/*.{#{RESOURCE_EXTENSIONS.join(",")}}") do |file|
+ # First add reference to any asset catalogs.
+ Dir.glob("#{resources.path}/**/*.xcassets") do |file|
+ resources.new_reference(file)
+ end
+ # Add all other resources, ignoring files in existing asset catalogs
+ Dir["#{resources.path}/**/*.{#{RESOURCE_EXTENSIONS.join(",")}}"]
+ .reject {|f| f[%r{.*\.xcassets/.*}] }.each do |file|
resources.new_reference(file)
end
end
def add_pods