fastlane 2.241.1 → 2.242.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -39
  3. data/cert/lib/cert/runner.rb +1 -1
  4. data/credentials_manager/README.md +3 -3
  5. data/credentials_manager/lib/credentials_manager/account_manager.rb +13 -3
  6. data/deliver/lib/deliver/runner.rb +5 -0
  7. data/fastlane/lib/assets/certificates/AppleIncRootCertificate.cer +0 -0
  8. data/fastlane/lib/assets/certificates/AppleRootCA-G3.cer +0 -0
  9. data/fastlane/lib/fastlane/action.rb +8 -6
  10. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +1 -1
  11. data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +0 -3
  12. data/fastlane/lib/fastlane/actions/clipboard.rb +1 -1
  13. data/fastlane/lib/fastlane/actions/commit_version_bump.rb +0 -1
  14. data/fastlane/lib/fastlane/actions/create_keychain.rb +20 -29
  15. data/fastlane/lib/fastlane/actions/delete_keychain.rb +5 -3
  16. data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -1
  17. data/fastlane/lib/fastlane/actions/docs/create_app_online.md +1 -1
  18. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +4 -4
  19. data/fastlane/lib/fastlane/actions/docs/get_provisioning_profile.md +1 -1
  20. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +1 -1
  21. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +12 -0
  22. data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +5 -4
  23. data/fastlane/lib/fastlane/actions/download_dsyms.rb +3 -1
  24. data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +1 -0
  25. data/fastlane/lib/fastlane/actions/git_pull.rb +1 -1
  26. data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +0 -1
  27. data/fastlane/lib/fastlane/actions/import_certificate.rb +18 -6
  28. data/fastlane/lib/fastlane/actions/import_from_gem.rb +70 -0
  29. data/fastlane/lib/fastlane/actions/jazzy.rb +1 -1
  30. data/fastlane/lib/fastlane/actions/lcov.rb +1 -1
  31. data/fastlane/lib/fastlane/actions/mailgun.rb +2 -2
  32. data/fastlane/lib/fastlane/actions/make_changelog_from_jenkins.rb +1 -1
  33. data/fastlane/lib/fastlane/actions/notarize.rb +55 -7
  34. data/fastlane/lib/fastlane/actions/prompt.rb +1 -1
  35. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +2 -2
  36. data/fastlane/lib/fastlane/actions/sh.rb +20 -2
  37. data/fastlane/lib/fastlane/actions/sourcedocs.rb +2 -2
  38. data/fastlane/lib/fastlane/actions/swiftlint.rb +5 -2
  39. data/fastlane/lib/fastlane/actions/unlock_keychain.rb +17 -29
  40. data/fastlane/lib/fastlane/actions/update_fastlane.rb +10 -3
  41. data/fastlane/lib/fastlane/actions/update_project_code_signing.rb +2 -1
  42. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +21 -18
  43. data/fastlane/lib/fastlane/actions/upload_app_privacy_details_to_app_store.rb +1 -1
  44. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +8 -2
  45. data/fastlane/lib/fastlane/actions/verify_build.rb +2 -1
  46. data/fastlane/lib/fastlane/actions/verify_pod_keys.rb +2 -1
  47. data/fastlane/lib/fastlane/actions/xcodebuild.rb +1 -1
  48. data/fastlane/lib/fastlane/cli_tools_distributor.rb +7 -0
  49. data/fastlane/lib/fastlane/commands_generator.rb +7 -1
  50. data/fastlane/lib/fastlane/environment_printer.rb +14 -14
  51. data/fastlane/lib/fastlane/fast_file.rb +35 -4
  52. data/fastlane/lib/fastlane/helper/sh_helper.rb +27 -45
  53. data/fastlane/lib/fastlane/lane_list.rb +1 -1
  54. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +2 -2
  55. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +0 -2
  56. data/fastlane/lib/fastlane/runner.rb +4 -6
  57. data/fastlane/lib/fastlane/server/socket_server.rb +57 -7
  58. data/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb +4 -4
  59. data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +3 -3
  60. data/fastlane/lib/fastlane/swift_lane_manager.rb +32 -11
  61. data/fastlane/lib/fastlane/version.rb +2 -1
  62. data/fastlane/swift/ArgumentProcessor.swift +10 -2
  63. data/fastlane/swift/Deliverfile.swift +1 -1
  64. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  65. data/fastlane/swift/Fastlane.swift +46 -152
  66. data/fastlane/swift/Gymfile.swift +1 -1
  67. data/fastlane/swift/GymfileProtocol.swift +1 -1
  68. data/fastlane/swift/MainProcess.swift +27 -0
  69. data/fastlane/swift/Matchfile.swift +1 -1
  70. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  71. data/fastlane/swift/Precheckfile.swift +1 -1
  72. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  73. data/fastlane/swift/RubyCommand.swift +1 -9
  74. data/fastlane/swift/RubyCommandable.swift +3 -2
  75. data/fastlane/swift/Runner.swift +1 -1
  76. data/fastlane/swift/Scanfile.swift +1 -1
  77. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  78. data/fastlane/swift/Screengrabfile.swift +1 -1
  79. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  80. data/fastlane/swift/Snapshotfile.swift +1 -1
  81. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  82. data/fastlane/swift/main.swift +1 -1
  83. data/fastlane_core/lib/fastlane_core/cert_checker.rb +40 -76
  84. data/fastlane_core/lib/fastlane_core/command_executor.rb +128 -7
  85. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +1 -1
  86. data/fastlane_core/lib/fastlane_core/configuration/configuration_file.rb +1 -1
  87. data/fastlane_core/lib/fastlane_core/device_manager.rb +14 -5
  88. data/fastlane_core/lib/fastlane_core/fastlane_pty.rb +25 -10
  89. data/fastlane_core/lib/fastlane_core/helper.rb +26 -2
  90. data/fastlane_core/lib/fastlane_core/ios_app_identifier_guesser.rb +1 -1
  91. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +41 -22
  92. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +48 -71
  93. data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +5 -1
  94. data/fastlane_core/lib/fastlane_core/print_table.rb +1 -1
  95. data/fastlane_core/lib/fastlane_core/queue_worker.rb +0 -2
  96. data/fastlane_core/lib/fastlane_core/stored_passwords.rb +29 -0
  97. data/fastlane_core/lib/fastlane_core/string_filters.rb +1 -2
  98. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +8 -4
  99. data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +2 -2
  100. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +1 -1
  101. data/frameit/lib/frameit/device_types.rb +11 -4
  102. data/frameit/lib/frameit/editor.rb +31 -12
  103. data/frameit/lib/frameit/frame_downloader.rb +4 -1
  104. data/gym/lib/gym/detect_values.rb +10 -10
  105. data/gym/lib/gym/options.rb +1 -7
  106. data/gym/lib/gym/runner.rb +6 -1
  107. data/match/lib/match/encryption/encryption.rb +6 -1
  108. data/match/lib/match/encryption/openssl.rb +8 -3
  109. data/match/lib/match/portal_fetcher.rb +12 -6
  110. data/match/lib/match/runner.rb +4 -1
  111. data/match/lib/match/storage/gitlab/secure_file.rb +2 -1
  112. data/match/lib/match/storage/google_cloud_storage.rb +1 -1
  113. data/match/lib/match/storage/interface.rb +10 -0
  114. data/match/lib/match/storage/s3_storage.rb +1 -1
  115. data/pem/lib/pem/manager.rb +3 -3
  116. data/precheck/lib/precheck/runner.rb +4 -2
  117. data/scan/lib/scan/detect_values.rb +0 -1
  118. data/scan/lib/scan/runner.rb +1 -0
  119. data/sigh/lib/assets/resign.sh +10 -3
  120. data/sigh/lib/sigh/manager.rb +5 -1
  121. data/sigh/lib/sigh/resign.rb +5 -21
  122. data/snapshot/lib/snapshot/reset_simulators.rb +5 -2
  123. data/snapshot/lib/snapshot/runner.rb +0 -1
  124. data/spaceship/lib/spaceship/base.rb +1 -1
  125. data/spaceship/lib/spaceship/client.rb +13 -4
  126. data/spaceship/lib/spaceship/connect_api/api_client.rb +12 -14
  127. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +1 -1
  128. data/spaceship/lib/spaceship/connect_api/models/user.rb +7 -3
  129. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +9 -11
  130. data/spaceship/lib/spaceship/connect_api/token.rb +21 -1
  131. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +3 -1
  132. data/spaceship/lib/spaceship/helper/plist_middleware.rb +2 -2
  133. data/spaceship/lib/spaceship/portal/portal_client.rb +8 -8
  134. data/spaceship/lib/spaceship/test_flight/client.rb +1 -5
  135. data/supply/lib/supply/client.rb +1 -1
  136. data/supply/lib/supply/options.rb +6 -0
  137. data/supply/lib/supply/uploader.rb +28 -2
  138. metadata +28 -25
  139. data/fastlane/lib/fastlane/actions/hockey.rb +0 -400
  140. data/fastlane/lib/fastlane/actions/typetalk.rb +0 -93
