class XcodeTool::Mobileprovision

Public Class Methods

new(file) click to toggle source
# File lib/bean/xcode_tool.rb, line 96
def initialize(file) 
  @mobileprovision_file = file
end

Public Instance Methods

info() click to toggle source
# File lib/bean/xcode_tool.rb, line 106
def info 
  system "security cms -D -i #{@mobileprovision_file}"
end
method_missing(m, *args) click to toggle source
# File lib/bean/xcode_tool.rb, line 100
def method_missing(m, *args)
  return if m.to_s =~ /=$/
  key = m.to_s.split(/_/).map { |e| e.capitalize }.join('')
  value_from_plist(key)
end
team_identifier() click to toggle source
# File lib/bean/xcode_tool.rb, line 110
def team_identifier
  value_from_plist('Entitlements:com.apple.developer.team-identifier')
end
value_from_plist(key) click to toggle source

Get value form Mobileprovision file.

# File lib/bean/xcode_tool.rb, line 115
def value_from_plist(key)
  `/usr/libexec/PlistBuddy -c 'Print :#{key}' /dev/stdin <<< $(security cms -D -i #{@mobileprovision_file})`
end