fastlane 2.74.1 → 2.75.0.beta.20180109010003
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/bin-proxy +2 -2
- data/bin/fastlane +5 -5
- data/cert/lib/cert/commands_generator.rb +1 -1
- data/cert/lib/cert/runner.rb +14 -14
- data/credentials_manager/lib/credentials_manager/account_manager.rb +11 -11
- data/credentials_manager/lib/credentials_manager/appfile_config.rb +11 -11
- data/credentials_manager/lib/credentials_manager/cli.rb +4 -4
- data/deliver/lib/deliver/app_screenshot.rb +19 -2
- data/deliver/lib/deliver/commands_generator.rb +2 -2
- data/deliver/lib/deliver/loader.rb +2 -2
- data/deliver/lib/deliver/options.rb +2 -2
- data/deliver/lib/deliver/setup.rb +1 -1
- data/deliver/lib/deliver/submit_for_review.rb +1 -1
- data/fastlane/lib/fastlane/action.rb +2 -2
- data/fastlane/lib/fastlane/actions/actions_helper.rb +5 -5
- data/fastlane/lib/fastlane/actions/add_extra_platforms.rb +2 -2
- data/fastlane/lib/fastlane/actions/add_git_tag.rb +1 -1
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +1 -1
- data/fastlane/lib/fastlane/actions/appaloosa.rb +4 -4
- data/fastlane/lib/fastlane/actions/appetize.rb +3 -3
- data/fastlane/lib/fastlane/actions/appetize_viewing_url_generator.rb +2 -2
- data/fastlane/lib/fastlane/actions/appium.rb +2 -2
- data/fastlane/lib/fastlane/actions/appledoc.rb +3 -3
- data/fastlane/lib/fastlane/actions/apteligent.rb +2 -2
- data/fastlane/lib/fastlane/actions/artifactory.rb +2 -2
- data/fastlane/lib/fastlane/actions/backup_xcarchive.rb +1 -1
- data/fastlane/lib/fastlane/actions/build_ios_app.rb +1 -1
- data/fastlane/lib/fastlane/actions/capture_ios_screenshots.rb +1 -1
- data/fastlane/lib/fastlane/actions/carthage.rb +4 -4
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +4 -4
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +1 -1
- data/fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb +1 -1
- data/fastlane/lib/fastlane/actions/cloc.rb +1 -1
- data/fastlane/lib/fastlane/actions/cocoapods.rb +1 -1
- data/fastlane/lib/fastlane/actions/commit_github_file.rb +4 -4
- data/fastlane/lib/fastlane/actions/commit_version_bump.rb +7 -7
- data/fastlane/lib/fastlane/actions/copy_artifacts.rb +1 -1
- data/fastlane/lib/fastlane/actions/crashlytics.rb +2 -2
- data/fastlane/lib/fastlane/actions/debug.rb +2 -2
- data/fastlane/lib/fastlane/actions/delete_keychain.rb +1 -1
- data/fastlane/lib/fastlane/actions/deploygate.rb +7 -7
- data/fastlane/lib/fastlane/actions/docs/cert.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/deliver.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/frameit.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/gym.md +1 -3
- data/fastlane/lib/fastlane/actions/docs/match.md +4 -4
- data/fastlane/lib/fastlane/actions/docs/pem.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/precheck.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/produce.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/scan.md +0 -2
- data/fastlane/lib/fastlane/actions/docs/sigh.md +6 -6
- data/fastlane/lib/fastlane/actions/docs/snapshot.md +4 -4
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +1 -1
- data/fastlane/lib/fastlane/actions/dsym_zip.rb +1 -1
- data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +1 -1
- data/fastlane/lib/fastlane/actions/flock.rb +7 -7
- data/fastlane/lib/fastlane/actions/frame_screenshots.rb +1 -1
- data/fastlane/lib/fastlane/actions/gcovr.rb +5 -5
- data/fastlane/lib/fastlane/actions/get_build_number.rb +2 -2
- data/fastlane/lib/fastlane/actions/get_build_number_repository.rb +9 -9
- data/fastlane/lib/fastlane/actions/get_github_release.rb +2 -2
- data/fastlane/lib/fastlane/actions/get_info_plist_value.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_version_number.rb +7 -7
- data/fastlane/lib/fastlane/actions/github_api.rb +2 -2
- data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +2 -2
- data/fastlane/lib/fastlane/actions/hockey.rb +5 -5
- data/fastlane/lib/fastlane/actions/ifttt.rb +4 -4
- data/fastlane/lib/fastlane/actions/increment_build_number.rb +3 -3
- data/fastlane/lib/fastlane/actions/increment_version_number.rb +4 -4
- data/fastlane/lib/fastlane/actions/install_on_device.rb +2 -2
- data/fastlane/lib/fastlane/actions/install_xcode_plugin.rb +2 -2
- data/fastlane/lib/fastlane/actions/installr.rb +6 -6
- data/fastlane/lib/fastlane/actions/ipa.rb +1 -1
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +1 -1
- data/fastlane/lib/fastlane/actions/lcov.rb +1 -1
- data/fastlane/lib/fastlane/actions/mailgun.rb +3 -3
- data/fastlane/lib/fastlane/actions/modify_services.rb +1 -1
- data/fastlane/lib/fastlane/actions/notification.rb +1 -1
- data/fastlane/lib/fastlane/actions/number_of_commits.rb +1 -1
- data/fastlane/lib/fastlane/actions/onesignal.rb +1 -1
- data/fastlane/lib/fastlane/actions/pod_push.rb +1 -1
- data/fastlane/lib/fastlane/actions/podio_item.rb +6 -6
- data/fastlane/lib/fastlane/actions/puts.rb +1 -1
- data/fastlane/lib/fastlane/actions/read_podspec.rb +1 -1
- data/fastlane/lib/fastlane/actions/recreate_schemes.rb +1 -1
- data/fastlane/lib/fastlane/actions/reset_git_repo.rb +1 -1
- data/fastlane/lib/fastlane/actions/restore_file.rb +1 -1
- data/fastlane/lib/fastlane/actions/rocket.rb +2 -2
- data/fastlane/lib/fastlane/actions/run_tests.rb +1 -1
- data/fastlane/lib/fastlane/actions/s3.rb +1 -1
- data/fastlane/lib/fastlane/actions/scp.rb +2 -2
- data/fastlane/lib/fastlane/actions/set_build_number_repository.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_changelog.rb +2 -2
- data/fastlane/lib/fastlane/actions/set_github_release.rb +4 -4
- data/fastlane/lib/fastlane/actions/set_info_plist_value.rb +2 -2
- data/fastlane/lib/fastlane/actions/set_pod_key.rb +1 -1
- data/fastlane/lib/fastlane/actions/setup_circle_ci.rb +4 -4
- data/fastlane/lib/fastlane/actions/setup_jenkins.rb +6 -6
- data/fastlane/lib/fastlane/actions/setup_travis.rb +2 -2
- data/fastlane/lib/fastlane/actions/slack.rb +3 -3
- data/fastlane/lib/fastlane/actions/slather.rb +2 -2
- data/fastlane/lib/fastlane/actions/spm.rb +2 -2
- data/fastlane/lib/fastlane/actions/ssh.rb +1 -1
- data/fastlane/lib/fastlane/actions/team_id.rb +1 -1
- data/fastlane/lib/fastlane/actions/team_name.rb +1 -1
- data/fastlane/lib/fastlane/actions/testfairy.rb +7 -7
- data/fastlane/lib/fastlane/actions/tryouts.rb +6 -6
- data/fastlane/lib/fastlane/actions/update_app_group_identifiers.rb +2 -2
- data/fastlane/lib/fastlane/actions/update_fastlane.rb +5 -5
- data/fastlane/lib/fastlane/actions/update_icloud_container_identifiers.rb +10 -10
- data/fastlane/lib/fastlane/actions/update_info_plist.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_url_schemes.rb +1 -1
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +4 -4
- data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +4 -4
- data/fastlane/lib/fastlane/actions/verify_build.rb +6 -6
- data/fastlane/lib/fastlane/actions/verify_pod_keys.rb +1 -1
- data/fastlane/lib/fastlane/actions/version_bump_podspec.rb +3 -3
- data/fastlane/lib/fastlane/actions/version_get_podspec.rb +2 -2
- data/fastlane/lib/fastlane/actions/xcode_select.rb +2 -2
- data/fastlane/lib/fastlane/actions/xcode_server_get_assets.rb +3 -3
- data/fastlane/lib/fastlane/actions/xcov.rb +1 -1
- data/fastlane/lib/fastlane/actions/xctool.rb +1 -1
- data/fastlane/lib/fastlane/actions/xcversion.rb +1 -1
- data/fastlane/lib/fastlane/actions/zip.rb +3 -3
- data/fastlane/lib/fastlane/auto_complete.rb +15 -15
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +15 -15
- data/fastlane/lib/fastlane/command_line_handler.rb +1 -1
- data/fastlane/lib/fastlane/commands_generator.rb +26 -26
- data/fastlane/lib/fastlane/configuration_helper.rb +2 -2
- data/fastlane/lib/fastlane/documentation/actions_list.rb +47 -47
- data/fastlane/lib/fastlane/documentation/docs_generator.rb +1 -1
- data/fastlane/lib/fastlane/environment_printer.rb +5 -5
- data/fastlane/lib/fastlane/fast_file.rb +5 -5
- data/fastlane/lib/fastlane/fastlane_require.rb +2 -2
- data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +3 -3
- data/fastlane/lib/fastlane/helper/podspec_helper.rb +1 -1
- data/fastlane/lib/fastlane/helper/sh_helper.rb +2 -2
- data/fastlane/lib/fastlane/helper/xcversion_helper.rb +1 -1
- data/fastlane/lib/fastlane/lane.rb +6 -6
- data/fastlane/lib/fastlane/lane_list.rb +3 -3
- data/fastlane/lib/fastlane/lane_manager.rb +7 -7
- data/fastlane/lib/fastlane/lane_manager_base.rb +15 -15
- data/fastlane/lib/fastlane/markdown_table_formatter.rb +2 -2
- data/fastlane/lib/fastlane/new_action.rb +5 -5
- data/fastlane/lib/fastlane/one_off.rb +1 -1
- data/fastlane/lib/fastlane/plugins/plugin_generator.rb +5 -5
- data/fastlane/lib/fastlane/plugins/plugin_generator_ui.rb +2 -2
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +7 -7
- data/fastlane/lib/fastlane/plugins/plugin_search.rb +5 -5
- data/fastlane/lib/fastlane/plugins/plugin_update_manager.rb +4 -4
- data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +9 -8
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +37 -2
- data/fastlane/lib/fastlane/plugins/template/Gemfile +1 -1
- data/fastlane/lib/fastlane/plugins/template/Rakefile +1 -1
- data/fastlane/lib/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%/actions/%plugin_name%_action.rb.erb +3 -0
- data/fastlane/lib/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%/helper/%plugin_name%_helper.rb.erb +4 -0
- data/fastlane/lib/fastlane/plugins/template/spec/spec_helper.rb.erb +1 -1
- data/fastlane/lib/fastlane/runner.rb +9 -9
- data/fastlane/lib/fastlane/setup/crashlytics_beta.rb +9 -9
- data/fastlane/lib/fastlane/setup/crashlytics_beta_command_line_handler.rb +7 -7
- data/fastlane/lib/fastlane/setup/crashlytics_beta_info_collector.rb +19 -19
- data/fastlane/lib/fastlane/setup/crashlytics_beta_ui.rb +3 -3
- data/fastlane/lib/fastlane/setup/setup_android.rb +4 -4
- data/fastlane/lib/fastlane/setup/setup_ios.rb +9 -9
- data/fastlane/lib/fastlane/supported_platforms.rb +1 -1
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +10 -6
- data/fastlane/lib/fastlane/swift_lane_manager.rb +1 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane_core/README.md +0 -26
- data/fastlane_core/lib/fastlane_core/analytics/analytics_ingester_client.rb +2 -2
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +1 -1
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +2 -2
- data/fastlane_core/lib/fastlane_core/command_executor.rb +3 -3
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +4 -4
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +4 -4
- data/fastlane_core/lib/fastlane_core/configuration/configuration_file.rb +4 -4
- data/fastlane_core/lib/fastlane_core/core_ext/cfpropertylist.rb +3 -3
- data/fastlane_core/lib/fastlane_core/device_manager.rb +2 -4
- data/fastlane_core/lib/fastlane_core/fastlane_folder.rb +1 -1
- data/fastlane_core/lib/fastlane_core/globals.rb +3 -3
- data/fastlane_core/lib/fastlane_core/helper.rb +1 -1
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +1 -1
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +2 -2
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +2 -2
- data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +1 -1
- data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +1 -1
- data/fastlane_core/lib/fastlane_core/print_table.rb +5 -5
- data/fastlane_core/lib/fastlane_core/project.rb +7 -7
- data/fastlane_core/lib/fastlane_core/swag.rb +9 -9
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +49 -49
- data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +18 -18
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +1 -1
- data/fastlane_core/lib/fastlane_core/update_checker/changelog.rb +7 -7
- data/fastlane_core/lib/fastlane_core/update_checker/update_checker.rb +11 -11
- data/frameit/lib/frameit/commands_generator.rb +2 -2
- data/frameit/lib/frameit/config_parser.rb +11 -11
- data/frameit/lib/frameit/dependency_checker.rb +7 -7
- data/frameit/lib/frameit/editor.rb +41 -41
- data/frameit/lib/frameit/frame_downloader.rb +12 -12
- data/frameit/lib/frameit/mac_editor.rb +2 -2
- data/frameit/lib/frameit/options.rb +1 -1
- data/frameit/lib/frameit/runner.rb +7 -7
- data/frameit/lib/frameit/screenshot.rb +5 -5
- data/frameit/lib/frameit/strings_parser.rb +6 -6
- data/frameit/lib/frameit/template_finder.rb +3 -3
- data/gym/lib/gym/commands_generator.rb +4 -4
- data/gym/lib/gym/detect_values.rb +1 -1
- data/gym/lib/gym/error_handler.rb +84 -84
- data/gym/lib/gym/generators/build_command_generator.rb +1 -1
- data/gym/lib/gym/runner.rb +24 -24
- data/gym/lib/gym/xcodebuild_fixes/generic_archive_fix.rb +2 -2
- data/match/lib/assets/READMETemplate.md +3 -3
- data/match/lib/match/commands_generator.rb +3 -3
- data/match/lib/match/encrypt.rb +10 -10
- data/match/lib/match/git_helper.rb +5 -5
- data/match/lib/match/nuke.rb +29 -29
- data/match/lib/match/runner.rb +13 -13
- data/match/lib/match/setup.rb +7 -7
- data/match/lib/match/table_printer.rb +6 -6
- data/match/lib/match/utils.rb +2 -2
- data/pem/lib/pem/commands_generator.rb +1 -1
- data/pem/lib/pem/manager.rb +9 -9
- data/pem/lib/pem/module.rb +1 -1
- data/pilot/lib/pilot/build_manager.rb +8 -8
- data/pilot/lib/pilot/commands_generator.rb +1 -1
- data/pilot/lib/pilot/manager.rb +1 -1
- data/pilot/lib/pilot/options.rb +4 -4
- data/pilot/lib/pilot/tester_manager.rb +10 -10
- data/precheck/lib/precheck/commands_generator.rb +4 -4
- data/precheck/lib/precheck/rule.rb +2 -2
- data/precheck/lib/precheck/rule_processor.rb +7 -7
- data/precheck/lib/precheck/rules/abstract_text_match_rule.rb +2 -2
- data/precheck/lib/precheck/rules/curse_words_rule.rb +3 -3
- data/precheck/lib/precheck/rules/unreachable_urls_rule.rb +3 -3
- data/precheck/lib/precheck/runner.rb +7 -7
- data/produce/lib/produce/commands_generator.rb +48 -48
- data/produce/lib/produce/developer_center.rb +4 -4
- data/produce/lib/produce/group.rb +2 -2
- data/produce/lib/produce/itunes_connect.rb +4 -4
- data/produce/lib/produce/options.rb +3 -3
- data/produce/lib/produce/service.rb +1 -1
- data/scan/lib/scan/commands_generator.rb +2 -2
- data/scan/lib/scan/error_handler.rb +12 -12
- data/scan/lib/scan/runner.rb +3 -3
- data/scan/lib/scan/slack_poster.rb +2 -2
- data/scan/lib/scan/test_command_generator.rb +1 -1
- data/screengrab/lib/screengrab/commands_generator.rb +1 -1
- data/screengrab/lib/screengrab/dependency_checker.rb +9 -9
- data/screengrab/lib/screengrab/options.rb +3 -3
- data/screengrab/lib/screengrab/reports_generator.rb +2 -2
- data/screengrab/lib/screengrab/runner.rb +32 -32
- data/sigh/lib/sigh/commands_generator.rb +18 -18
- data/sigh/lib/sigh/download_all.rb +4 -4
- data/sigh/lib/sigh/local_manage.rb +27 -27
- data/sigh/lib/sigh/manager.rb +1 -1
- data/sigh/lib/sigh/repair.rb +6 -6
- data/sigh/lib/sigh/resign.rb +7 -7
- data/sigh/lib/sigh/runner.rb +26 -26
- data/snapshot/lib/snapshot/collector.rb +7 -7
- data/snapshot/lib/snapshot/commands_generator.rb +7 -7
- data/snapshot/lib/snapshot/dependency_checker.rb +34 -19
- data/snapshot/lib/snapshot/detect_values.rb +2 -0
- data/snapshot/lib/snapshot/error_handler.rb +1 -1
- data/snapshot/lib/snapshot/fixes/hardware_keyboard_fix.rb +1 -1
- data/snapshot/lib/snapshot/fixes/simulator_zoom_fix.rb +1 -1
- data/snapshot/lib/snapshot/reports_generator.rb +2 -2
- data/snapshot/lib/snapshot/reset_simulators.rb +2 -2
- data/snapshot/lib/snapshot/runner.rb +14 -14
- data/snapshot/lib/snapshot/screenshot_flatten.rb +1 -1
- data/snapshot/lib/snapshot/screenshot_rotate.rb +6 -6
- data/snapshot/lib/snapshot/setup.rb +16 -16
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +1 -1
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +7 -7
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_xcode_8.rb +4 -4
- data/snapshot/lib/snapshot/update.rb +8 -8
- data/spaceship/lib/spaceship/base.rb +3 -3
- data/spaceship/lib/spaceship/client.rb +17 -17
- data/spaceship/lib/spaceship/commands_generator.rb +1 -1
- data/spaceship/lib/spaceship/du/du_client.rb +6 -3
- data/spaceship/lib/spaceship/globals.rb +1 -1
- data/spaceship/lib/spaceship/playground.rb +18 -18
- data/spaceship/lib/spaceship/portal/certificate.rb +5 -5
- data/spaceship/lib/spaceship/portal/device.rb +2 -2
- data/spaceship/lib/spaceship/portal/portal_client.rb +7 -7
- data/spaceship/lib/spaceship/portal/provisioning_profile.rb +7 -9
- data/spaceship/lib/spaceship/portal/ui/select_team.rb +13 -13
- data/spaceship/lib/spaceship/spaceauth_runner.rb +16 -16
- data/spaceship/lib/spaceship/test_flight/client.rb +9 -9
- data/spaceship/lib/spaceship/tunes/app_details.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_version.rb +7 -7
- data/spaceship/lib/spaceship/tunes/app_version_common.rb +1 -1
- data/spaceship/lib/spaceship/tunes/application.rb +1 -1
- data/spaceship/lib/spaceship/tunes/device_type.rb +2 -2
- data/spaceship/lib/spaceship/tunes/iap_detail.rb +1 -1
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +54 -54
- data/spaceship/lib/spaceship/two_step_client.rb +19 -19
- data/spaceship/lib/spaceship/ui.rb +1 -1
- data/supply/lib/supply/client.rb +1 -1
- data/supply/lib/supply/commands_generator.rb +1 -1
- data/supply/lib/supply/options.rb +14 -14
- data/supply/lib/supply/uploader.rb +3 -3
- metadata +31 -25
- data/fastlane/lib/.DS_Store +0 -0
- data/fastlane/lib/assets/.DS_Store +0 -0
- data/fastlane/lib/fastlane/.DS_Store +0 -0
- data/fastlane/lib/fastlane/actions/.DS_Store +0 -0
- data/fastlane/lib/fastlane/actions/docs/.DS_Store +0 -0
- data/fastlane/lib/fastlane/setup/.DS_Store +0 -0
- data/fastlane_core/lib/.DS_Store +0 -0
- data/fastlane_core/lib/fastlane_core/.DS_Store +0 -0
@@ -90,7 +90,7 @@ module Spaceship
|
|
90
90
|
# should it be an ios or an osx app
|
91
91
|
|
92
92
|
def create!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil, platform: nil, itunes_connect_users: nil)
|
93
|
-
puts
|
93
|
+
puts("The `version` parameter is deprecated. Use `ensure_version!` method instead") if version
|
94
94
|
client.create_application!(name: name,
|
95
95
|
primary_language: primary_language,
|
96
96
|
sku: sku,
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module Spaceship
|
2
2
|
module Tunes
|
3
3
|
class DeviceType
|
4
|
-
@types = ['iphone4', 'iphone35', 'iphone6', 'iphone6Plus', 'iphone58', 'ipad', 'ipadPro', 'watch', 'appleTV', 'desktop']
|
4
|
+
@types = ['iphone4', 'iphone35', 'iphone6', 'iphone6Plus', 'iphone58', 'ipad', 'ipadPro', 'ipad105', 'watch', 'appleTV', 'desktop']
|
5
5
|
class << self
|
6
6
|
attr_accessor :types
|
7
7
|
|
8
8
|
def exists?(type)
|
9
|
-
types.include?
|
9
|
+
types.include?(type)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -195,7 +195,7 @@ module Spaceship
|
|
195
195
|
|
196
196
|
if @review_screenshot
|
197
197
|
# Upload Screenshot
|
198
|
-
upload_file = UploadFile.from_path
|
198
|
+
upload_file = UploadFile.from_path(@review_screenshot)
|
199
199
|
screenshot_data = client.upload_purchase_review_screenshot(application.apple_id, upload_file)
|
200
200
|
raw_data["versions"][0]["reviewScreenshot"] = screenshot_data
|
201
201
|
end
|
@@ -61,19 +61,19 @@ module Spaceship
|
|
61
61
|
t_name = (ENV['FASTLANE_ITC_TEAM_NAME'] || '').strip
|
62
62
|
|
63
63
|
if t_name.length > 0 && t_id.length.zero? # we prefer IDs over names, they are unique
|
64
|
-
puts
|
64
|
+
puts("Looking for iTunes Connect Team with name #{t_name}") if Spaceship::Globals.verbose?
|
65
65
|
|
66
66
|
teams.each do |t|
|
67
67
|
t_id = t['contentProvider']['contentProviderId'].to_s if t['contentProvider']['name'].casecmp(t_name.downcase).zero?
|
68
68
|
end
|
69
69
|
|
70
|
-
puts
|
70
|
+
puts("Could not find team with name '#{t_name}', trying to fallback to default team") if t_id.length.zero?
|
71
71
|
end
|
72
72
|
|
73
73
|
t_id = teams.first['contentProvider']['contentProviderId'].to_s if teams.count == 1
|
74
74
|
|
75
75
|
if t_id.length > 0
|
76
|
-
puts
|
76
|
+
puts("Looking for iTunes Connect Team with ID #{t_id}") if Spaceship::Globals.verbose?
|
77
77
|
|
78
78
|
# actually set the team id here
|
79
79
|
self.team_id = t_id
|
@@ -82,24 +82,24 @@ module Spaceship
|
|
82
82
|
|
83
83
|
# user didn't specify a team... #thisiswhywecanthavenicethings
|
84
84
|
loop do
|
85
|
-
puts
|
86
|
-
puts
|
87
|
-
puts
|
85
|
+
puts("Multiple iTunes Connect teams found, please enter the number of the team you want to use: ")
|
86
|
+
puts("Note: to automatically choose the team, provide either the iTunes Connect Team ID, or the Team Name in your fastlane/Appfile:")
|
87
|
+
puts("Alternatively you can pass the team name or team ID using the `FASTLANE_ITC_TEAM_ID` or `FASTLANE_ITC_TEAM_NAME` environment variable")
|
88
88
|
first_team = teams.first["contentProvider"]
|
89
|
-
puts
|
90
|
-
puts
|
91
|
-
puts
|
92
|
-
puts
|
93
|
-
puts
|
94
|
-
puts
|
95
|
-
puts
|
89
|
+
puts("")
|
90
|
+
puts(" itc_team_id \"#{first_team['contentProviderId']}\"")
|
91
|
+
puts("")
|
92
|
+
puts("or")
|
93
|
+
puts("")
|
94
|
+
puts(" itc_team_name \"#{first_team['name']}\"")
|
95
|
+
puts("")
|
96
96
|
teams.each_with_index do |team, i|
|
97
|
-
puts
|
97
|
+
puts("#{i + 1}) \"#{team['contentProvider']['name']}\" (#{team['contentProvider']['contentProviderId']})")
|
98
98
|
end
|
99
99
|
|
100
100
|
unless Spaceship::Client::UserInterface.interactive?
|
101
|
-
puts
|
102
|
-
puts
|
101
|
+
puts("Multiple teams found on iTunes Connect, Your Terminal is running in non-interactive mode! Cannot continue from here.")
|
102
|
+
puts("Please check that you set FASTLANE_ITC_TEAM_ID or FASTLANE_ITC_TEAM_NAME to the right value.")
|
103
103
|
raise "Multiple iTunes Connect Teams found; unable to choose, terminal not ineractive!"
|
104
104
|
end
|
105
105
|
|
@@ -151,7 +151,7 @@ module Spaceship
|
|
151
151
|
# Patience is a virtue.
|
152
152
|
def handle_itc_response(raw, flaky_api_call: false)
|
153
153
|
return unless raw
|
154
|
-
return unless raw.kind_of?
|
154
|
+
return unless raw.kind_of?(Hash)
|
155
155
|
|
156
156
|
data = raw['data'] || raw # sometimes it's with data, sometimes it isn't
|
157
157
|
error_keys_to_check = [
|
@@ -184,7 +184,7 @@ module Spaceship
|
|
184
184
|
current_language ? "[#{current_language}]: #{current_error_message}" : current_error_message
|
185
185
|
end
|
186
186
|
end
|
187
|
-
elsif hash.kind_of?
|
187
|
+
elsif hash.kind_of?(Array)
|
188
188
|
hash.each do |value|
|
189
189
|
errors += handle_response_hash.call(value)
|
190
190
|
end
|
@@ -257,7 +257,7 @@ module Spaceship
|
|
257
257
|
|
258
258
|
def update_app_details!(app_id, data)
|
259
259
|
r = request(:post) do |req|
|
260
|
-
req.url
|
260
|
+
req.url("ra/apps/#{app_id}/details")
|
261
261
|
req.body = data.to_json
|
262
262
|
req.headers['Content-Type'] = 'application/json'
|
263
263
|
end
|
@@ -276,7 +276,7 @@ module Spaceship
|
|
276
276
|
# @param bundle_id (String): The bundle ID must match the one you used in Xcode. It
|
277
277
|
# can't be changed after you submit your first build.
|
278
278
|
def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil, platform: nil, itunes_connect_users: nil)
|
279
|
-
puts
|
279
|
+
puts("The `version` parameter is deprecated. Use `Spaceship::Tunes::Application.ensure_version!` method instead") if version
|
280
280
|
|
281
281
|
# First, we need to fetch the data from Apple, which we then modify with the user's values
|
282
282
|
primary_language ||= "English"
|
@@ -300,12 +300,12 @@ module Spaceship
|
|
300
300
|
|
301
301
|
unless itunes_connect_users.nil?
|
302
302
|
data['iTunesConnectUsers']['grantedAllUsers'] = false
|
303
|
-
data['iTunesConnectUsers']['grantedUsers'] = data['iTunesConnectUsers']['availableUsers'].select { |user| itunes_connect_users.include?
|
303
|
+
data['iTunesConnectUsers']['grantedUsers'] = data['iTunesConnectUsers']['availableUsers'].select { |user| itunes_connect_users.include?(user['username']) }
|
304
304
|
end
|
305
305
|
|
306
306
|
# Now send back the modified hash
|
307
307
|
r = request(:post) do |req|
|
308
|
-
req.url
|
308
|
+
req.url('ra/apps/create/v2')
|
309
309
|
req.body = data.to_json
|
310
310
|
req.headers['Content-Type'] = 'application/json'
|
311
311
|
end
|
@@ -316,7 +316,7 @@ module Spaceship
|
|
316
316
|
|
317
317
|
def create_version!(app_id, version_number, platform = 'ios')
|
318
318
|
r = request(:post) do |req|
|
319
|
-
req.url
|
319
|
+
req.url("ra/apps/#{app_id}/platforms/#{platform}/versions/create/")
|
320
320
|
req.body = {
|
321
321
|
version: {
|
322
322
|
value: version_number.to_s
|
@@ -404,7 +404,7 @@ module Spaceship
|
|
404
404
|
|
405
405
|
with_tunes_retry do
|
406
406
|
r = request(:post) do |req|
|
407
|
-
req.url
|
407
|
+
req.url("ra/apps/#{app_id}/platforms/ios/versions/#{version_id}")
|
408
408
|
req.body = data.to_json
|
409
409
|
req.headers['Content-Type'] = 'application/json'
|
410
410
|
end
|
@@ -433,7 +433,7 @@ module Spaceship
|
|
433
433
|
email: email
|
434
434
|
}
|
435
435
|
request(:post) do |req|
|
436
|
-
req.url
|
436
|
+
req.url("ra/users/itc/delete")
|
437
437
|
req.body = payload.to_json
|
438
438
|
req.headers['Content-Type'] = 'application/json'
|
439
439
|
end
|
@@ -467,7 +467,7 @@ module Spaceship
|
|
467
467
|
|
468
468
|
# send the changes back to Apple
|
469
469
|
r = request(:post) do |req|
|
470
|
-
req.url
|
470
|
+
req.url("ra/users/itc/create")
|
471
471
|
req.body = data.to_json
|
472
472
|
req.headers['Content-Type'] = 'application/json'
|
473
473
|
end
|
@@ -498,7 +498,7 @@ module Spaceship
|
|
498
498
|
|
499
499
|
# send the changes back to Apple
|
500
500
|
r = request(:post) do |req|
|
501
|
-
req.url
|
501
|
+
req.url("ra/users/itc/#{member.user_id}/roles")
|
502
502
|
req.body = data.to_json
|
503
503
|
req.headers['Content-Type'] = 'application/json'
|
504
504
|
end
|
@@ -533,7 +533,7 @@ module Spaceship
|
|
533
533
|
|
534
534
|
# send the changes back to Apple
|
535
535
|
r = request(:post) do |req|
|
536
|
-
req.url
|
536
|
+
req.url("ra/apps/#{app_id}/pricing/intervals")
|
537
537
|
req.body = data.to_json
|
538
538
|
req.headers['Content-Type'] = 'application/json'
|
539
539
|
end
|
@@ -600,7 +600,7 @@ module Spaceship
|
|
600
600
|
|
601
601
|
# send the changes back to Apple
|
602
602
|
r = request(:post) do |req|
|
603
|
-
req.url
|
603
|
+
req.url("ra/apps/#{app_id}/pricing/intervals")
|
604
604
|
req.body = data.to_json
|
605
605
|
req.headers['Content-Type'] = 'application/json'
|
606
606
|
end
|
@@ -802,7 +802,7 @@ module Spaceship
|
|
802
802
|
tries -= 1
|
803
803
|
if tries > 0
|
804
804
|
logger.warn("Received temporary server error from iTunes Connect. Retrying the request...")
|
805
|
-
sleep
|
805
|
+
sleep(3) unless Object.const_defined?("SpecHelper")
|
806
806
|
retry
|
807
807
|
end
|
808
808
|
end
|
@@ -818,7 +818,7 @@ module Spaceship
|
|
818
818
|
data.delete("dailySubmissionCountByPlatform")
|
819
819
|
|
820
820
|
r = request(:post) do |req|
|
821
|
-
req.url
|
821
|
+
req.url("ra/apps/#{app_id}/testingTypes/#{testing_type}/trains/")
|
822
822
|
req.body = data.to_json
|
823
823
|
req.headers['Content-Type'] = 'application/json'
|
824
824
|
end
|
@@ -828,7 +828,7 @@ module Spaceship
|
|
828
828
|
|
829
829
|
def remove_testflight_build_from_review!(app_id: nil, train: nil, build_number: nil, platform: 'ios')
|
830
830
|
r = request(:post) do |req|
|
831
|
-
req.url
|
831
|
+
req.url("ra/apps/#{app_id}/platforms/#{platform}/trains/#{train}/builds/#{build_number}/reject")
|
832
832
|
req.body = {}.to_json
|
833
833
|
req.headers['Content-Type'] = 'application/json'
|
834
834
|
end
|
@@ -877,7 +877,7 @@ module Spaceship
|
|
877
877
|
|
878
878
|
# Now send everything back to iTC
|
879
879
|
r = request(:post) do |req| # same URL, but a POST request
|
880
|
-
req.url
|
880
|
+
req.url(url)
|
881
881
|
req.body = build_info.to_json
|
882
882
|
req.headers['Content-Type'] = 'application/json'
|
883
883
|
end
|
@@ -946,7 +946,7 @@ module Spaceship
|
|
946
946
|
}
|
947
947
|
|
948
948
|
r = request(:post) do |req| # same URL, but a POST request
|
949
|
-
req.url
|
949
|
+
req.url("ra/apps/#{app_id}/platforms/#{platform}/trains/#{train}/builds/#{build_number}/review/submit")
|
950
950
|
|
951
951
|
req.body = review_info.to_json
|
952
952
|
req.headers['Content-Type'] = 'application/json'
|
@@ -958,7 +958,7 @@ module Spaceship
|
|
958
958
|
def get_build_info_for_review(app_id: nil, train: nil, build_number: nil, platform: 'ios')
|
959
959
|
url = "ra/apps/#{app_id}/platforms/#{platform}/trains/#{train}/builds/#{build_number}/testInformation"
|
960
960
|
r = request(:get) do |req|
|
961
|
-
req.url
|
961
|
+
req.url(url)
|
962
962
|
req.headers['Content-Type'] = 'application/json'
|
963
963
|
end
|
964
964
|
handle_itc_response(r.body)
|
@@ -975,7 +975,7 @@ module Spaceship
|
|
975
975
|
raise "version is required" unless version
|
976
976
|
|
977
977
|
r = request(:get) do |req|
|
978
|
-
req.url
|
978
|
+
req.url("ra/apps/#{app_id}/versions/#{version}/submit/summary")
|
979
979
|
req.headers['Content-Type'] = 'application/json'
|
980
980
|
end
|
981
981
|
|
@@ -988,7 +988,7 @@ module Spaceship
|
|
988
988
|
|
989
989
|
# ra/apps/1039164429/version/submit/complete
|
990
990
|
r = request(:post) do |req|
|
991
|
-
req.url
|
991
|
+
req.url("ra/apps/#{app_id}/versions/#{version}/submit/complete")
|
992
992
|
req.body = data.to_json
|
993
993
|
req.headers['Content-Type'] = 'application/json'
|
994
994
|
end
|
@@ -1019,7 +1019,7 @@ module Spaceship
|
|
1019
1019
|
raise "version is required" unless version
|
1020
1020
|
|
1021
1021
|
r = request(:post) do |req|
|
1022
|
-
req.url
|
1022
|
+
req.url("ra/apps/#{app_id}/versions/#{version}/releaseToStore")
|
1023
1023
|
req.headers['Content-Type'] = 'application/json'
|
1024
1024
|
req.body = app_id.to_s
|
1025
1025
|
end
|
@@ -1079,7 +1079,7 @@ module Spaceship
|
|
1079
1079
|
def update_iap_family!(app_id: nil, family_id: nil, data: nil)
|
1080
1080
|
with_tunes_retry do
|
1081
1081
|
r = request(:put) do |req|
|
1082
|
-
req.url
|
1082
|
+
req.url("ra/apps/#{app_id}/iaps/family/#{family_id}/")
|
1083
1083
|
req.body = data.to_json
|
1084
1084
|
req.headers['Content-Type'] = 'application/json'
|
1085
1085
|
end
|
@@ -1091,7 +1091,7 @@ module Spaceship
|
|
1091
1091
|
def update_iap!(app_id: nil, purchase_id: nil, data: nil)
|
1092
1092
|
with_tunes_retry do
|
1093
1093
|
r = request(:put) do |req|
|
1094
|
-
req.url
|
1094
|
+
req.url("ra/apps/#{app_id}/iaps/#{purchase_id}")
|
1095
1095
|
req.body = data.to_json
|
1096
1096
|
req.headers['Content-Type'] = 'application/json'
|
1097
1097
|
end
|
@@ -1109,7 +1109,7 @@ module Spaceship
|
|
1109
1109
|
data["details"]["value"] = versions
|
1110
1110
|
|
1111
1111
|
r = request(:post) do |req|
|
1112
|
-
req.url
|
1112
|
+
req.url("ra/apps/#{app_id}/iaps/family/")
|
1113
1113
|
req.body = data.to_json
|
1114
1114
|
req.headers['Content-Type'] = 'application/json'
|
1115
1115
|
end
|
@@ -1169,14 +1169,14 @@ module Spaceship
|
|
1169
1169
|
|
1170
1170
|
if review_screenshot
|
1171
1171
|
# Upload Screenshot:
|
1172
|
-
upload_file = UploadFile.from_path
|
1172
|
+
upload_file = UploadFile.from_path(review_screenshot)
|
1173
1173
|
screenshot_data = upload_purchase_review_screenshot(app_id, upload_file)
|
1174
1174
|
data["versions"][0]["reviewScreenshot"] = screenshot_data
|
1175
1175
|
end
|
1176
1176
|
|
1177
1177
|
# Now send back the modified hash
|
1178
1178
|
r = request(:post) do |req|
|
1179
|
-
req.url
|
1179
|
+
req.url("ra/apps/#{app_id}/iaps")
|
1180
1180
|
req.body = data.to_json
|
1181
1181
|
req.headers['Content-Type'] = 'application/json'
|
1182
1182
|
end
|
@@ -1195,7 +1195,7 @@ module Spaceship
|
|
1195
1195
|
def create_sandbox_tester!(tester_class: nil, email: nil, password: nil, first_name: nil, last_name: nil, country: nil)
|
1196
1196
|
url = tester_class.url[:create]
|
1197
1197
|
r = request(:post) do |req|
|
1198
|
-
req.url
|
1198
|
+
req.url(url)
|
1199
1199
|
req.body = {
|
1200
1200
|
user: {
|
1201
1201
|
emailAddress: { value: email },
|
@@ -1222,7 +1222,7 @@ module Spaceship
|
|
1222
1222
|
def delete_sandbox_testers!(tester_class, emails)
|
1223
1223
|
url = tester_class.url[:delete]
|
1224
1224
|
request(:post) do |req|
|
1225
|
-
req.url
|
1225
|
+
req.url(url)
|
1226
1226
|
req.body = emails.map do |email|
|
1227
1227
|
{
|
1228
1228
|
emailAddress: {
|
@@ -1264,7 +1264,7 @@ module Spaceship
|
|
1264
1264
|
}]
|
1265
1265
|
url = "ra/apps/#{app_id}/promocodes/versions"
|
1266
1266
|
r = request(:post) do |req|
|
1267
|
-
req.url
|
1267
|
+
req.url(url)
|
1268
1268
|
req.body = data.to_json
|
1269
1269
|
req.headers['Content-Type'] = 'application/json'
|
1270
1270
|
end
|
@@ -1285,7 +1285,7 @@ module Spaceship
|
|
1285
1285
|
raise "version is required" unless version
|
1286
1286
|
|
1287
1287
|
r = request(:post) do |req|
|
1288
|
-
req.url
|
1288
|
+
req.url("ra/apps/#{app_id}/versions/#{version}/reject")
|
1289
1289
|
req.headers['Content-Type'] = 'application/json'
|
1290
1290
|
req.body = app_id.to_s
|
1291
1291
|
end
|
@@ -1301,18 +1301,18 @@ module Spaceship
|
|
1301
1301
|
rescue Spaceship::TunesClient::ITunesConnectTemporaryError => ex
|
1302
1302
|
unless (tries -= 1).zero?
|
1303
1303
|
msg = "iTunes Connect temporary error received: '#{ex.message}'. Retrying after 60 seconds (remaining: #{tries})..."
|
1304
|
-
puts
|
1305
|
-
logger.warn
|
1306
|
-
sleep
|
1304
|
+
puts(msg)
|
1305
|
+
logger.warn(msg)
|
1306
|
+
sleep(60) unless Object.const_defined?("SpecHelper")
|
1307
1307
|
retry
|
1308
1308
|
end
|
1309
1309
|
raise ex # re-raise the exception
|
1310
1310
|
rescue Spaceship::TunesClient::ITunesConnectPotentialServerError => ex
|
1311
1311
|
unless (potential_server_error_tries -= 1).zero?
|
1312
1312
|
msg = "Potential server error received: '#{ex.message}'. Retrying after 10 seconds (remaining: #{tries})..."
|
1313
|
-
puts
|
1314
|
-
logger.warn
|
1315
|
-
sleep
|
1313
|
+
puts(msg)
|
1314
|
+
logger.warn(msg)
|
1315
|
+
sleep(10) unless Object.const_defined?("SpecHelper")
|
1316
1316
|
retry
|
1317
1317
|
end
|
1318
1318
|
raise ex
|
@@ -1361,7 +1361,7 @@ module Spaceship
|
|
1361
1361
|
}
|
1362
1362
|
|
1363
1363
|
r = request(:post) do |req|
|
1364
|
-
req.url
|
1364
|
+
req.url(url)
|
1365
1365
|
req.body = data.to_json
|
1366
1366
|
req.headers['Content-Type'] = 'application/json'
|
1367
1367
|
end
|
@@ -11,7 +11,7 @@ module Spaceship
|
|
11
11
|
@scnt = response["scnt"]
|
12
12
|
|
13
13
|
r = request(:get) do |req|
|
14
|
-
req.url
|
14
|
+
req.url("https://idmsa.apple.com/appleauth/auth")
|
15
15
|
update_request_headers(req)
|
16
16
|
end
|
17
17
|
|
@@ -31,8 +31,8 @@ module Spaceship
|
|
31
31
|
end
|
32
32
|
Tunes::RecoveryDevice.client = old_client
|
33
33
|
|
34
|
-
puts
|
35
|
-
puts
|
34
|
+
puts("Two Step Verification for account '#{self.user}' is enabled")
|
35
|
+
puts("Please select a device to verify your identity")
|
36
36
|
available = devices.collect do |c|
|
37
37
|
"#{c.name}\t#{c.model_name || 'SMS'}\t(#{c.device_id})"
|
38
38
|
end
|
@@ -48,14 +48,14 @@ module Spaceship
|
|
48
48
|
|
49
49
|
def handle_two_factor(response)
|
50
50
|
two_factor_url = "https://github.com/fastlane/fastlane/tree/master/spaceship#2-step-verification"
|
51
|
-
puts
|
51
|
+
puts("Two Factor Authentication for account '#{self.user}' is enabled")
|
52
52
|
|
53
53
|
if !File.exist?(persistent_cookie_path) && self.class.spaceship_session_env.to_s.length.zero?
|
54
|
-
puts
|
55
|
-
puts
|
54
|
+
puts("If you're running this in a non-interactive session (e.g. server or CI)")
|
55
|
+
puts("check out #{two_factor_url}")
|
56
56
|
else
|
57
57
|
# If the cookie is set but still required, the cookie is expired
|
58
|
-
puts
|
58
|
+
puts("Your session cookie has been expired.")
|
59
59
|
end
|
60
60
|
|
61
61
|
security_code = response.body["securityCode"]
|
@@ -65,11 +65,11 @@ module Spaceship
|
|
65
65
|
# "securityCodeLocked"=>false}
|
66
66
|
code_length = security_code["length"]
|
67
67
|
code = ask("Please enter the #{code_length} digit code: ")
|
68
|
-
puts
|
68
|
+
puts("Requesting session...")
|
69
69
|
|
70
70
|
# Send securityCode back to server to get a valid session
|
71
71
|
r = request(:post) do |req|
|
72
|
-
req.url
|
72
|
+
req.url("https://idmsa.apple.com/appleauth/auth/verify/trusteddevice/securitycode")
|
73
73
|
req.headers['Content-Type'] = 'application/json'
|
74
74
|
req.body = { "securityCode" => { "code" => code.to_s } }.to_json
|
75
75
|
|
@@ -88,7 +88,7 @@ module Spaceship
|
|
88
88
|
# Only needed for 2 step
|
89
89
|
def load_session_from_file
|
90
90
|
if File.exist?(persistent_cookie_path)
|
91
|
-
puts
|
91
|
+
puts("Loading session from '#{persistent_cookie_path}'") if Spaceship::Globals.verbose?
|
92
92
|
@cookie.load(persistent_cookie_path)
|
93
93
|
return true
|
94
94
|
end
|
@@ -97,7 +97,7 @@ module Spaceship
|
|
97
97
|
|
98
98
|
def load_session_from_env
|
99
99
|
return if self.class.spaceship_session_env.to_s.length == 0
|
100
|
-
puts
|
100
|
+
puts("Loading session from environment variable") if Spaceship::Globals.verbose?
|
101
101
|
|
102
102
|
file = Tempfile.new('cookie.yml')
|
103
103
|
file.write(self.class.spaceship_session_env.gsub("\\n", "\n"))
|
@@ -106,8 +106,8 @@ module Spaceship
|
|
106
106
|
begin
|
107
107
|
@cookie.load(file.path)
|
108
108
|
rescue => ex
|
109
|
-
puts
|
110
|
-
puts
|
109
|
+
puts("Error loading session from environment")
|
110
|
+
puts("Make sure to pass the session in a valid format")
|
111
111
|
raise ex
|
112
112
|
ensure
|
113
113
|
file.unlink
|
@@ -123,7 +123,7 @@ module Spaceship
|
|
123
123
|
def select_device(r, device_id)
|
124
124
|
# Request Token
|
125
125
|
r = request(:put) do |req|
|
126
|
-
req.url
|
126
|
+
req.url("https://idmsa.apple.com/appleauth/auth/verify/device/#{device_id}/securitycode")
|
127
127
|
update_request_headers(req)
|
128
128
|
end
|
129
129
|
|
@@ -131,13 +131,13 @@ module Spaceship
|
|
131
131
|
# since this might be from the Dev Portal, but for 2 step
|
132
132
|
Spaceship::TunesClient.new.handle_itc_response(r.body)
|
133
133
|
|
134
|
-
puts
|
134
|
+
puts("Successfully requested notification")
|
135
135
|
code = ask("Please enter the 4 digit code: ")
|
136
|
-
puts
|
136
|
+
puts("Requesting session...")
|
137
137
|
|
138
138
|
# Send token back to server to get a valid session
|
139
139
|
r = request(:post) do |req|
|
140
|
-
req.url
|
140
|
+
req.url("https://idmsa.apple.com/appleauth/auth/verify/device/#{device_id}/securitycode")
|
141
141
|
req.body = { "code" => code.to_s }.to_json
|
142
142
|
req.headers['Content-Type'] = 'application/json'
|
143
143
|
|
@@ -166,7 +166,7 @@ module Spaceship
|
|
166
166
|
# }]
|
167
167
|
# }
|
168
168
|
if ex.to_s.include?("verification code") # to have a nicer output
|
169
|
-
puts
|
169
|
+
puts("Error: Incorrect verification code")
|
170
170
|
return select_device(r, device_id)
|
171
171
|
end
|
172
172
|
|
@@ -192,7 +192,7 @@ module Spaceship
|
|
192
192
|
# We actually only care about the DES value
|
193
193
|
|
194
194
|
request(:get) do |req|
|
195
|
-
req.url
|
195
|
+
req.url("https://idmsa.apple.com/appleauth/auth/2sv/trust")
|
196
196
|
|
197
197
|
update_request_headers(req)
|
198
198
|
end
|