Module: Iarrogant

Defined in:
lib/iarrogant.rb,
lib/iarrogant/version.rb

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.convert_ent_to_xcent(entitlement_path:, team_identifier:, bundle_id:, aps_environment:) ⇒ Object

Convert from normal .Entitlement file to a proper .xcent, returns a string



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/iarrogant.rb', line 6

def self.convert_ent_to_xcent(entitlement_path:, team_identifier:, bundle_id:, aps_environment:)
  #Decodes into a Hash
  r = Plist::parse_xml(entitlement_path)
  raise "Could not locate entitlement at path #{entitlement_path.inspect}" unless r

  #Set team-identifier
  r['com.apple.developer.team-identifier'] = team_identifier
  r['aps-environment'] = aps_environment
  r['application-identifier'] = "#{team_identifier}.#{bundle_id}"
  r['get-task-allow'] = false

  r.to_plist
end