fastlane 2.149.1 → 2.150.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/deliver/lib/deliver.rb +0 -1
  3. data/deliver/lib/deliver/app_screenshot.rb +26 -25
  4. data/deliver/lib/deliver/download_screenshots.rb +46 -26
  5. data/deliver/lib/deliver/options.rb +6 -11
  6. data/deliver/lib/deliver/runner.rb +7 -21
  7. data/deliver/lib/deliver/setup.rb +5 -30
  8. data/deliver/lib/deliver/submit_for_review.rb +170 -86
  9. data/deliver/lib/deliver/upload_metadata.rb +355 -143
  10. data/deliver/lib/deliver/upload_price_tier.rb +22 -8
  11. data/deliver/lib/deliver/upload_screenshots.rb +140 -39
  12. data/{scan/lib/scan/.test_command_generator.rb.swp → fastlane/lib/fastlane/actions/.hockey.rb.swp} +0 -0
  13. data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
  14. data/{snapshot/lib/snapshot/.test_command_generator_base.rb.swp → fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp} +0 -0
  15. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +1 -1
  16. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +81 -96
  17. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +3 -2
  18. data/fastlane/lib/fastlane/actions/download_dsyms.rb +7 -1
  19. data/fastlane/lib/fastlane/actions/google_play_track_release_names.rb +74 -0
  20. data/fastlane/lib/fastlane/actions/set_changelog.rb +23 -20
  21. data/fastlane/lib/fastlane/actions/slack.rb +1 -1
  22. data/fastlane/lib/fastlane/actions/spm.rb +7 -0
  23. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +1 -32
  24. data/fastlane/lib/fastlane/lane.rb +3 -3
  25. data/fastlane/lib/fastlane/swift_fastlane_function.rb +8 -4
  26. data/fastlane/lib/fastlane/version.rb +1 -1
  27. data/fastlane/swift/ControlCommand.swift +1 -0
  28. data/fastlane/swift/Fastlane.swift +48 -12
  29. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  30. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +3 -9
  31. data/fastlane/swift/LaneFileProtocol.swift +2 -5
  32. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  33. data/fastlane/swift/RubyCommand.swift +29 -6
  34. data/fastlane/swift/RubyCommandable.swift +1 -0
  35. data/fastlane/swift/Runner.swift +85 -13
  36. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  37. data/fastlane/swift/SnapshotfileProtocol.swift +3 -3
  38. data/fastlane/swift/SocketClient.swift +76 -45
  39. data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
  40. data/fastlane/swift/SocketResponse.swift +1 -0
  41. data/fastlane_core/lib/fastlane_core/build_watcher.rb +4 -4
  42. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +1 -3
  43. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +89 -52
  44. data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +7 -0
  45. data/frameit/lib/frameit/device_types.rb +100 -100
  46. data/pilot/lib/pilot/.manager.rb.swp +0 -0
  47. data/produce/lib/produce/itunes_connect.rb +59 -21
  48. data/produce/lib/produce/options.rb +3 -3
  49. data/sigh/lib/assets/resign.sh +7 -7
  50. data/snapshot/lib/assets/SnapshotHelper.swift +5 -5
  51. data/snapshot/lib/assets/SnapshotHelperXcode8.swift +3 -3
  52. data/snapshot/lib/snapshot/options.rb +0 -1
  53. data/snapshot/lib/snapshot/reports_generator.rb +8 -1
  54. data/spaceship/lib/spaceship/client.rb +4 -3
  55. data/spaceship/lib/spaceship/connect_api.rb +25 -2
  56. data/spaceship/lib/spaceship/connect_api/.DS_Store +0 -0
  57. data/spaceship/lib/spaceship/connect_api/client.rb +97 -31
  58. data/spaceship/lib/spaceship/connect_api/file_uploader.rb +98 -0
  59. data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
  60. data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +113 -0
  61. data/spaceship/lib/spaceship/connect_api/models/app.rb +135 -3
  62. data/spaceship/lib/spaceship/connect_api/models/app_category.rb +94 -0
  63. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +67 -0
  64. data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +38 -0
  65. data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +129 -0
  66. data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +71 -0
  67. data/spaceship/lib/spaceship/connect_api/models/app_price.rb +22 -0
  68. data/spaceship/lib/spaceship/connect_api/models/app_price_tier.rb +12 -0
  69. data/spaceship/lib/spaceship/connect_api/models/app_review_attachment.rb +71 -0
  70. data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +146 -0
  71. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +125 -0
  72. data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +51 -0
  73. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +183 -0
  74. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +86 -0
  75. data/spaceship/lib/spaceship/connect_api/models/app_store_version_phased_release.rb +36 -0
  76. data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +26 -0
  77. data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
  78. data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +40 -0
  79. data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +26 -0
  80. data/spaceship/lib/spaceship/connect_api/models/territory.rb +27 -0
  81. data/spaceship/lib/spaceship/connect_api/models/user.rb +2 -1
  82. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +10 -3
  83. data/spaceship/lib/spaceship/connect_api/tunes/client.rb +33 -0
  84. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +844 -0
  85. data/spaceship/lib/spaceship/connect_api/users/users.rb +13 -0
  86. data/spaceship/lib/spaceship/spaceauth_runner.rb +2 -2
  87. data/supply/lib/supply/client.rb +19 -0
  88. data/supply/lib/supply/reader.rb +16 -0
  89. metadata +34 -22
  90. data/deliver/lib/deliver/upload_assets.rb +0 -27
@@ -17,7 +17,7 @@ import Foundation
17
17
  protocol SocketClientDelegateProtocol: class {
18
18
  func connectionsOpened()
19
19
  func connectionsClosed()
20
- func commandExecuted(serverResponse: SocketClientResponse)
20
+ func commandExecuted(serverResponse: SocketClientResponse, completion: (SocketClient) -> Void)
21
21
  }
