Created
October 24, 2019 21:43
-
-
Save arpitdsoni/d35c8083925580d7727425b392c01e6d to your computer and use it in GitHub Desktop.
Save all devices for a dev provisioning profile using fastlane
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Save all devices for a dev provisioning profile to devices.txt" | |
lane :get_devices_dev_profile do | |
require "spaceship" | |
Spaceship::Portal.login() | |
bundle_id = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier).first | |
profile = Spaceship::Portal.provisioning_profile.development.find_by_bundle_id(bundle_id: bundle_id).first | |
devices = profile.devices | |
File.open('devices.txt', 'w') do |f| | |
f.puts "Device ID\tDevice Name" | |
devices.each do |device| | |
f.puts "#{device.udid}\t#{device.name}" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment