b0VIM 8.1臄_!})joshJoshs-Mac-mini.local~josh/Projects/fastlane/fastlane/fastlane/lib/fastlane/actions/register_device.rbutf-8 3210#"! UtpC<!/!NadCqXNM2lkD * t   } q p 7 #   < R H G & .-#>C mCOT "This is an optimistic action, in that it will only conflicting_options: [:api_key_path]), sensitive: true, optional: true, type: Hash, description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)", env_name: "FL_REGISTER_DEVICE_API_KEY", FastlaneCore::ConfigItem.new(key: :api_key, end), UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value) ver end), UI.user_error!("The platform can only be ios or mac") unless %('ios', 'mac').include?(value) verify_block: proc do |value| default_value: platform.empty? ? "ios" : platform, optional: true, description: "Provide the platform of the device to register as (ios, mac)", env_name: "FL_REGISTER_DEVICE_PLATFORM", FastlaneCore::ConfigItem.new(key: :platform, description: "Provide the name of the device to register as"), env_name: "FL_REGISTER_DEVICE_NAME", FastlaneCore::ConfigItem.new(key: :name, [ platform = Actions.lane_context[Actions::SharedValues::PLATFORM_NAME].to_s user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id) user = CredentialsManager::AppfileConfig.try_fetch_value(:apple_dev_portal_id) def self.available_options end "Registers a new device to the Apple Dev Portal" def self.description end return api_token api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path] api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key] params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY] def self.api_token(params) end return udid UI.success("Successfully registered new device") end UI.crash!("Failed to register new device (name: #{name}, platform: #{platform}, UDID: #{udid})") UI.error(ex.to_s) rescue => ex Spaceship::ConnectAPI::Device.create(name: name, platform: platform, udid: udid) begin end UI.message("Login successful") Spaceship::ConnectAPI.login(credentials.user, credentials.password, use_portal: true, use_tunes: false) credentials = CredentialsManager::AccountManager.new(user: params[:username]) UI.message("Login to App Store Connect (#{params[:username]})") else Spaceship::ConnectAPI.token = token UI.message("Using App Store Connect API token...") if (token = api_token(params)) platform = Spaceship::ConnectAPI::BundleIdPlatform.map(platform) udid = params[:udid] platform = params[:platform] name = params[:name] require 'spaceship' def self.run(params) end platform == :ios def self.is_supported?(platform) class RegisterDeviceAction < Action module Actionsmodule Fastlanerequire 'credentials_manager'adb  !D/%$P  g W M L 4      end end end end :code_signing def self.category end :string def self.return_type end ] )' username: "luka@goonbee.com" # Optional, lets you override the Apple Member Center username. team_id: "XXXXXXXXXX", # Optional, if you"re a member of multiple teams, then you need to pass the team ID here. udid: "1234567890123456789012345678901234567890", name: "Luka iPhone 6", 'register_device( ) # Simply provide the name and udid of the device', udid: "1234567890123456789012345678901234567890" name: "Luka iPhone 6", 'register_device( [ def self.example_code end "pvinis" def self.author end ].join("\n") "The action will connect to the Apple Developer Portal using the username you specified in your `Appfile` with `apple_id`, but you can override it using the `:username` option."ad&!A R ' ' : a 4 m 6 & "This is an optimistic action, in that it will only ever add a device to the member center. If the device has already been registered within the member center, it will be left alone in the member center.", "This will register an iOS device with the Developer Portal so that you can include it in your provisioning profiles.", [ def self.details end ] default_value_dynamic: true) default_value: user, optional: true, description: "Optional: Your Apple ID", env_name: "DELIVER_USER", FastlaneCore::ConfigItem.new(key: :username, end), ENV["FASTLANE_TEAM_NAME"] = value.to_s verify_block: proc do |value| default_value_dynamic: true, default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_name), code_gen_sensitive: true, optional: true, description: "The name of your Developer Portal team if you're in multiple teams", env_name: "REGISTER_DEVICE_TEAM_NAME", FastlaneCore::ConfigItem.new(key: :team_name, end), ENV["FASTLANE_TEAM_ID"] = value.to_s verify_block: proc do |value| optional: true, description: "The ID of your Developer Portal team if you're in multiple teams", default_value_dynamic: true, default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id), code_gen_sensitive: true, env_name: "REGISTER_DEVICE_TEAM_ID", FastlaneCore::ConfigItem.new(key: :team_id,ad   O U   m  conflicting_options: [:api_key_path]), sensitive: true, optional: true, type: Hash, description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)", env_name: "FL_REGISTER_DEVICE_API_KEY", FastlaneCore::ConfigItem.new(key: :api_key, end), UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value) verify_block: proc do |value| conflicting_options: [:api_key], optional: true, description: "Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)", env_name: "FL_REGISTER_DEVICE_API_KEY_PATH", FastlaneCore::ConfigItem.new(key: :api_key_path, description: "Provide the UDID of the device to register as"), env_name: "FL_REGISTER_DEVICE_UDID", FastlaneCore::ConfigItem.new(key: :udid,