@@ -2,6 +2,7 @@ require 'logger'
2
2
  require 'colored'
3
3
  require 'tty-spinner'
4
4
  require 'pathname'
5
+ require 'fileutils'
5
6
 
6
7
  require_relative 'command_executor'
7
8
  require_relative 'fastlane_folder'
@@ -203,7 +204,7 @@ module FastlaneCore
203
204
  def self.swift_version
204
205
  if self.which('swift')
205
206
  output = `swift --version 2> /dev/null`
206
- return output.split("\n").first.match(/version ([0-9.]+)/).captures.first
207
+ return output.lines.first.to_s[/version ([0-9.]+)/, 1]
207
208
  end
208
209
  return nil
209
210
  end
@@ -263,6 +264,9 @@ module FastlaneCore
263
264
  result = File.expand_path(File.join(self.xcode_path, path))
264
265
  return result if File.exist?(result)
265
266
  end
267
+ if FastlaneCore::Env.truthy?("FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT")
268
+ UI.user_error!("Could not find transporter at #{self.xcode_path}: Xcode 14 and newer no longer include it. Remove FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT so fastlane uploads with altool, or install Transporter and set FASTLANE_ITUNES_TRANSPORTER_PATH.")
269
+ end
266
270
  UI.user_error!("Could not find transporter at #{self.xcode_path}. Please make sure you set the correct path to your Xcode installation.")
267
271
  elsif self.windows?
