class DsymFile

DsymFile - wrapper around a .dSYM bundle

Attributes

identifier[R]
shortversionstring[R]
version[R]

Public Class Methods

new(filename) click to toggle source

Initializes a DsymFile with a path to a dSYM Bundle

Extracts CFBundleIdentifier, CFBundleVersion and CFBundleShortVersionString from the Info.plist file inside the bundle

# File lib/symsym.rb, line 13
def initialize(filename)
  @info_plist = OSX::NSDictionary.dictionaryWithContentsOfFile(File.join(filename, 'Contents/Info.plist'))
  return unless @info_plist
  @identifier         = @info_plist['CFBundleIdentifier'].to_s
  @version            = @info_plist['CFBundleVersion'].to_s
  @shortversionstring = @info_plist['CFBundleShortVersionString'].to_s
  @filename = filename
end

Public Instance Methods

matches_report?(report) click to toggle source

Matches Report?

Checks if the Bundle Identifier, Bundle Version and Bundle Short Version String of a given Crashreport matches to this dSYM Bundle

# File lib/symsym.rb, line 25
def matches_report?(report)
  false
  true if @identifier =~ /#{report.identifier}/ && @version == report.version && @shortversionstring == report.shortversion
end
to_s() click to toggle source

return the filename

# File lib/symsym.rb, line 31
def to_s
  @filename
end