A load command containing the minimum OS version on which the binary was built to run. Corresponds to LC_VERSION_MIN_MACOSX and LC_VERSION_MIN_IPHONEOS.
@see MachOStructure::FORMAT @api private
@see MachOStructure::SIZEOF @api private
@return [Fixnum] the SDK version X.Y.Z packed as x16.y8.z8
@return [Fixnum] the version X.Y.Z packed as x16.y8.z8
@api private
# File lib/macho/load_commands.rb, line 1093 def initialize(view, cmd, cmdsize, version, sdk) super(view, cmd, cmdsize) @version = version @sdk = sdk end
A string representation of the binary's SDK version. @return [String] a string representing the SDK version.
# File lib/macho/load_commands.rb, line 1112 def sdk_string binary = "%032b" % sdk segs = [ binary[0..15], binary[16..23], binary[24..31] ].map { |s| s.to_i(2) } segs.join(".") end
A string representation of the binary's minimum OS version. @return [String] a string representing the minimum OS version.
# File lib/macho/load_commands.rb, line 1101 def version_string binary = "%032b" % version segs = [ binary[0..15], binary[16..23], binary[24..31] ].map { |s| s.to_i(2) } segs.join(".") end