Class: IOSDevTools::ProvisioningProfile
- Inherits:
-
Object
- Object
- IOSDevTools::ProvisioningProfile
- Defined in:
- lib/ios_dev_tools/model/provisioning_profile.rb
Instance Attribute Summary collapse
-
#profile_location ⇒ Object
Returns the value of attribute profile_location.
Instance Method Summary collapse
- #application_identifier ⇒ Object
-
#initialize(profile_location) {|_self| ... } ⇒ ProvisioningProfile
constructor
A new instance of ProvisioningProfile.
- #is_compatible_with_bundle_id(bundle_id) ⇒ Object
Constructor Details
#initialize(profile_location) {|_self| ... } ⇒ ProvisioningProfile
Returns a new instance of ProvisioningProfile.
9 10 11 12 13 14 15 16 17 |
# File 'lib/ios_dev_tools/model/provisioning_profile.rb', line 9 def initialize profile_location raise "Profisioning profile file \"#{profile_location}\" doesn't exist" if not File.exists? profile_location @profile_location=profile_location yield self if block_given? end |
Instance Attribute Details
#profile_location ⇒ Object
Returns the value of attribute profile_location.
7 8 9 |
# File 'lib/ios_dev_tools/model/provisioning_profile.rb', line 7 def profile_location @profile_location end |
Instance Method Details
#application_identifier ⇒ Object
19 20 21 |
# File 'lib/ios_dev_tools/model/provisioning_profile.rb', line 19 def application_identifier `egrep -a -A 2 application-identifier "#{@profile_location}" | grep string | sed -e 's/<string>//' -e 's/<\\/string>//' -e 's/ //' | awk '{split($0,a,"."); i = length(a); for(ix=2; ix <= i;ix++){ s=s a[ix]; if(i!=ix){s=s "."};} print s;}'`.strip end |
#is_compatible_with_bundle_id(bundle_id) ⇒ Object
23 24 25 26 |
# File 'lib/ios_dev_tools/model/provisioning_profile.rb', line 23 def is_compatible_with_bundle_id bundle_id bundle_id_prefix=application_identifier.sub(/\*$/,"") bundle_id.start_with? bundle_id_prefix end |