268
272
  [
@@ -344,6 +348,21 @@ module FastlaneCore
344
348
  str.gsub(/\e\[([;\d]+)?m/, '')
345
349
  end
346
350
 
351
+ # Opens path for writing, readable and writable only by its owner (0600), including when it
352
+ # already exists: the mode is set before anything is written. Windows has no such mode.
353
+ def self.open_owner_only(path, mode = "w", &block)
354
+ File.open(path, mode, 0o600) do |file|
355
+ file.chmod(0o600) unless windows?
356
+ yield(file)
357
+ end
358
+ end
359
+
360
+ # Creates dir and any missing parents accessible only by its owner (0700); an existing dir is restricted too
361
+ def self.mkdir_owner_only(dir)
362
+ FileUtils.mkdir_p(dir, mode: 0o700)
363
+ File.chmod(0o700, dir) unless windows?
364
+ end
365
+
347
366
  # Zips directory
348
367
  def self.zip_directory(path, output_path, contents_only: false, overwrite: false, print: true)
349
368
  if overwrite
@@ -362,7 +381,12 @@ module FastlaneCore
362
381
  end
363
382
 
364
383
  UI.command(command) unless print
365
- Helper.backticks(command, print: print)
384
+ FastlaneCore::CommandExecutor.execute(command: command,
385
+ print_all: print,
386
+ print_command: print,
387
+ error: proc do |output|
388
+ UI.user_error!("Could not zip '#{path}' to '#{output_path}':\n#{output}")
389
+ end)
366
390
  end
367
391
 
368
392
  # Executes the provided block after adjusting the ENV to have the
@@ -73,7 +73,7 @@ module FastlaneCore
73
73
  end
74
74
 
75
75
  def match_swift_application_id(text_line: nil)
76
- text_line.strip!
76
+ text_line = text_line.strip
77
77
  application_id_match = APP_ID_REGEX.match(text_line)
78
78
  return application_id_match[1].strip if application_id_match
79
79
 
@@ -58,31 +58,43 @@ module FastlaneCore
58
58
  # Runs preparations before executing any command from the executor.
59
59
  #
60
60
  # @param original_api_key [Hash] api key containing the issuer id and private key
61
- # @return [Hash] copy of `api_key` which includes an extra `key_dir` with the location of the .p8 file on disk
61
+ # @return [Hash] copy of `api_key` which includes an extra `key_dir` with the location of the .p8 file on disk,
62
+ # and `cleanup_path`: what #cleanup removes afterwards
62
63
  def prepare(original_api_key:)
63
64
  return if original_api_key.nil?
64
65
  # Create .p8 file from api_key and provide api key info which contains .p8 file path
65
66
  api_key = original_api_key.dup
67
+ p8_name = "AuthKey_#{api_key[:key_id]}.p8"
66
68
  if self.kind_of?(ShellScriptTransporterExecutor)
67
69
  # as of Transporter v3.3.0, the app is unable to detect the private keys under the 'private_keys' folder in current directory
68
70
  # so we must rely on the other search paths in the Home dir:
69
71
  # https://help.apple.com/itc/transporteruserguide/en.lproj/static.html#itc803b7be80
70
72
  private_keys_dir = File.join(Dir.home, ".appstoreconnect/private_keys")
71
73
  unless Dir.exist?(private_keys_dir)
72
- FileUtils.mkdir_p(private_keys_dir)
74
+ FileUtils.mkdir_p(private_keys_dir, mode: 0o700)
73
75
  end
74
76
  api_key[:key_dir] = private_keys_dir
77
+ # Keys already there belong to the user: only remove the one written below
78
+ p8_path = File.join(private_keys_dir, p8_name)
79
+ api_key[:cleanup_path] = p8_path unless File.exist?(p8_path)
75
80
  else
76
81
  api_key[:key_dir] = Dir.mktmpdir("deliver-")
82
+ api_key[:cleanup_path] = api_key[:key_dir]
77
83
  end
78
84
  # Specified p8 needs to be generated to call altool or iTMSTransporter
79
- File.open(File.join(api_key[:key_dir], "AuthKey_#{api_key[:key_id]}.p8"), "wb") do |p8|
80
- p8.write(api_key[:key])
81
- end
85
+ p8_path = File.join(api_key[:key_dir], p8_name)
86
+ Helper.open_owner_only(p8_path, "wb") { |p8| p8.write(api_key[:key]) }
82
87
  api_key
83
88
  end
84
89
 
85
- def execute(command, hide_output)
90
+ # Removes what #prepare wrote: its temporary directory, or the key file it added to ~/.appstoreconnect/private_keys
91
+ def cleanup(api_key)
92
+ return if api_key.nil? || api_key[:cleanup_path].nil?
93
+ FileUtils.rm_rf(api_key[:cleanup_path])
94
+ end
95
+
96
+ # @param env [Hash] environment for the command, such as the password it reads with -p @env:
97
+ def execute(command, hide_output, env: {})
86
98
  if Helper.test?
87
99
  yield(nil) if block_given?
88
100
  return command
@@ -99,7 +111,7 @@ module FastlaneCore
99
111
  end
100
112
 
101
113
  begin
102
- exit_status = FastlaneCore::FastlanePty.spawn(command) do |command_stdout, command_stdin, pid|
114
+ exit_status = FastlaneCore::FastlanePty.spawn(command, env: env) do |command_stdout, command_stdin, pid|
103
115
  begin
104
116
  command_stdout.each do |line|
105
117
  @all_lines << line
@@ -253,7 +265,8 @@ module FastlaneCore
253
265
 
254
266
  attr_reader :errors
255
267
 
256
- def execute(command, hide_output)
268
+ # @param env [Hash] environment for the command, such as the password it reads with -p @env:
269
+ def execute(command, hide_output, env: {})
257
270
  if Helper.test?
258
271
  yield(nil) if block_given?
259
272
  return command
@@ -269,7 +282,7 @@ module FastlaneCore
269
282
  end
270
283
 
271
284
  begin
272
- exit_status = FastlaneCore::FastlanePty.spawn(command) do |command_stdout, command_stdin, pid|
285
+ exit_status = FastlaneCore::FastlanePty.spawn(command, env: env) do |command_stdout, command_stdin, pid|
273
286
  command_stdout.each do |line|
274
287
  @all_lines << line
275
288
  parse_line(line, hide_output) # this is where the parsing happens
@@ -299,7 +312,8 @@ module FastlaneCore
299
312
 
300
313
  def build_credential_params(username = nil, password = nil, jwt = nil, api_key = nil)
301
314
  if !username.nil? && !password.nil? && api_key.nil?
302
- "-u #{username.shellescape} -p #{password.shellescape}"
315
+ # The password itself comes from the environment, see ItunesTransporter#password_environment
316
+ "-u #{username.shellescape} -p @env:ITMS_TRANSPORTER_PASSWORD"
303
317
  elsif !api_key.nil?
304
318
  # Individual API keys have no issuer_id; altool requires --apiIssuer
305
319
  # to be present, so we pass the key_id as a placeholder and add
@@ -568,7 +582,6 @@ module FastlaneCore
568
582
  credential_params = build_credential_params(username, password, jwt, api_key, is_default_itms_on_xcode_11?)
569
583
  if is_default_itms_on_xcode_11?
570
584
  [
571
- ("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" if jwt.to_s.empty?),
572
585
  'xcrun iTMSTransporter',
573
586
  '-m upload',
574
587
  credential_params,
@@ -606,7 +619,6 @@ module FastlaneCore
606
619
  credential_params = build_credential_params(username, password, jwt, nil, is_default_itms_on_xcode_11?)
607
620
  if is_default_itms_on_xcode_11?
608
621
  [
609
- ("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" if jwt.to_s.empty?),
610
622
  'xcrun iTMSTransporter',
611
623
  '-m verify',
612
624
  credential_params,
@@ -638,7 +650,6 @@ module FastlaneCore
638
650
  credential_params = build_credential_params(username, password, jwt, nil, is_default_itms_on_xcode_11?)
639
651
  if is_default_itms_on_xcode_11?
640
652
  [
641
- ("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" if jwt.to_s.empty?),
642
653
  'xcrun iTMSTransporter',
643
654
  '-m lookupMetadata',
644
655
  credential_params,
@@ -672,7 +683,6 @@ module FastlaneCore
672
683
  credential_params = build_credential_params(username, password, jwt, api_key, is_default_itms_on_xcode_11?)
673
684
  if is_default_itms_on_xcode_11?
674
685
  [
675
- ("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" if jwt.to_s.empty?),
676
686
  'xcrun iTMSTransporter',
677
687
  '-m provider',
678
688
  credential_params,
@@ -716,12 +726,12 @@ module FastlaneCore
716
726
  end
717
727
  end
718
728
 
719
- def execute(command, hide_output)
729
+ def execute(command, hide_output, env: {})
720
730
  # The Java command needs to be run starting in a working directory in the iTMSTransporter
721
731
  # file area. The shell script takes care of changing directories over to there, but we'll
722
732
  # handle it manually here for this strategy.
723
733
  FileUtils.cd(Helper.itms_path) do
724
- return super(command, hide_output)
734
+ return super(command, hide_output, env: env)
725
735
  end
726
736
  end
727
737
  end
@@ -757,6 +767,8 @@ module FastlaneCore
757
767
  use_shell_script ||= Helper.is_mac? && Helper.xcode_version.start_with?('6.')
758
768
  use_shell_script ||= Helper.windows?
759
769
  use_shell_script ||= Feature.enabled?('FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT')
770
+ # Transporter 2.0 and later bundles a Java that refuses the direct Java invocation; its own launcher works. See #15323.
771
+ use_shell_script ||= Helper.user_defined_itms_path?
760
772
 
761
773
  if jwt.to_s.empty? && api_key.nil?
762
774
  @user = user
@@ -796,7 +808,7 @@ module FastlaneCore
796
808
  UI.verbose(@transporter_executor.build_download_command(@user, password_placeholder, app_id, dir, @provider_short_name, jwt_placeholder))
797
809
 
798
810
  begin
799
- result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
811
+ result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?, env: password_environment)
800
812
  rescue TransporterRequiresApplicationSpecificPasswordError => ex
801
813
  handle_two_step_failure(ex)
802
814
  return download(app_id, dir)
@@ -863,13 +875,13 @@ module FastlaneCore
863
875
  UI.verbose(@transporter_executor.build_upload_command(@user, password_placeholder, actual_dir, upload_options_placeholder))
864
876
 
865
877
  begin
866
- result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
878
+ result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?, env: password_environment)
867
879
  rescue TransporterRequiresApplicationSpecificPasswordError => ex
868
880
  handle_two_step_failure(ex)
869
881
  return upload(app_id, dir, package_path: package_path, asset_path: asset_path)
870
882
  ensure
871
883
  if use_api_key
872
- FileUtils.rm_rf(api_key[:key_dir]) unless api_key.nil?
884
+ @transporter_executor.cleanup(api_key)
873
885
  end
874
886
  end
875
887
 
@@ -924,7 +936,7 @@ module FastlaneCore
924
936
  UI.verbose(@transporter_executor.build_verify_command(@user, password_placeholder, actual_dir, verify_options_placeholder))
925
937
 
926
938
  begin
927
- result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
939
+ result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?, env: password_environment)
928
940
  rescue TransporterRequiresApplicationSpecificPasswordError => ex
929
941
  handle_two_step_failure(ex)
930
942
  return verify(app_id, dir, package_path: package_path)
@@ -960,14 +972,14 @@ module FastlaneCore
960
972
 
961
973
  lines = []
962
974
  begin
963
- result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?) { |xs| lines = xs }
975
+ result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?, env: password_environment) { |xs| lines = xs }
964
976
  return result if Helper.test?
965
977
  rescue TransporterRequiresApplicationSpecificPasswordError => ex
966
978
  handle_two_step_failure(ex)
967
979
  return provider_ids
968
980
  ensure
969
981
  if use_api_key
970
- FileUtils.rm_rf(api_key[:key_dir]) unless api_key.nil?
982
+ @transporter_executor.cleanup(api_key)
971
983
  end
972
984
  end
973
985
 
@@ -978,6 +990,13 @@ module FastlaneCore
978
990
 
979
991
  TWO_FACTOR_ENV_VARIABLE = "FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"
980
992
 
993
+ # The password goes to the transporter in its environment, which altool and xcrun iTMSTransporter read through
994
+ # -p @env:ITMS_TRANSPORTER_PASSWORD, rather than on their command line
995
+ def password_environment
996
+ return {} if @password.to_s.empty?
997
+ { "ITMS_TRANSPORTER_PASSWORD" => @password }
998
+ end
999
+
981
1000
  # Returns whether altool should be used or ItunesTransporter should be used
982
1001
  def should_use_altool?(altool_compatible_command, use_shell_script)
983
1002
  # Xcode 14 no longer supports iTMSTransporter. Use altool instead
@@ -1,5 +1,5 @@
1
1
  require_relative 'helper'
2
- require 'open3'
2
+ require_relative 'stored_passwords'
3
3
  require 'security'
4
4
 
5
5
  module FastlaneCore
@@ -7,81 +7,57 @@ module FastlaneCore
7
7
  def self.import_file(path, keychain_path, keychain_password: nil, certificate_password: "", certificate_format: nil, skip_set_partition_list: false, output: FastlaneCore::Globals.verbose?)
8
8
  UI.user_error!("Could not find file '#{path}'") unless File.exist?(path)
9
9
 
10
- password_part = " -P #{certificate_password.shellescape}"
11
- certificate_format_part = certificate_format.to_s.strip.empty? ? "" : " -f #{certificate_format.shellescape}"
12
-
13
- command = "security import #{path.shellescape} -k #{keychain_path.shellescape}"
14
- command << password_part
15
- command << certificate_format_part
16
- command << " -T /usr/bin/codesign" # to not be asked for permission when running a tool like `gym` (before Sierra)
17
- command << " -T /usr/bin/security"
18
- command << " -T /usr/bin/productbuild" # to not be asked for permission when using an installer cert for macOS
19
- command << " -T /usr/bin/productsign" # to not be asked for permission when using an installer cert for macOS
20
- command << " 1> /dev/null" unless output
21
-
22
- sensitive_command = command.gsub(password_part, " -P ********")
23
- UI.command(sensitive_command) if output
24
- Open3.popen3(command) do |stdin, stdout, stderr, thrd|
25
- UI.command_output(stdout.read.to_s) if output
26
-
27
- # Set partition list only if success since it can be a time consuming process if a lot of keys are installed
28
- if thrd.value.success? && !skip_set_partition_list
29
- keychain_password ||= resolve_keychain_password(keychain_path)
30
- set_partition_list(path, keychain_path, keychain_password: keychain_password, output: output)
31
- else
32
- # Output verbose if file is already installed since not an error otherwise we will show the whole error
33
- err = stderr.read.to_s.strip
34
- if err.include?("SecKeychainItemImport") && err.include?("The specified item already exists in the keychain")
35
- UI.verbose("'#{File.basename(path)}' is already installed on this machine")
36
- else
37
- UI.error(err)
38
- end
39
- end
10
+ certificate_format = nil if certificate_format.to_s.strip.empty?
11
+ UI.command("security import #{path.shellescape} -k #{keychain_path.shellescape} -P ********#{" -f #{certificate_format}" if certificate_format}") if output
12
+
13
+ begin
14
+ Security::Certificate.import(path, keychain: keychain_path, password: certificate_password, format: certificate_format)
15
+ rescue Security::DuplicateItemError
16
+ UI.verbose("'#{File.basename(path)}' is already installed on this machine")
17
+ return
18
+ rescue Security::Error => e
19
+ UI.error(e.output.strip)
20
+ return
40
21
  end
22
+
23
+ # Set partition list only if success since it can be a time consuming process if a lot of keys are installed
24
+ return if skip_set_partition_list
25
+
26
+ keychain_password ||= resolve_keychain_password(keychain_path)
27
+ set_partition_list(path, keychain_path, keychain_password: keychain_password, output: output)
41
28
  end
42
29
 
30
+ # What `security` reports for a wrong keychain password, on older and newer macOS.
31
+ WRONG_KEYCHAIN_PASSWORD = ["SecKeychainItemSetAccessWithPassword", "The user name or passphrase you entered is not correct"]
32
+
43
33
  def self.set_partition_list(path, keychain_path, keychain_password: nil, output: FastlaneCore::Globals.verbose?)
44
34
  # When security supports partition lists, also add the partition IDs
45
35
  # See https://openradar.appspot.com/28524119
46
- if Helper.backticks('security -h | grep set-key-partition-list', print: false).length > 0
47
- password_part = " -k #{keychain_password.to_s.shellescape}"
48
-
49
- command = "security set-key-partition-list"
50
- command << " -S apple-tool:,apple:,codesign:"
51
- command << " -s" # This is a needed in Catalina to prevent "security: SecKeychainItemCopyAccess: A missing value was detected."
52
- command << password_part
53
- command << " #{keychain_path.shellescape}"
54
- command << " 1> /dev/null" # always disable stdout. This can be very verbose, and leak potentially sensitive info
55
-
56
- # Showing loading indicator as this can take some time if a lot of keys installed
57
- Helper.with_loading_indicator("Setting key partition list... (this can take a minute if there are a lot of keys installed)") do
58
- # Strip keychain password from command output
59
- sensitive_command = command.gsub(password_part, " -k ********")
60
- UI.command(sensitive_command) if output
61
- Open3.popen3(command) do |stdin, stdout, stderr, thrd|
62
- unless thrd.value.success?
63
- err = stderr.read.to_s.strip
64
-
65
- # Inform user when no/wrong password was used as its needed to prevent UI permission popup from Xcode when signing
66
- if err.include?("SecKeychainItemSetAccessWithPassword")
67
- keychain_name = File.basename(keychain_path, ".*")
68
- Security::InternetPassword.delete(server: server_name(keychain_name))
69
-
70
- UI.important("")
71
- UI.important("Could not configure imported keychain item (certificate) to prevent UI permission popup when code signing\n" \
72
- "Check if you supplied the correct `keychain_password` for keychain: `#{keychain_path}`\n" \
73
- "#{err}")
74
- UI.important("")
75
- UI.important("Please look at the following docs to see how to set a keychain password:")
76
- UI.important(" - https://docs.fastlane.tools/actions/sync_code_signing")
77
- UI.important(" - https://docs.fastlane.tools/actions/get_certificates")
78
- else
79
- UI.error(err)
80
- end
81
- end
82
- end
36
+ return unless Security::Keychain.supports_key_partition_list?
37
+
38
+ # Showing loading indicator as this can take some time if a lot of keys installed
39
+ Helper.with_loading_indicator("Setting key partition list... (this can take a minute if there are a lot of keys installed)") do
40
+ UI.command("security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k ******** #{keychain_path.shellescape}") if output
41
+ Security::Keychain.new(keychain_path).set_key_partition_list(keychain_password.to_s)
42
+ rescue Security::Error => e
43
+ err = e.output.strip
44
+
45
+ # Inform user when no/wrong password was used as its needed to prevent UI permission popup from Xcode when signing
46
+ if WRONG_KEYCHAIN_PASSWORD.any? { |message| err.include?(message) }
47
+ keychain_name = File.basename(keychain_path, ".*")
48
+ Security::InternetPassword.delete(server: server_name(keychain_name))
49
+
50
+ UI.important("")
51
+ UI.important("Could not configure imported keychain item (certificate) to prevent UI permission popup when code signing\n" \
52
+ "Check if you supplied the correct `keychain_password` for keychain: `#{keychain_path}`\n" \
53
+ "#{err}")
54
+ UI.important("")
55
+ UI.important("Please look at the following docs to see how to set a keychain password:")
56
+ UI.important(" - https://docs.fastlane.tools/actions/sync_code_signing")
57
+ UI.important(" - https://docs.fastlane.tools/actions/get_certificates")
58
+ else
59
+ UI.error(err)
83
60
  end
84
-
85
61
  end
86
62
  end
87
63
 
@@ -105,15 +81,16 @@ module FastlaneCore
105
81
  if item
106
82
  keychain_password = item.password
107
83
  UI.important("Using keychain password from keychain item #{server} in #{keychain_path}")
84
+ StoredPasswords.read_warning(server, what: "the password for #{keychain_path}", remove_with: "security delete-internet-password -s #{server}", instead: "provide it with the keychain_password option or the MATCH_KEYCHAIN_PASSWORD environment variable")&.each { |line| UI.important(line) }
108
85
  end
109
86
 
110
87
  if keychain_password.nil?
111
88
  if UI.interactive?
112
89
  UI.important("Enter the password for #{keychain_path}")
113
- UI.important("This passphrase will be stored in your local keychain with the name #{server} and used in future runs")
90
+ UI.important("This passphrase will be stored in your local keychain with the name #{server} and used in future runs") if StoredPasswords.store?
114
91
  UI.important("This prompt can be avoided by specifying the 'keychain_password' option or 'MATCH_KEYCHAIN_PASSWORD' environment variable")
115
92
  keychain_password = FastlaneCore::Helper.ask_password(message: "Password for #{keychain_name} keychain: ", confirm: true, confirmation_message: "Type password for #{keychain_name} keychain again: ")
116
- Security::InternetPassword.add(server, "", keychain_password)
93
+ Security::InternetPassword.add(server, "", keychain_password) if StoredPasswords.store?
117
94
  else
118
95
  UI.important("Keychain password for #{keychain_path} was not specified and not found in your keychain. Specify the 'keychain_password' option to prevent the UI permission popup when code signing")
119
96
  keychain_password = ""
@@ -31,7 +31,11 @@ module FastlaneCore
31
31
 
32
32
  def self.fetch_distribution_xml_file(path)
33
33
  Dir.mktmpdir do |dir|
34
- Helper.backticks("xar -C #{dir.shellescape} -xf #{path.shellescape}")
34
+ FastlaneCore::CommandExecutor.execute(command: "xar -C #{dir.shellescape} -xf #{path.shellescape}",
35
+ print_all: true,
36
+ error: proc do |output|
37
+ UI.user_error!("Could not extract '#{path}':\n#{output}")
38
+ end)
35
39
 
36
40
  Dir.foreach(dir) do |file|
37
41
  next unless file.include?('Distribution')
@@ -47,7 +47,7 @@ module FastlaneCore
47
47
  end
48
48
 
49
49
  def colorize_array(array, colors)
50
- value = ""
50
+ value = +""
51
51
  array.each do |l|
52
52
  colored_line = l
53
53
  colored_line = "#{colors.first}#{l}#{colors.last}" if colors.length > 0
@@ -1,5 +1,3 @@
1
- require 'thread'
2
-
3
1
  module FastlaneCore
4
2
  # This dispatches jobs to worker threads and make it work in parallel.
5
3
  # It's suitable for I/O bounds works and not for CPU bounds works.
@@ -0,0 +1,29 @@
1
+ require_relative 'env'
2
+
3
+ module FastlaneCore
4
+ # Items added with `security add-internet-password` trust /usr/bin/security, so any program
5
+ # running as the user can read them (#29712): passwords are only stored when asked to.
6
+ module StoredPasswords
7
+ STORE_ENV = "FASTLANE_STORE_PASSWORDS_IN_KEYCHAIN"
8
+
9
+ # FASTLANE_DONT_STORE_PASSWORD, any value, still prevents storing
10
+ def self.store?
11
+ return false if ENV["FASTLANE_DONT_STORE_PASSWORD"]
12
+ Env.truthy?(STORE_ENV)
13
+ end
14
+
15
+ # The warning to print when a password was read from a keychain item fastlane stored, once per item and run
16
+ def self.read_warning(item, what:, remove_with:, instead:)
17
+ @warned ||= {}
18
+ return nil if @warned[item]
19
+ @warned[item] = true
20
+
21
+ ["Read #{what} from the keychain item '#{item}', which any program running as you can read.",
22
+ "Remove it with `#{remove_with}`, and #{instead}."]
23
+ end
24
+
25
+ def self.reset_warnings!
26
+ @warned = nil
27
+ end
28
+ end
29
+ end
@@ -35,8 +35,7 @@ class String
35
35
  # Base taken from: https://www.ruby-forum.com/topic/57805
36
36
  def wordwrap(length = 80)
37
37
  return [] if length == 0
38
- self.gsub!(/(\S{#{length}})(?=\S)/, '\1 ')
39
- self.scan(/.{1,#{length}}(?:\s+|$)/)
38
+ self.gsub(/(\S{#{length}})(?=\S)/, '\1 ').scan(/.{1,#{length}}(?:\s+|$)/)
40
39
  end
41
40
 
42
41
  # Base taken from: http://stackoverflow.com/a/12202205/1945875
@@ -42,7 +42,6 @@ module Commander
42
42
  # This is raising OptionParser::MissingArgument error because `--env` takes a string argument.
43
43
  # A command of `-e --verbose` works because `--verbose` is seen as the argument.
44
44
  # A command of `--verbose -e` doesn't work because no argument after `-e` so MissingArgument is raised again.
45
- # This broke somewhere between Ruby 2.5 and Ruby 2.6
46
45
  #
47
46
  # Solution:
48
47
  # Proper solution is to set `parser.require_exact = true` but this only available on `optparse` version 0.1.1
@@ -92,10 +91,12 @@ module Commander
92
91
  remove_global_options(options, @args)
93
92
 
94
93
  xcode_outdated = false
94
+ xcode_support_ending = false
95
95
  begin
96
96
  unless FastlaneCore::Helper.xcode_at_least?(Fastlane::MINIMUM_XCODE_RELEASE)
97
97
  xcode_outdated = true
98
98
  end
99
+ xcode_support_ending = !FastlaneCore::Helper.xcode_at_least?(Fastlane::SUGGESTED_MINIMUM_XCODE_RELEASE)
99
100
  rescue
100
101
  # We don't care about exceptions here
101
102
  # We'll land here if the user doesn't have Xcode at all for example
@@ -109,6 +110,10 @@ module Commander
109
110
  FastlaneCore::UI.user_error!("fastlane requires a minimum version of Xcode #{Fastlane::MINIMUM_XCODE_RELEASE}, please upgrade and make sure to use `sudo xcode-select -s /Applications/Xcode.app`")
110
111
  end
111
112
 
113
+ if xcode_support_ending && !FastlaneCore::Env.truthy?("FASTLANE_SKIP_XCODE_VERSION_WARNING")
114
+ FastlaneCore::UI.important("WARNING: Support for your Xcode version (#{FastlaneCore::Helper.xcode_version}) is going away. fastlane will soon require Xcode #{Fastlane::SUGGESTED_MINIMUM_XCODE_RELEASE} or newer.")
115
+ end
116
+
112
117
  is_swift = FastlaneCore::FastlaneFolder.swift?
113
118
  fastlane_client_language = is_swift ? :swift : :ruby
114
119
  action_launch_context = FastlaneCore::ActionLaunchContext.context_for_action_name(@program[:name], fastlane_client_language: fastlane_client_language, args: ARGV)
@@ -221,9 +226,8 @@ module Commander
221
226
  end
222
227
 
223
228
  def handle_tls_error!(e)
224
- # Apple has upgraded its App Store Connect servers to require TLS 1.2, but
225
- # system Ruby 2.0 does not support it. We want to suggest that users upgrade
226
- # their Ruby version
229
+ # Apple's App Store Connect servers require TLS 1.2. We want to suggest that users
230
+ # reinstall their Ruby
227
231
  suggest_ruby_reinstall(e)
228
232
  display_user_error!(e, e.to_s)
229
233
  end
@@ -20,8 +20,8 @@ module Fastlane
20
20
  report.issues[0..(NUMBER_OF_ISSUES_INLINE - 1)].each { |issue| print_issue_full(issue) }
21
21
 
22
22
  if report.issues.count > NUMBER_OF_ISSUES_INLINE
23
- report.url.gsub!('\'', '%27')
24
- puts("and #{report.total_results - NUMBER_OF_ISSUES_INLINE} more at: #{report.url}")
23
+ url = report.url.gsub('\'', '%27')
24
+ puts("and #{report.total_results - NUMBER_OF_ISSUES_INLINE} more at: #{url}")
25
25
  puts("")
26
26
  end
27
27
 
@@ -111,7 +111,7 @@ module FastlaneCore
111
111
 
112
112
  error('```')
113
113
  Range.new(start_line, end_line).each do |line|
114
- str = line == error_line ? " => " : " "
114
+ str = line == error_line ? +" => " : +" "
115
115
  str << line.to_s.rjust(Math.log10(end_line) + 1)
116
116
  str << ":\t#{contents[line - 1]}"
117
117
  error(str)
@@ -43,6 +43,7 @@ module Frameit
43
43
 
44
44
  module Color
45
45
  MATTE_BLACK ||= "Matte Black"
46
+ JET_BLACK ||= "Jet Black"
46
47
  SPACE_GRAY ||= "Space Gray"
47
48
  ROSE_GOLD ||= "Rose Gold"
48
49
  CLEARLY_WHITE ||= "Clearly White"
@@ -87,7 +88,7 @@ module Frameit
87
88
  PACIFIC_BLUE ||= "Pacific Blue"
88
89
  MIDNIGHT ||= "Midnight"
89
90
  STARLIGHT ||= "Starlight"
90
- SIERRA ||= "Sierra"
91
+ SIERRA_BLUE ||= "Sierra Blue"
91
92
  SORTA_SAGE ||= "Sorta Sage"
92
93
  TEAL ||= "Teal"
93
94
  ULTRAMARINE ||= "Ultramarine"
@@ -100,6 +101,8 @@ module Frameit
100
101
  MIST_BLUE ||= "Mist Blue"
101
102
  SAGE ||= "Sage"
102
103
  LAVENDER ||= "Lavender"
104
+ NIGHT_SKY ||= "Night Sky"
105
+ STAR_WHITE ||= "Star White"
103
106
 
104
107
  def self.all_colors
105
108
  Color.constants.map { |c| Color.const_get(c).upcase.gsub(' ', '_') }
@@ -130,6 +133,8 @@ module Frameit
130
133
  end
131
134
 
132
135
  module Devices
136
+ IPHONE_DUO_OUTER ||= Device.new("iphone-duo-outer", "Apple iPhone Duo Outer", 15, [[1398, 2034], [2034, 1398]], 460, Color::NIGHT_SKY, Platform::IOS)
137
+ IPHONE_DUO_INNER ||= Device.new("iphone-duo-inner", "Apple iPhone Duo Inner", 15, [[2007, 2853], [2853, 2007]], 460, Color::NIGHT_SKY, Platform::IOS)
133
138
  GOOGLE_PIXEL_3 ||= Device.new("google-pixel-3", "Google Pixel 3", 7, [[1080, 2160], [2160, 1080]], 443, Color::JUST_BLACK, Platform::ANDROID)
134
139
  GOOGLE_PIXEL_3_XL ||= Device.new("google-pixel-3-xl", "Google Pixel 3 XL", 7, [[1440, 2960], [2960, 1440]], 523, Color::JUST_BLACK, Platform::ANDROID)
135
140
  # Google Pixel 4's priority should be higher than Samsung Galaxy S10+ (priority 8):
@@ -158,6 +163,8 @@ module Frameit
158
163
  SAMSUNG_GALAXY_S10 ||= Device.new("samsung-galaxy-s10", "Samsung Galaxy S10", 7, [[1440, 3040], [3040, 1440]], 550, Color::PRISM_BLACK, Platform::ANDROID)
159
164
  SAMSUNG_GALAXY_S10_PLUS ||= Device.new("samsung-galaxy-s10-plus", "Samsung Galaxy S10+", 8, [[1440, 3040], [3040, 1440]], 522, Color::PRISM_BLACK, Platform::ANDROID)
160
165
  XIAOMI_MI_MIX_ALPHA ||= Device.new("xiaomi-mi-mix-alpha", "Xiaomi Mi Mix Alpha", 1, [[2088, 2250], [2250, 2088]], 388, nil, Platform::ANDROID)
166
+ # Surface Pro X runs Windows, so it's only auto-detected via file name, `force_device_type` or `use_platform: ANY`
167
+ SURFACE_PRO_X ||= Device.new("surface-pro-x", "Surface Pro X", 1, [[1920, 2880], [2880, 1920]], 267, Color::BLACK, Platform::ANY)
161
168
  IPHONE_5S ||= Device.new("iphone-5s", "Apple iPhone 5s", 2, [[640, 1096], [640, 1136], [1136, 600], [1136, 640]], 326, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPHONE_40], :use_legacy_iphone5s)
162
169
  IPHONE_5C ||= Device.new("iphone-5c", "Apple iPhone 5c", 2, [[640, 1136], [1136, 640]], 326, Color::WHITE)
163
170
  IPHONE_SE ||= Device.new("iphone-se", "Apple iPhone SE", 3, [[640, 1096], [640, 1136], [1136, 600], [1136, 640]], 326, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPHONE_40])
@@ -175,7 +182,7 @@ module Frameit
175
182
  IPHONE_11_PRO ||= Device.new("iphone-11-pro", "Apple iPhone 11 Pro", 9, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS)
176
183
  IPHONE_11_PRO_MAX ||= Device.new("iphone11-pro-max", "Apple iPhone 11 Pro Max", 9, [[1242, 2688], [2688, 1242]], 458, Color::SPACE_GRAY, Platform::IOS)
177
184
  IPHONE_12 ||= Device.new("iphone-12", "Apple iPhone 12", 10, [[1170, 2532], [2532, 1170]], 460, Color::BLACK, Platform::IOS)
178
- IPHONE_12_PRO ||= Device.new("iphone-12-pro", "Apple iPhone 12 Pro", 10, [[1170, 2532], [2532, 1170]], 460, Color::SPACE_GRAY, Platform::IOS)
185
+ IPHONE_12_PRO ||= Device.new("iphone-12-pro", "Apple iPhone 12 Pro", 10, [[1170, 2532], [2532, 1170]], 460, Color::GRAPHITE, Platform::IOS)
179
186
  IPHONE_12_PRO_MAX ||= Device.new("iphone12-pro-max", "Apple iPhone 12 Pro Max", 10, [[1284, 2778], [2778, 1284]], 458, Color::GRAPHITE, Platform::IOS)
180
187
  IPHONE_12_MINI ||= Device.new("iphone-12-mini", "Apple iPhone 12 Mini", 10, [[1125, 2436], [2436, 1125]], 476, Color::BLACK, Platform::IOS)
181
188
  IPHONE_13 ||= Device.new("iphone-13", "Apple iPhone 13", 11, [[1170, 2532], [2532, 1170]], 460, Color::MIDNIGHT, Platform::IOS)
@@ -204,8 +211,8 @@ module Frameit
204
211
  IPAD_PRO_12_9 ||= Device.new("ipadPro129", "Apple iPad Pro (12.9-inch) (3rd generation)", 4, [[2048, 2732], [2732, 2048]], 264, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPAD_PRO_3GEN_129])
205
212
  # iPad Pro 13" (4th gen):
206
213
  IPAD_PRO_12_9_4 ||= Device.new("ipadPro129", "Apple iPad Pro (12.9-inch) (4th generation)", 5, [[2048, 2732], [2732, 2048]], 264, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPAD_PRO_3GEN_129])
207
- # iPad Pro (10.5-inch) is not in frameit-frames repo, but must be included so that we are backward compatible with PR #15373
208
- # priority must be lower so that users who didn't copy the frame to their frameit frames folder will not get an error
214
+ # iPad Pro (10.5-inch) shares the iPad Air (2019) frame and resolution, it was added for backward compatibility with PR #15373
215
+ # priority must be lower than iPad Air (2019) so that 1668x2224 screenshots without a device name keep using that device
209
216
  # ID and formatted name must be exactly as specified so that device.detect_device() will select this device if the filename includes them
210
217
  IPAD_PRO_10_5 ||= Device.new("ipad105", "Apple iPad Pro (10.5-inch)", 1, [[1668, 2224], [2224, 1668]], 265, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPAD_105])
211
218
  IPAD_PRO_11 ||= Device.new("ipadPro11", "Apple iPad Pro (11-inch)", 1, [[1668, 2388], [2388, 1668]], 265, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPAD_PRO_3GEN_11])