Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lib/motion/project/template/ios/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,17 @@ def launch_image_metadata(path)
}
end

def icon_file_names
images = resources_dirs.map do |dir|
Dir.glob(File.join(dir, 'Icon*.png')).map do |file|
f = File.basename(file, File.extname(file))
i = f.rindex('@')
i ? f[0...i] : f
end
end.flatten.compact
images.uniq
end

# From iOS 7 and up we try to infer the launch images by looking for png
# files that start with 'Default'.
#
Expand All @@ -403,6 +414,7 @@ def launch_images
end

def merged_info_plist(platform)
self.icons = icon_file_names if icons.empty?
ios = {
'MinimumOSVersion' => deployment_target,
'CFBundleResourceSpecification' => 'ResourceRules.plist',
Expand Down