Class: IOS8LastLaunchServicesMapWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/lib/ios8_last_launch_services_map_wrapper.rb

Instance Method Summary collapse

Constructor Details

#initialize(plist_file) ⇒ IOS8LastLaunchServicesMapWrapper

Returns a new instance of IOS8LastLaunchServicesMapWrapper.



4
5
6
7
8
# File 'lib/lib/ios8_last_launch_services_map_wrapper.rb', line 4

def initialize(plist_file)
  @plist_file = plist_file

  @plist_data = Plist4r.open @plist_file
end

Instance Method Details

#data_path_by_bundle_id(bundle_id) ⇒ Object



16
17
18
# File 'lib/lib/ios8_last_launch_services_map_wrapper.rb', line 16

def data_path_by_bundle_id(bundle_id)
  @plist_data.to_hash["User"][bundle_id]["Container"]
end

#entitlements_by_bundle_id(bundle_id) ⇒ Object



10
11
12
13
14
# File 'lib/lib/ios8_last_launch_services_map_wrapper.rb', line 10

def entitlements_by_bundle_id(bundle_id)
  @plist_data.to_hash["User"][bundle_id]["Entitlements"]
rescue
  $log.error "Could not read entitlements.."
end

#keychain_access_groups_by_bundle_id(bundle_id) ⇒ Object



20
21
22
23
24
# File 'lib/lib/ios8_last_launch_services_map_wrapper.rb', line 20

def keychain_access_groups_by_bundle_id(bundle_id)
  @plist_data.to_hash["User"][bundle_id]["Entitlements"]["keychain-access-groups"]
rescue
  ""
end