Class: Fastlane::Helper::InstallProfilesHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/provisioning/helper/install_profiles_helper.rb

Class Method Summary collapse

Class Method Details

.install_profile(profile_path) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/fastlane/plugin/provisioning/helper/install_profiles_helper.rb', line 4

def self.install_profile(profile_path)
  profile = Plist.parse_xml(`security cms -D -i '#{profile_path}' 2> /dev/null`)

  UI.message "Installing provisioing profile #{profile_path}..."

  destination_profiles_dir = File.expand_path("~") + "/Library/MobileDevice/Provisioning Profiles/"
  destination_path = destination_profiles_dir + profile['UUID'] + ".mobileprovision"

  FileUtils.copy profile_path, destination_path
end