22
22
 
23
23
  // Please don't remove the lines below
@@ -28,6 +28,7 @@ struct SocketResponse {
28
28
  }
29
29
 
30
30
  if status == "ready_for_next" {
31
+ verbose(message: "ready for next")
31
32
  let returnedObject = statusDictionary["return_object"] as? String
32
33
  let closureArgumentValue = statusDictionary["closure_argument_value"] as? String
33
34
  self = .readyForNext(returnedObject: returnedObject, closureArgumentValue: closureArgumentValue)
@@ -6,7 +6,7 @@ module FastlaneCore
6
6
  class BuildWatcher
7
7
  class << self
8
8
  # @return The build we waited for. This method will always return a build
9
- def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true)
9
+ def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true, select_latest: false)
10
10
  # Warn about train_version being removed in the future
11
11
  if train_version
12
12
  UI.deprecated(":train_version is no longer a used argument on FastlaneCore::BuildWatcher. Please use :app_version instead.")
@@ -23,7 +23,7 @@ module FastlaneCore
23
23
 
24
24
  showed_info = false
25
25
  loop do
26
- matched_build = matching_build(watched_app_version: app_version, watched_build_version: build_version, app_id: app_id, platform: platform)
26
+ matched_build = matching_build(watched_app_version: app_version, watched_build_version: build_version, app_id: app_id, platform: platform, select_latest: select_latest)
27
27
 
28
28
  if matched_build.nil? && !showed_info
29
29
  UI.important("Read more information on why this build isn't showing up yet - https://github.com/fastlane/fastlane/issues/14997")
@@ -55,7 +55,7 @@ module FastlaneCore
55
55
  return version.instance_of?(String) ? version.split('.').map { |s| s.to_i.to_s }.join('.') : version
56
56
  end
57
57
 
58
- def matching_build(watched_app_version: nil, watched_build_version: nil, app_id: nil, platform: nil)
58
+ def matching_build(watched_app_version: nil, watched_build_version: nil, app_id: nil, platform: nil, select_latest: false)
59
59
  # Get build deliveries (newly uploaded processing builds)
60
60
  watched_app_version = remove_version_leading_zeros(version: watched_app_version)
61
61
  watched_build_version = remove_version_leading_zeros(version: watched_build_version)
@@ -69,7 +69,7 @@ module FastlaneCore
69
69
 
70
70
  # Raise error if more than 1 build is returned
71
71
  # This should never happen but need to inform the user if it does
72
- if matched_builds.size > 1
72
+ if matched_builds.size > 1 && !select_latest
73
73
  error_builds = matched_builds.map do |build|
74
74
  "#{build.app_version}(#{build.version}) for #{build.platform} - #{build.processing_state}"
75
75
  end.join("\n")
@@ -264,9 +264,7 @@ module FastlaneCore
264
264
 
265
265
  # Determines the defined data type of this ConfigItem
266
266
  def data_type
267
- if @data_type.kind_of?(Symbol)
268
- nil
269
- elsif @data_type
267
+ if @data_type
270
268
  @data_type
271
269
  else
272
270
  (@is_string ? String : nil)
@@ -239,64 +239,101 @@ module FastlaneCore
239
239
  # escaping problems in its accompanying shell script.
240
240
  class JavaTransporterExecutor < TransporterExecutor
241
241
  def build_upload_command(username, password, source = "/tmp", provider_short_name = "")
