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
16 changes: 15 additions & 1 deletion lib/beta_builder/archived_build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,28 @@ def save_to(path)

private

def ios5_style_icon_paths
return nil if metadata['CFBundleIcons'].nil?
metadata['CFBundleIcons']['CFBundlePrimaryIcon']['CFBundleIconFiles']
end

def generic_icon_paths
metadata['CFBundleIconFiles']
end

def icon_paths
paths = ios5_style_icon_paths || generic_icon_paths || []
paths.map {|file| File.join("Applications", @configuration.app_file_name, file) }
end

def write_plist_to(path)
version = metadata["CFBundleShortVersionString"] || metadata["CFBundleVersion"]
plist = {
"ApplicationProperties" => {
"ApplicationPath" => File.join("Applications", @configuration.app_file_name),
"CFBundleIdentifier" => metadata["CFBundleIdentifier"],
"CFBundleShortVersionString" => version,
"IconPaths" => metadata["CFBundleIconFiles"].map { |file| File.join("Applications", @configuration.app_file_name, file) }
"IconPaths" => icon_paths
},
"ArchiveVersion" => 1.0,
"Comment" => @configuration.release_notes_text,
Expand Down