Sha256: 0c2a08f8452bbb38d8f211ea871628bf96113a96c3ac2af67894a68c29a37084
Contents?: true
Size: 1.02 KB
Versions: 28
Compression:
Stored size: 1.02 KB
Contents
module XCJobs module Helper def self.extract_provisioning_profile(provisioning_profile) if File.file?(provisioning_profile) provisioning_profile_path = provisioning_profile else path = File.join("#{Dir.home}/Library/MobileDevice/Provisioning Profiles/", provisioning_profile) if File.file?(path) provisioning_profile_path = path end end if provisioning_profile_path out, status = Open3.capture2 %[/usr/libexec/PlistBuddy -c Print:UUID /dev/stdin <<< $(security cms -D -i "#{provisioning_profile_path}")] provisioning_profile_uuid = out.strip if status.success? out, status = Open3.capture2 %[/usr/libexec/PlistBuddy -c Print:Name /dev/stdin <<< $(security cms -D -i "#{provisioning_profile_path}")] provisioning_profile_name = out.strip if status.success? else provisioning_profile_name = provisioning_profile end [provisioning_profile_path, provisioning_profile_uuid, provisioning_profile_name] end end end
Version data entries
28 entries across 28 versions & 1 rubygems