242
- [
243
- Helper.transporter_java_executable_path.shellescape,
244
- "-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
245
- '-XX:NewSize=2m',
246
- '-Xms32m',
247
- '-Xmx1024m',
248
- '-Xms1024m',
249
- '-Djava.awt.headless=true',
250
- '-Dsun.net.http.retryPost=false',
251
- java_code_option,
252
- '-m upload',
253
- "-u #{username.shellescape}",
254
- "-p #{password.shellescape}",
255
- "-f #{source.shellescape}",
256
- additional_upload_parameters, # that's here, because the user might overwrite the -t option
257
- '-k 100000',
258
- ("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?),
259
- '2>&1' # cause stderr to be written to stdout
260
- ].compact.join(' ') # compact gets rid of the possibly nil ENV value
242
+ if Helper.mac? && Helper.xcode_at_least?(11)
243
+ [
244
+ 'xcrun iTMSTransporter',
245
+ '-m upload',
246
+ "-u #{username.shellescape}",
247
+ "-p #{password.shellescape}",
248
+ "-f #{source.shellescape}",
249
+ additional_upload_parameters, # that's here, because the user might overwrite the -t option
250
+ '-k 100000',
251
+ ("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?),
252
+ '2>&1' # cause stderr to be written to stdout
253
+ ].compact.join(' ') # compact gets rid of the possibly nil ENV value
254
+ else
255
+ [
256
+ Helper.transporter_java_executable_path.shellescape,
257
+ "-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
258
+ '-XX:NewSize=2m',
259
+ '-Xms32m',
260
+ '-Xmx1024m',
261
+ '-Xms1024m',
262
+ '-Djava.awt.headless=true',
263
+ '-Dsun.net.http.retryPost=false',
264
+ java_code_option,
265
+ '-m upload',
266
+ "-u #{username.shellescape}",
267
+ "-p #{password.shellescape}",
268
+ "-f #{source.shellescape}",
269
+ additional_upload_parameters, # that's here, because the user might overwrite the -t option
270
+ '-k 100000',
271
+ ("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?),
272
+ '2>&1' # cause stderr to be written to stdout
273
+ ].compact.join(' ') # compact gets rid of the possibly nil ENV value
274
+ end
261
275
  end
262
276
 
263
277
  def build_download_command(username, password, apple_id, destination = "/tmp", provider_short_name = "")
264
- [
265
- Helper.transporter_java_executable_path.shellescape,
266
- "-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
267
- '-XX:NewSize=2m',
268
- '-Xms32m',
269
- '-Xmx1024m',
270
- '-Xms1024m',
271
- '-Djava.awt.headless=true',
272
- '-Dsun.net.http.retryPost=false',
273
- java_code_option,
274
- '-m lookupMetadata',
275
- "-u #{username.shellescape}",
276
- "-p #{password.shellescape}",
277
- "-apple_id #{apple_id.shellescape}",
278
- "-destination #{destination.shellescape}",
279
- ("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?),
280
- '2>&1' # cause stderr to be written to stdout
281
- ].compact.join(' ')
278
+ if Helper.mac? && Helper.xcode_at_least?(11)
279
+ [
280
+ 'xcrun iTMSTransporter',
281
+ '-m lookupMetadata',
282
+ "-u #{username.shellescape}",
283
+ "-p #{password.shellescape}",
284
+ "-apple_id #{apple_id.shellescape}",
285
+ "-destination #{destination.shellescape}",
286
+ ("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?),
287
+ '2>&1' # cause stderr to be written to stdout
288
+ ].compact.join(' ')
289
+ else
290
+ [
291
+ Helper.transporter_java_executable_path.shellescape,
292
+ "-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
293
+ '-XX:NewSize=2m',
294
+ '-Xms32m',
295
+ '-Xmx1024m',
296
+ '-Xms1024m',
297
+ '-Djava.awt.headless=true',
298
+ '-Dsun.net.http.retryPost=false',
299
+ java_code_option,
300
+ '-m lookupMetadata',
301
+ "-u #{username.shellescape}",
302
+ "-p #{password.shellescape}",
303
+ "-apple_id #{apple_id.shellescape}",
304
+ "-destination #{destination.shellescape}",
305
+ ("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?),
306
+ '2>&1' # cause stderr to be written to stdout
307
+ ].compact.join(' ')
308
+ end
282
309
  end
283
310
 
284
311
  def build_provider_ids_command(username, password)
285
- [
286
- Helper.transporter_java_executable_path.shellescape,
287
- "-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
288
- '-XX:NewSize=2m',
289
- '-Xms32m',
290
- '-Xmx1024m',
291
- '-Xms1024m',
292
- '-Djava.awt.headless=true',
293
- '-Dsun.net.http.retryPost=false',
294
- java_code_option,
295
- '-m provider',
296
- "-u #{username.shellescape}",
297
- "-p #{password.shellescape}",
298
- '2>&1' # cause stderr to be written to stdout
299
- ].compact.join(' ')
312
+ if Helper.mac? && Helper.xcode_at_least?(11)
313
+ [
314
+ 'xcrun iTMSTransporter',
315
+ '-m provider',
316
+ "-u #{username.shellescape}",
317
+ "-p #{password.shellescape}",
318
+ '2>&1' # cause stderr to be written to stdout
319
+ ].compact.join(' ')
320
+ else
321
+ [
322
+ Helper.transporter_java_executable_path.shellescape,
323
+ "-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
324
+ '-XX:NewSize=2m',
325
+ '-Xms32m',
326
+ '-Xmx1024m',
327
+ '-Xms1024m',
328
+ '-Djava.awt.headless=true',
329
+ '-Dsun.net.http.retryPost=false',
330
+ java_code_option,
331
+ '-m provider',
332
+ "-u #{username.shellescape}",
333
+ "-p #{password.shellescape}",
334
+ '2>&1' # cause stderr to be written to stdout
335
+ ].compact.join(' ')
336
+ end
300
337
  end
301
338
 
302
339
  def java_code_option
@@ -17,6 +17,13 @@ module FastlaneCore
17
17
  return nil
18
18
  end
19
19
 
20
+ # Fetches the app version from the given pkg file.
21
+ def self.fetch_app_build(path)
22
+ xml = self.fetch_distribution_xml_file(path)
23
+ return xml.elements['installer-gui-script/pkg-ref/bundle-version/bundle'].attributes['CFBundleVersion'] if xml
24
+ return nil
25
+ end
26
+
20
27
  def self.fetch_distribution_xml_file(path)
21
28
  Dir.mktmpdir do |dir|
22
29
  Helper.backticks("xar -C #{dir.shellescape} -xf #{path.shellescape}")
@@ -1,50 +1,50 @@
1
- require_relative 'device'
2
1
  require_relative 'module'
2
+ require_relative './device'
3
3
  require 'deliver/app_screenshot'
4
4
 
5
5
  module Frameit
6
6
  module Color
7
- MATTE_BLACK = "Matte Black"
8
- SPACE_GRAY = "Space Gray"
9
- ROSE_GOLD = "Rose Gold"
10
- CLEARLY_WHITE = "Clearly White"
11
- JUST_BLACK = "Just Black"
12
- NOT_PINK = "Not Pink"
13
- SILVER_TITANIUM = "Silver Titanium"
14
- ARCTIC_SILVER = "Arctic Silver"
15
- CORAL_BLUE = "Coral Blue"
16
- MAPLE_GOLD = "Maple Gold"
17
- MIDNIGHT_BLACK = "Midnight Black"
18
- MIDNIGHT_GREEN = "Midnight Green"
19
- ORCHID_GRAY = "Orchid Gray"
20
- BURGUNDY_RED = "Burgundy Red"
21
- LILAC_PURPLE = "Lilac Purple"
22
- SUNRISE_GOLD = "Sunrise Gold"
23
- TITANIUM_GRAY = "Titanium Gray"
24
- FLAMINGO_PINK = "Flamingo Pink"
25
- PRISM_BLACK = "Prism Black"
26
- PRISM_BLUE = "Prism Blue"
27
- PRISM_GREEN = "Prism Green"
28
- PRISM_WHITE = "Prism White"
29
- CERAMIC_WHITE = "Ceramic White"
30
- OH_SO_ORANGE = "Oh So Orange"
31
- AURA_BLACK = "Aura Black"
32
- AURA_GLOW = "Aura Glow"
33
- AURA_PINK = "Aura Pink"
34
- AURA_RED = "Aura Red"
35
- AURA_WHITE = "Aura White"
36
- AURA_BLUE = "Aura Blue"
37
- CORAL = "Coral"
38
- BLACK = "Black"
39
- WHITE = "White"
40
- GOLD = "Gold"
41
- SILVER = "Silver"
42
- BLUE = "Blue"
43
- RED = "Red"
44
- YELLOW = "Yellow"
45
- GREEN = "Green"
46
- PINK = "Pink"
47
- PURPLE = "Purple"
7
+ MATTE_BLACK ||= "Matte Black"
8
+ SPACE_GRAY ||= "Space Gray"
9
+ ROSE_GOLD ||= "Rose Gold"
10
+ CLEARLY_WHITE ||= "Clearly White"
11
+ JUST_BLACK ||= "Just Black"
12
+ NOT_PINK ||= "Not Pink"
13
+ SILVER_TITANIUM ||= "Silver Titanium"
14
+ ARCTIC_SILVER ||= "Arctic Silver"
15
+ CORAL_BLUE ||= "Coral Blue"
16
+ MAPLE_GOLD ||= "Maple Gold"
17
+ MIDNIGHT_BLACK ||= "Midnight Black"
18
+ MIDNIGHT_GREEN ||= "Midnight Green"
19
+ ORCHID_GRAY ||= "Orchid Gray"
20
+ BURGUNDY_RED ||= "Burgundy Red"
21
+ LILAC_PURPLE ||= "Lilac Purple"
22
+ SUNRISE_GOLD ||= "Sunrise Gold"
23
+ TITANIUM_GRAY ||= "Titanium Gray"
24
+ FLAMINGO_PINK ||= "Flamingo Pink"
25
+ PRISM_BLACK ||= "Prism Black"
26
+ PRISM_BLUE ||= "Prism Blue"
27
+ PRISM_GREEN ||= "Prism Green"
28
+ PRISM_WHITE ||= "Prism White"
29
+ CERAMIC_WHITE ||= "Ceramic White"
30
+ OH_SO_ORANGE ||= "Oh So Orange"
31
+ AURA_BLACK ||= "Aura Black"
32
+ AURA_GLOW ||= "Aura Glow"
33
+ AURA_PINK ||= "Aura Pink"
34
+ AURA_RED ||= "Aura Red"
35
+ AURA_WHITE ||= "Aura White"
36
+ AURA_BLUE ||= "Aura Blue"
37
+ CORAL ||= "Coral"
38
+ BLACK ||= "Black"
39
+ WHITE ||= "White"
40
+ GOLD ||= "Gold"
41
+ SILVER ||= "Silver"
42
+ BLUE ||= "Blue"
43
+ RED ||= "Red"
44
+ YELLOW ||= "Yellow"
45
+ GREEN ||= "Green"
46
+ PINK ||= "Pink"
47
+ PURPLE ||= "Purple"
48
48
 
49
49
  def self.all_colors
50
50
  Color.constants.map { |c| Color.const_get(c).upcase.gsub(' ', '_') }
@@ -52,14 +52,14 @@ module Frameit
52
52
  end
53
53
 
54
54
  module Orientation
55
- PORTRAIT = "PORTRAIT"
56
- LANDSCAPE = "LANDSCAPE"
55
+ PORTRAIT ||= "PORTRAIT"
56
+ LANDSCAPE ||= "LANDSCAPE"
57
57
  end
58
58
 
59
59
  module Platform
60
- ANDROID = "ANDROID"
61
- IOS = "IOS"
62
- ANY = "ANY"
60
+ ANDROID ||= "ANDROID"
61
+ IOS ||= "IOS"
62
+ ANY ||= "ANY"
63
63
 
64
64
  def self.all_platforms
65
65
  Platform.constants.map { |c| Platform.const_get(c) }
@@ -75,67 +75,67 @@ module Frameit
75
75
  end
76
76
 
77
77
  module Devices
78
- GOOGLE_PIXEL_3 = Frameit::Device.new("google-pixel-3", "Google Pixel 3", 7, [[1080, 2160], [2160, 1080]], 443, Color::JUST_BLACK, Platform::ANDROID)
79
- GOOGLE_PIXEL_3_XL = Frameit::Device.new("google-pixel-3-xl", "Google Pixel 3 XL", 7, [[1440, 2960], [2960, 1440]], 523, Color::JUST_BLACK, Platform::ANDROID)
78
+ GOOGLE_PIXEL_3 ||= Frameit::Device.new("google-pixel-3", "Google Pixel 3", 7, [[1080, 2160], [2160, 1080]], 443, Color::JUST_BLACK, Platform::ANDROID)
79
+ GOOGLE_PIXEL_3_XL ||= Frameit::Device.new("google-pixel-3-xl", "Google Pixel 3 XL", 7, [[1440, 2960], [2960, 1440]], 523, Color::JUST_BLACK, Platform::ANDROID)
80
80
  # Google Pixel 4's priority should be higher than Samsung Galaxy S10+ (priority 8):
81
- GOOGLE_PIXEL_4 = Frameit::Device.new("google-pixel-4", "Google Pixel 4", 9, [[1080, 2280], [2280, 1080]], 444, Color::JUST_BLACK, Platform::ANDROID)
82
- GOOGLE_PIXEL_4_XL = Frameit::Device.new("google-pixel-4-xl", "Google Pixel 4 XL", 9, [[1440, 3040], [3040, 1440]], 537, Color::JUST_BLACK, Platform::ANDROID)
83
- HTC_ONE_A9 = Frameit::Device.new("htc-one-a9", "HTC One A9", 6, [[1080, 1920], [1920, 1080]], 441, Color::BLACK, Platform::ANDROID)
84
- HTC_ONE_M8 = Frameit::Device.new("htc-one-m8", "HTC One M8", 3, [[1080, 1920], [1920, 1080]], 441, Color::BLACK, Platform::ANDROID)
85
- HUAWEI_P8 = Frameit::Device.new("huawei-p8", "Huawei P8", 5, [[1080, 1920], [1920, 1080]], 424, Color::BLACK, Platform::ANDROID)
86
- MOTOROLA_MOTO_E = Frameit::Device.new("motorola-moto-e", "Motorola Moto E", 3, [[540, 960], [960, 540]], 245, Color::BLACK, Platform::ANDROID)
87
- MOTOROLA_MOTO_G = Frameit::Device.new("motorola-moto-g", "Motorola Moto G", 4, [[1080, 1920], [1920, 1080]], 401, nil, Platform::ANDROID, nil)
88
- NEXUS_4 = Frameit::Device.new("nexus-4", "Nexus 4", 7, [[768, 1280], [1820, 768]], 318, nil, Platform::ANDROID)
89
- NEXUS_5X = Frameit::Device.new("nexus-5x", "Nexus 5X", 7, [[1080, 1920], [1920, 1080]], 423, nil, Platform::ANDROID)
90
- NEXUS_6P = Frameit::Device.new("nexus-6p", "Nexus 6P", 7, [[1440, 2560], [2560, 1440]], 518, nil, Platform::ANDROID)
91
- NEXUS_9 = Frameit::Device.new("nexus-9", "Nexus 9", 7, [[1536, 2048], [2048, 1536]], 281, nil, Platform::ANDROID)
92
- SAMSUNG_GALAXY_GRAND_PRIME = Frameit::Device.new("samsung-galaxy-grand-prime", "Samsung Galaxy Grand Prime", 5, [[540, 960], [960, 540]], 220, Color::BLACK, Platform::ANDROID)
93
- SAMSUNG_GALAXY_NOTE_5 = Frameit::Device.new("samsung-galaxy-note-5", "Samsung Galaxy Note 5", 5, [[1440, 2560], [2560, 1440]], 518, Color::BLACK, Platform::ANDROID)
94
- SAMSUNG_GALAXY_NOTE_10 = Frameit::Device.new("samsung-galaxy-note-10", "Samsung Galaxy Note 10", 6, [[1080, 2280], [2280, 1080]], 401, Color::AURA_BLACK, Platform::ANDROID)
95
- SAMSUNG_GALAXY_NOTE_10_PLUS = Frameit::Device.new("samsung-galaxy-note-10-plus", "Samsung Galaxy Note 10+", 7, [[1440, 3040], [3040, 1440]], 498, Color::AURA_BLACK, Platform::ANDROID)
96
- SAMSUNG_GALAXY_S_DUOS = Frameit::Device.new("samsung-galaxy-s-duos", "Samsung Galaxy S Duos", 3, [[480, 800], [800, 480]], 233, nil, Platform::ANDROID)
97
- SAMSUNG_GALAXY_S3 = Frameit::Device.new("samsung-galaxy-s3", "Samsung Galaxy S3", 3, [[720, 1280], [1280, 720]], 306, nil, Platform::ANDROID)
98
- SAMSUNG_GALAXY_S5 = Frameit::Device.new("samsung-galaxy-s5", "Samsung Galaxy S5", 3, [[1080, 1920], [1920, 1080]], 432, Color::BLACK, Platform::ANDROID)
99
- SAMSUNG_GALAXY_S7 = Frameit::Device.new("samsung-galaxy-s7", "Samsung Galaxy S7", 4, [[1440, 2560], [2560, 1440]], 577, Color::BLACK, Platform::ANDROID)
100
- SAMSUNG_GALAXY_S8 = Frameit::Device.new("samsung-galaxy-s8", "Samsung Galaxy S8", 5, [[1440, 2960], [2960, 1440]], 570, Color::MIDNIGHT_BLACK, Platform::ANDROID)
101
- SAMSUNG_GALAXY_S9 = Frameit::Device.new("samsung-galaxy-s9", "Samsung Galaxy S9", 6, [[1440, 2960], [2960, 1440]], 570, Color::MIDNIGHT_BLACK, Platform::ANDROID)
102
- SAMSUNG_GALAXY_S10 = Frameit::Device.new("samsung-galaxy-s10", "Samsung Galaxy S10", 7, [[1440, 3040], [3040, 1440]], 550, Color::PRISM_BLACK, Platform::ANDROID)
103
- SAMSUNG_GALAXY_S10_PLUS = Frameit::Device.new("samsung-galaxy-s10-plus", "Samsung Galaxy S10+", 8, [[1440, 3040], [3040, 1440]], 522, Color::PRISM_BLACK, Platform::ANDROID)
104
- XIAOMI_MI_MIX_ALPHA = Frameit::Device.new("xiaomi-mi-mix-alpha", "Xiaomi Mi Mix Alpha", 1, [[2088, 2250], [2250, 2088]], 388, nil, Platform::ANDROID)
105
- IPHONE_5S = Frameit::Device.new("iphone-5s", "Apple iPhone 5s", 2, [[640, 1096], [640, 1136], [1136, 600], [1136, 640]], 326, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_40, :use_legacy_iphone5s)
106
- IPHONE_5C = Frameit::Device.new("iphone-5c", "Apple iPhone 5c", 2, [[640, 1136], [1136, 640]], 326, Color::WHITE)
107
- IPHONE_SE = Frameit::Device.new("iphone-se", "Apple iPhone SE", 3, [[640, 1096], [640, 1136], [1136, 600], [1136, 640]], 326, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_40)
108
- IPHONE_6S = Frameit::Device.new("iphone-6s", "Apple iPhone 6s", 4, [[750, 1334], [1334, 750]], 326, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_47, :use_legacy_iphone6s)
109
- IPHONE_6S_PLUS = Frameit::Device.new("iphone-6s-plus", "Apple iPhone 6s Plus", 4, [[1242, 2208], [2208, 1242]], 401, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_55, :use_legacy_iphone6s)
110
- IPHONE_7 = Frameit::Device.new("iphone-7", "Apple iPhone 7", 5, [[750, 1334], [1334, 750]], 326, Color::MATTE_BLACK, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_47, :use_legacy_iphone7)
111
- IPHONE_7_PLUS = Frameit::Device.new("iphone-7-plus", "Apple iPhone 7 Plus", 5, [[1242, 2208], [2208, 1242]], 401, Color::MATTE_BLACK, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_55, :use_legacy_iphone7)
112
- IPHONE_8 = Frameit::Device.new("iphone-8", "Apple iPhone 8", 6, [[750, 1334], [1334, 750]], 326, Color::SPACE_GRAY)
113
- IPHONE_8_PLUS = Frameit::Device.new("iphone-8-plus", "Apple iPhone 8 Plus", 6, [[1080, 1920], [1920, 1080]], 401, Color::SPACE_GRAY)
114
- IPHONE_X = Frameit::Device.new("iphone-X", "Apple iPhone X", 7, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_58, :use_legacy_iphonex)
115
- IPHONE_XS = Frameit::Device.new("iphone-XS", "Apple iPhone XS", 8, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_58, :use_legacy_iphonexs)
116
- IPHONE_XR = Frameit::Device.new("iphone-XR", "Apple iPhone XR", 8, [[828, 1792], [1792, 828]], 326, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_61, :use_legacy_iphonexr)
117
- IPHONE_XS_MAX = Frameit::Device.new("iphone-XS-Max", "Apple iPhone XS Max", 8, [[1242, 2688], [2688, 1242]], 458, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_65, :use_legacy_iphonexsmax)
118
- IPHONE_11 = Frameit::Device.new("iphone-11", "Apple iPhone 11", 9, [[828, 1792], [1792, 828]], 326, Color::BLACK, Platform::IOS)
119
- IPHONE_11_PRO = Frameit::Device.new("iphone-11-pro", "Apple iPhone 11 Pro", 9, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS)
120
- IPHONE_11_PRO_MAX = Frameit::Device.new("iphone11-pro-max", "Apple iPhone 11 Pro Max", 9, [[1242, 2688], [2688, 1242]], 458, Color::SPACE_GRAY, Platform::IOS)
121
- IPAD_10_2 = Frameit::Device.new("ipad-10-2", "Apple iPad 10.2", 1, [[1620, 2160], [2160, 1620]], 264, Color::SPACE_GRAY, Platform::IOS)
122
- IPAD_AIR_2 = Frameit::Device.new("ipad-air-2", "Apple iPad Air 2", 1, [[1536, 2048], [2048, 1536]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD)
123
- IPAD_AIR_2019 = Frameit::Device.new("ipad-air-2019", "Apple iPad Air (2019)", 2, [[1668, 2224], [2224, 1668]], 265, Color::SPACE_GRAY, Platform::IOS)
124
- IPAD_MINI_4 = Frameit::Device.new("ipad-mini-4", "Apple iPad Mini 4", 2, [[1536, 2048], [2048, 1536]], 324, Color::SPACE_GRAY)
125
- IPAD_MINI_2019 = Frameit::Device.new("ipad-mini-2019", "Apple iPad Mini (2019)", 3, [[1536, 2048], [2048, 1536]], 324, Color::SPACE_GRAY)
81
+ GOOGLE_PIXEL_4 ||= Frameit::Device.new("google-pixel-4", "Google Pixel 4", 9, [[1080, 2280], [2280, 1080]], 444, Color::JUST_BLACK, Platform::ANDROID)
82
+ GOOGLE_PIXEL_4_XL ||= Frameit::Device.new("google-pixel-4-xl", "Google Pixel 4 XL", 9, [[1440, 3040], [3040, 1440]], 537, Color::JUST_BLACK, Platform::ANDROID)
83
+ HTC_ONE_A9 ||= Frameit::Device.new("htc-one-a9", "HTC One A9", 6, [[1080, 1920], [1920, 1080]], 441, Color::BLACK, Platform::ANDROID)
84
+ HTC_ONE_M8 ||= Frameit::Device.new("htc-one-m8", "HTC One M8", 3, [[1080, 1920], [1920, 1080]], 441, Color::BLACK, Platform::ANDROID)
85
+ HUAWEI_P8 ||= Frameit::Device.new("huawei-p8", "Huawei P8", 5, [[1080, 1920], [1920, 1080]], 424, Color::BLACK, Platform::ANDROID)
86
+ MOTOROLA_MOTO_E ||= Frameit::Device.new("motorola-moto-e", "Motorola Moto E", 3, [[540, 960], [960, 540]], 245, Color::BLACK, Platform::ANDROID)
87
+ MOTOROLA_MOTO_G ||= Frameit::Device.new("motorola-moto-g", "Motorola Moto G", 4, [[1080, 1920], [1920, 1080]], 401, nil, Platform::ANDROID, nil)
88
+ NEXUS_4 ||= Frameit::Device.new("nexus-4", "Nexus 4", 7, [[768, 1280], [1820, 768]], 318, nil, Platform::ANDROID)
89
+ NEXUS_5X ||= Frameit::Device.new("nexus-5x", "Nexus 5X", 7, [[1080, 1920], [1920, 1080]], 423, nil, Platform::ANDROID)
90
+ NEXUS_6P ||= Frameit::Device.new("nexus-6p", "Nexus 6P", 7, [[1440, 2560], [2560, 1440]], 518, nil, Platform::ANDROID)
91
+ NEXUS_9 ||= Frameit::Device.new("nexus-9", "Nexus 9", 7, [[1536, 2048], [2048, 1536]], 281, nil, Platform::ANDROID)
92
+ SAMSUNG_GALAXY_GRAND_PRIME ||= Frameit::Device.new("samsung-galaxy-grand-prime", "Samsung Galaxy Grand Prime", 5, [[540, 960], [960, 540]], 220, Color::BLACK, Platform::ANDROID)
93
+ SAMSUNG_GALAXY_NOTE_5 ||= Frameit::Device.new("samsung-galaxy-note-5", "Samsung Galaxy Note 5", 5, [[1440, 2560], [2560, 1440]], 518, Color::BLACK, Platform::ANDROID)
94
+ SAMSUNG_GALAXY_NOTE_10 ||= Frameit::Device.new("samsung-galaxy-note-10", "Samsung Galaxy Note 10", 6, [[1080, 2280], [2280, 1080]], 401, Color::AURA_BLACK, Platform::ANDROID)
95
+ SAMSUNG_GALAXY_NOTE_10_PLUS ||= Frameit::Device.new("samsung-galaxy-note-10-plus", "Samsung Galaxy Note 10+", 7, [[1440, 3040], [3040, 1440]], 498, Color::AURA_BLACK, Platform::ANDROID)
96
+ SAMSUNG_GALAXY_S_DUOS ||= Frameit::Device.new("samsung-galaxy-s-duos", "Samsung Galaxy S Duos", 3, [[480, 800], [800, 480]], 233, nil, Platform::ANDROID)
97
+ SAMSUNG_GALAXY_S3 ||= Frameit::Device.new("samsung-galaxy-s3", "Samsung Galaxy S3", 3, [[720, 1280], [1280, 720]], 306, nil, Platform::ANDROID)
98
+ SAMSUNG_GALAXY_S5 ||= Frameit::Device.new("samsung-galaxy-s5", "Samsung Galaxy S5", 3, [[1080, 1920], [1920, 1080]], 432, Color::BLACK, Platform::ANDROID)
99
+ SAMSUNG_GALAXY_S7 ||= Frameit::Device.new("samsung-galaxy-s7", "Samsung Galaxy S7", 4, [[1440, 2560], [2560, 1440]], 577, Color::BLACK, Platform::ANDROID)
100
+ SAMSUNG_GALAXY_S8 ||= Frameit::Device.new("samsung-galaxy-s8", "Samsung Galaxy S8", 5, [[1440, 2960], [2960, 1440]], 570, Color::MIDNIGHT_BLACK, Platform::ANDROID)
101
+ SAMSUNG_GALAXY_S9 ||= Frameit::Device.new("samsung-galaxy-s9", "Samsung Galaxy S9", 6, [[1440, 2960], [2960, 1440]], 570, Color::MIDNIGHT_BLACK, Platform::ANDROID)
102
+ SAMSUNG_GALAXY_S10 ||= Frameit::Device.new("samsung-galaxy-s10", "Samsung Galaxy S10", 7, [[1440, 3040], [3040, 1440]], 550, Color::PRISM_BLACK, Platform::ANDROID)
103
+ SAMSUNG_GALAXY_S10_PLUS ||= Frameit::Device.new("samsung-galaxy-s10-plus", "Samsung Galaxy S10+", 8, [[1440, 3040], [3040, 1440]], 522, Color::PRISM_BLACK, Platform::ANDROID)
104
+ XIAOMI_MI_MIX_ALPHA ||= Frameit::Device.new("xiaomi-mi-mix-alpha", "Xiaomi Mi Mix Alpha", 1, [[2088, 2250], [2250, 2088]], 388, nil, Platform::ANDROID)
105
+ IPHONE_5S ||= Frameit::Device.new("iphone-5s", "Apple iPhone 5s", 2, [[640, 1096], [640, 1136], [1136, 600], [1136, 640]], 326, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_40, :use_legacy_iphone5s)
106
+ IPHONE_5C ||= Frameit::Device.new("iphone-5c", "Apple iPhone 5c", 2, [[640, 1136], [1136, 640]], 326, Color::WHITE)
107
+ IPHONE_SE ||= Frameit::Device.new("iphone-se", "Apple iPhone SE", 3, [[640, 1096], [640, 1136], [1136, 600], [1136, 640]], 326, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_40)
108
+ IPHONE_6S ||= Frameit::Device.new("iphone-6s", "Apple iPhone 6s", 4, [[750, 1334], [1334, 750]], 326, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_47, :use_legacy_iphone6s)
109
+ IPHONE_6S_PLUS ||= Frameit::Device.new("iphone-6s-plus", "Apple iPhone 6s Plus", 4, [[1242, 2208], [2208, 1242]], 401, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_55, :use_legacy_iphone6s)
110
+ IPHONE_7 ||= Frameit::Device.new("iphone-7", "Apple iPhone 7", 5, [[750, 1334], [1334, 750]], 326, Color::MATTE_BLACK, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_47, :use_legacy_iphone7)
111
+ IPHONE_7_PLUS ||= Frameit::Device.new("iphone-7-plus", "Apple iPhone 7 Plus", 5, [[1242, 2208], [2208, 1242]], 401, Color::MATTE_BLACK, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_55, :use_legacy_iphone7)
112
+ IPHONE_8 ||= Frameit::Device.new("iphone-8", "Apple iPhone 8", 6, [[750, 1334], [1334, 750]], 326, Color::SPACE_GRAY)
113
+ IPHONE_8_PLUS ||= Frameit::Device.new("iphone-8-plus", "Apple iPhone 8 Plus", 6, [[1080, 1920], [1920, 1080]], 401, Color::SPACE_GRAY)
114
+ IPHONE_X ||= Frameit::Device.new("iphone-X", "Apple iPhone X", 7, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_58, :use_legacy_iphonex)
115
+ IPHONE_XS ||= Frameit::Device.new("iphone-XS", "Apple iPhone XS", 8, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_58, :use_legacy_iphonexs)
116
+ IPHONE_XR ||= Frameit::Device.new("iphone-XR", "Apple iPhone XR", 8, [[828, 1792], [1792, 828]], 326, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_61, :use_legacy_iphonexr)
117
+ IPHONE_XS_MAX ||= Frameit::Device.new("iphone-XS-Max", "Apple iPhone XS Max", 8, [[1242, 2688], [2688, 1242]], 458, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_65, :use_legacy_iphonexsmax)
118
+ IPHONE_11 ||= Frameit::Device.new("iphone-11", "Apple iPhone 11", 9, [[828, 1792], [1792, 828]], 326, Color::BLACK, Platform::IOS)
119
+ IPHONE_11_PRO ||= Frameit::Device.new("iphone-11-pro", "Apple iPhone 11 Pro", 9, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS)
120
+ IPHONE_11_PRO_MAX ||= Frameit::Device.new("iphone11-pro-max", "Apple iPhone 11 Pro Max", 9, [[1242, 2688], [2688, 1242]], 458, Color::SPACE_GRAY, Platform::IOS)
121
+ IPAD_10_2 ||= Frameit::Device.new("ipad-10-2", "Apple iPad 10.2", 1, [[1620, 2160], [2160, 1620]], 264, Color::SPACE_GRAY, Platform::IOS)
122
+ IPAD_AIR_2 ||= Frameit::Device.new("ipad-air-2", "Apple iPad Air 2", 1, [[1536, 2048], [2048, 1536]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD)
123
+ IPAD_AIR_2019 ||= Frameit::Device.new("ipad-air-2019", "Apple iPad Air (2019)", 2, [[1668, 2224], [2224, 1668]], 265, Color::SPACE_GRAY, Platform::IOS)
124
+ IPAD_MINI_4 ||= Frameit::Device.new("ipad-mini-4", "Apple iPad Mini 4", 2, [[1536, 2048], [2048, 1536]], 324, Color::SPACE_GRAY)
125
+ IPAD_MINI_2019 ||= Frameit::Device.new("ipad-mini-2019", "Apple iPad Mini (2019)", 3, [[1536, 2048], [2048, 1536]], 324, Color::SPACE_GRAY)
126
126
  # this is 1st or 2nd gen of iPad Pro 12.9:
127
- IPAD_PRO = Frameit::Device.new("ipad-pro", "Apple iPad Pro", 3, [[2048, 2732], [2732, 2048]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_PRO)
127
+ IPAD_PRO ||= Frameit::Device.new("ipad-pro", "Apple iPad Pro", 3, [[2048, 2732], [2732, 2048]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_PRO)
128
128
  # 3rd generation:
129
- IPAD_PRO_12_9 = Frameit::Device.new("ipadPro129", "Apple iPad Pro (12.9-inch) (3rd generation)", 4, [[2048, 2732], [2732, 2048]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_PRO_12_9)
129
+ IPAD_PRO_12_9 ||= Frameit::Device.new("ipadPro129", "Apple iPad Pro (12.9-inch) (3rd generation)", 4, [[2048, 2732], [2732, 2048]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_PRO_12_9)
130
130
  # 4th generation:
131
- IPAD_PRO_12_9_4 = Frameit::Device.new("ipadPro129", "Apple iPad Pro (12.9-inch) (4th generation)", 5, [[2048, 2732], [2732, 2048]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_PRO_12_9)
131
+ IPAD_PRO_12_9_4 ||= Frameit::Device.new("ipadPro129", "Apple iPad Pro (12.9-inch) (4th generation)", 5, [[2048, 2732], [2732, 2048]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_PRO_12_9)
132
132
  # iPad Pro (10.5-inch) is not in frameit-frames repo, but must be included so that we are backward compatible with PR #15373
133
133
  # priority must be lower so that users who didn't copy the frame to their frameit frames folder will not get an error
134
134
  # ID and formatted name must be exactly as specified so that device.detect_device() will select this device if the filename includes them
135
- IPAD_PRO_10_5 = Frameit::Device.new("ipad105", "Apple iPad Pro (10.5-inch)", 1, [[1668, 2224], [2224, 1668]], 265, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_10_5)
136
- IPAD_PRO_11 = Frameit::Device.new("ipadPro11", "Apple iPad Pro (11-inch)", 1, [[1668, 2388], [2388, 1668]], 265, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_11)
135
+ IPAD_PRO_10_5 ||= Frameit::Device.new("ipad105", "Apple iPad Pro (10.5-inch)", 1, [[1668, 2224], [2224, 1668]], 265, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_10_5)
136
+ IPAD_PRO_11 ||= Frameit::Device.new("ipadPro11", "Apple iPad Pro (11-inch)", 1, [[1668, 2388], [2388, 1668]], 265, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_11)
137
137
 
138
- MAC = Frameit::Device.new("mac", "Apple MacBook", 0, [[1280, 800], [1440, 900], [2560, 1600], [2880, 1800]], nil, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::MAC)
138
+ MAC ||= Frameit::Device.new("mac", "Apple MacBook", 0, [[1280, 800], [1440, 900], [2560, 1600], [2880, 1800]], nil, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::MAC)
139
139
 
140
140
  def self.all_device_names_without_apple
141
141
  Devices.constants.map { |c| Devices.const_get(c).formatted_name_without_apple }