fastlane 2.229.0 → 2.232.2

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 (119) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +98 -92
  3. data/bin/fastlane +2 -2
  4. data/deliver/lib/assets/summary.html.erb +3 -3
  5. data/deliver/lib/deliver/app_screenshot.rb +215 -347
  6. data/deliver/lib/deliver/app_screenshot_iterator.rb +4 -1
  7. data/deliver/lib/deliver/app_screenshot_validator.rb +5 -21
  8. data/deliver/lib/deliver/loader.rb +2 -9
  9. data/deliver/lib/deliver/upload_metadata.rb +5 -0
  10. data/deliver/lib/deliver/upload_screenshots.rb +4 -2
  11. data/fastlane/lib/assets/completions/completion.bash +1 -1
  12. data/fastlane/lib/assets/completions/completion.sh +2 -2
  13. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +19 -14
  14. data/fastlane/lib/fastlane/actions/appium.rb +1 -1
  15. data/fastlane/lib/fastlane/actions/docs/create_app_online.md +6 -3
  16. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +3 -1
  17. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +34 -6
  18. data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +2 -0
  19. data/fastlane/lib/fastlane/actions/get_version_number.rb +1 -1
  20. data/fastlane/lib/fastlane/actions/import_certificate.rb +9 -1
  21. data/fastlane/lib/fastlane/actions/increment_build_number.rb +1 -1
  22. data/fastlane/lib/fastlane/actions/install_xcode_plugin.rb +3 -2
  23. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +1 -1
  24. data/fastlane/lib/fastlane/actions/modify_services.rb +1 -0
  25. data/fastlane/lib/fastlane/actions/notarize.rb +1 -1
  26. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +1 -1
  27. data/fastlane/lib/fastlane/actions/xcov.rb +1 -7
  28. data/fastlane/lib/fastlane/cli_tools_distributor.rb +19 -1
  29. data/fastlane/lib/fastlane/console.rb +2 -2
  30. data/fastlane/lib/fastlane/documentation/markdown_docs_generator.rb +4 -4
  31. data/fastlane/lib/fastlane/erb_template_helper.rb +1 -7
  32. data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +1 -1
  33. data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +20 -20
  34. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +1 -1
  35. data/fastlane/lib/fastlane/version.rb +2 -1
  36. data/fastlane/swift/Actions.swift +1 -1
  37. data/fastlane/swift/Appfile.swift +13 -5
  38. data/fastlane/swift/ArgumentProcessor.swift +1 -1
  39. data/fastlane/swift/Atomic.swift +1 -1
  40. data/fastlane/swift/ControlCommand.swift +5 -4
  41. data/fastlane/swift/Deliverfile.swift +2 -2
  42. data/fastlane/swift/DeliverfileProtocol.swift +265 -68
  43. data/fastlane/swift/Fastlane.swift +140 -88
  44. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +3 -1
  45. data/fastlane/swift/Gymfile.swift +2 -2
  46. data/fastlane/swift/GymfileProtocol.swift +227 -54
  47. data/fastlane/swift/LaneFileProtocol.swift +4 -2
  48. data/fastlane/swift/MainProcess.swift +1 -1
  49. data/fastlane/swift/Matchfile.swift +2 -2
  50. data/fastlane/swift/MatchfileProtocol.swift +225 -58
  51. data/fastlane/swift/OptionalConfigValue.swift +1 -1
  52. data/fastlane/swift/Plugins.swift +1 -1
  53. data/fastlane/swift/Precheckfile.swift +2 -2
  54. data/fastlane/swift/PrecheckfileProtocol.swift +45 -13
  55. data/fastlane/swift/RubyCommand.swift +6 -7
  56. data/fastlane/swift/RubyCommandable.swift +1 -1
  57. data/fastlane/swift/Runner.swift +2 -2
  58. data/fastlane/swift/RunnerArgument.swift +1 -1
  59. data/fastlane/swift/Scanfile.swift +2 -2
  60. data/fastlane/swift/ScanfileProtocol.swift +332 -82
  61. data/fastlane/swift/Screengrabfile.swift +2 -2
  62. data/fastlane/swift/ScreengrabfileProtocol.swift +89 -24
  63. data/fastlane/swift/Snapshotfile.swift +2 -2
  64. data/fastlane/swift/SnapshotfileProtocol.swift +216 -53
  65. data/fastlane/swift/SocketClient.swift +2 -2
  66. data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
  67. data/fastlane/swift/SocketResponse.swift +1 -1
  68. data/fastlane/swift/main.swift +1 -1
  69. data/fastlane_core/lib/fastlane_core/cert_checker.rb +10 -0
  70. data/fastlane_core/lib/fastlane_core/fastlane_pty.rb +5 -1
  71. data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +14 -0
  72. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +38 -8
  73. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +3 -1
  74. data/fastlane_core/lib/fastlane_core/project.rb +8 -0
  75. data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +7 -1
  76. data/frameit/lib/frameit/device.rb +2 -2
  77. data/frameit/lib/frameit/device_types.rb +108 -70
  78. data/frameit/lib/frameit/template_finder.rb +1 -1
  79. data/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh +1 -0
  80. data/gym/lib/gym/module.rb +9 -4
  81. data/gym/lib/gym/options.rb +20 -2
  82. data/gym/lib/gym/runner.rb +38 -3
  83. data/produce/lib/produce/commands_generator.rb +2 -0
  84. data/produce/lib/produce/developer_center.rb +1 -0
  85. data/produce/lib/produce/service.rb +6 -1
  86. data/scan/lib/scan/error_handler.rb +5 -0
  87. data/scan/lib/scan/options.rb +11 -1
  88. data/scan/lib/scan/test_command_generator.rb +8 -0
  89. data/sigh/lib/assets/resign.sh +6 -3
  90. data/sigh/lib/sigh/local_manage.rb +6 -4
  91. data/sigh/lib/sigh/runner.rb +18 -1
  92. data/snapshot/lib/snapshot/detect_values.rb +1 -1
  93. data/snapshot/lib/snapshot/options.rb +13 -1
  94. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +4 -2
  95. data/spaceship/lib/spaceship/client.rb +32 -2
  96. data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +62 -8
  97. data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +4 -4
  98. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +7 -1
  99. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +16 -16
  100. data/spaceship/lib/spaceship/connect_api/models/build_upload.rb +42 -0
  101. data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +2 -0
  102. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +32 -2
  103. data/spaceship/lib/spaceship/connect_api/models/webhook.rb +62 -0
  104. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +0 -6
  105. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +9 -0
  106. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +38 -0
  107. data/spaceship/lib/spaceship/connect_api.rb +2 -0
  108. data/spaceship/lib/spaceship/errors.rb +8 -6
  109. data/spaceship/lib/spaceship/portal/key.rb +22 -3
  110. data/spaceship/lib/spaceship/portal/portal_client.rb +29 -2
  111. data/spaceship/lib/spaceship/spaceauth_runner.rb +5 -15
  112. data/supply/lib/supply/client.rb +18 -1
  113. data/trainer/lib/trainer/legacy_xcresult.rb +1 -1
  114. data/trainer/lib/trainer/test_parser.rb +1 -1
  115. data/trainer/lib/trainer/xcresult/helper.rb +11 -1
  116. metadata +116 -41
  117. data/fastlane/lib/fastlane/core_ext/bundler_monkey_patch.rb +0 -14
  118. data/fastlane/lib/fastlane/plugins/template/.circleci/config.yml +0 -43
  119. data/fastlane/lib/fastlane/plugins/template/.travis.yml +0 -4
@@ -71,9 +71,9 @@ module Frameit
71
71
  return nil
72
72
  end
73
73
 
74
- # Previously ENV[FRAMEIT_FORCE_DEVICE_TYPE] was matched to Deliver::AppScreenshot::ScreenSize constants. However,
74
+ # Previously ENV[FRAMEIT_FORCE_DEVICE_TYPE] was matched to Deliver::AppScreenshot display type strings.
75
75
  # options.rb defined a few Apple devices with unspecified IDs, this option was never read from Frameit.config.
76
- # Therefore this function matches both ScreenSize constants and formatted names to maintain backward compatibility.
76
+ # Therefore this function matches both DisplayType constants and formatted names to maintain backward compatibility.
77
77
  def self.find_device_by_id_or_name(id)
78
78
  return nil if id.nil?
79
79
  found_device = nil
@@ -1,8 +1,46 @@
1
1
  require_relative 'module'
2
2
  require_relative './device'
3
- require 'deliver/app_screenshot'
3
+ require 'spaceship/connect_api/models/app_screenshot_set'
4
4
 
5
5
  module Frameit
6
+ DisplayType = Spaceship::ConnectAPI::AppScreenshotSet::DisplayType
7
+
8
+ DEVICE_SCREEN_IDS = {
9
+ DisplayType::APP_IPHONE_35 => "iOS-3.5-in",
10
+ DisplayType::APP_IPHONE_40 => "iOS-4-in",
11
+ DisplayType::APP_IPHONE_47 => "iOS-4.7-in",
12
+ DisplayType::APP_IPHONE_55 => "iOS-5.5-in",
13
+ DisplayType::APP_IPHONE_58 => "iOS-5.8-in",
14
+ DisplayType::APP_IPHONE_61 => "iOS-6.1-in",
15
+ DisplayType::APP_IPHONE_65 => "iOS-6.5-in",
16
+ DisplayType::APP_IPHONE_67 => "iOS-6.7-in",
17
+ DisplayType::APP_IPAD_97 => "iOS-iPad",
18
+ DisplayType::APP_IPAD_105 => "iOS-iPad-10.5",
19
+ DisplayType::APP_IPAD_PRO_3GEN_11 => "iOS-iPad-11",
20
+ DisplayType::APP_IPAD_PRO_129 => "iOS-iPad-Pro",
21
+ DisplayType::APP_IPAD_PRO_3GEN_129 => "iOS-iPad-Pro-12.9",
22
+ DisplayType::IMESSAGE_APP_IPHONE_40 => "iOS-4-in-messages",
23
+ DisplayType::IMESSAGE_APP_IPHONE_47 => "iOS-4.7-in-messages",
24
+ DisplayType::IMESSAGE_APP_IPHONE_55 => "iOS-5.5-in-messages",
25
+ DisplayType::IMESSAGE_APP_IPHONE_58 => "iOS-5.8-in-messages",
26
+ DisplayType::IMESSAGE_APP_IPHONE_61 => "iOS-6.1-in-messages",
27
+ DisplayType::IMESSAGE_APP_IPHONE_65 => "iOS-6.5-in-messages",
28
+ DisplayType::IMESSAGE_APP_IPHONE_67 => "iOS-6.7-in-messages",
29
+ DisplayType::IMESSAGE_APP_IPAD_97 => "iOS-iPad-messages",
30
+ DisplayType::IMESSAGE_APP_IPAD_105 => "iOS-iPad-10.5-messages",
31
+ DisplayType::IMESSAGE_APP_IPAD_PRO_3GEN_11 => "iOS-iPad-11-messages",
32
+ DisplayType::IMESSAGE_APP_IPAD_PRO_129 => "iOS-iPad-Pro-messages",
33
+ DisplayType::IMESSAGE_APP_IPAD_PRO_3GEN_129 => "iOS-iPad-Pro-12.9-messages",
34
+ DisplayType::APP_WATCH_SERIES_3 => "iOS-Apple-Watch",
35
+ DisplayType::APP_WATCH_SERIES_4 => "iOS-Apple-Watch-Series4",
36
+ DisplayType::APP_WATCH_SERIES_7 => "iOS-Apple-Watch-Series7",
37
+ DisplayType::APP_WATCH_SERIES_10 => "iOS-Apple-Watch-Series10",
38
+ DisplayType::APP_WATCH_ULTRA => "iOS-Apple-Watch-Ultra",
39
+ DisplayType::APP_APPLE_TV => "Apple-TV",
40
+ DisplayType::APP_DESKTOP => "Mac",
41
+ DisplayType::APP_APPLE_VISION_PRO => "visionOS-Vision-Pro"
42
+ }.freeze
43
+
6
44
  module Color
7
45
  MATTE_BLACK ||= "Matte Black"
8
46
  SPACE_GRAY ||= "Space Gray"
@@ -81,80 +119,80 @@ module Frameit
81
119
  end
82
120
 
83
121
  module Devices
84
- GOOGLE_PIXEL_3 ||= Frameit::Device.new("google-pixel-3", "Google Pixel 3", 7, [[1080, 2160], [2160, 1080]], 443, Color::JUST_BLACK, Platform::ANDROID)
85
- 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)
122
+ GOOGLE_PIXEL_3 ||= Device.new("google-pixel-3", "Google Pixel 3", 7, [[1080, 2160], [2160, 1080]], 443, Color::JUST_BLACK, Platform::ANDROID)
123
+ 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)
86
124
  # Google Pixel 4's priority should be higher than Samsung Galaxy S10+ (priority 8):
87
- GOOGLE_PIXEL_4 ||= Frameit::Device.new("google-pixel-4", "Google Pixel 4", 9, [[1080, 2280], [2280, 1080]], 444, Color::JUST_BLACK, Platform::ANDROID)
88
- 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)
89
- GOOGLE_PIXEL_5 ||= Frameit::Device.new("google-pixel-5", "Google Pixel 5", 10, [[1080, 2340], [2340, 1080]], 432, Color::JUST_BLACK, Platform::ANDROID)
90
- HTC_ONE_A9 ||= Frameit::Device.new("htc-one-a9", "HTC One A9", 6, [[1080, 1920], [1920, 1080]], 441, Color::BLACK, Platform::ANDROID)
91
- HTC_ONE_M8 ||= Frameit::Device.new("htc-one-m8", "HTC One M8", 3, [[1080, 1920], [1920, 1080]], 441, Color::BLACK, Platform::ANDROID)
92
- HUAWEI_P8 ||= Frameit::Device.new("huawei-p8", "Huawei P8", 5, [[1080, 1920], [1920, 1080]], 424, Color::BLACK, Platform::ANDROID)
93
- MOTOROLA_MOTO_E ||= Frameit::Device.new("motorola-moto-e", "Motorola Moto E", 3, [[540, 960], [960, 540]], 245, Color::BLACK, Platform::ANDROID)
94
- MOTOROLA_MOTO_G ||= Frameit::Device.new("motorola-moto-g", "Motorola Moto G", 4, [[1080, 1920], [1920, 1080]], 401, nil, Platform::ANDROID, nil)
95
- NEXUS_4 ||= Frameit::Device.new("nexus-4", "Nexus 4", 7, [[768, 1280], [1820, 768]], 318, nil, Platform::ANDROID)
96
- NEXUS_5X ||= Frameit::Device.new("nexus-5x", "Nexus 5X", 7, [[1080, 1920], [1920, 1080]], 423, nil, Platform::ANDROID)
97
- NEXUS_6P ||= Frameit::Device.new("nexus-6p", "Nexus 6P", 7, [[1440, 2560], [2560, 1440]], 518, nil, Platform::ANDROID)
98
- NEXUS_9 ||= Frameit::Device.new("nexus-9", "Nexus 9", 7, [[1536, 2048], [2048, 1536]], 281, nil, Platform::ANDROID)
99
- 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)
100
- 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)
101
- 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)
102
- 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)
103
- SAMSUNG_GALAXY_S_DUOS ||= Frameit::Device.new("samsung-galaxy-s-duos", "Samsung Galaxy S Duos", 3, [[480, 800], [800, 480]], 233, nil, Platform::ANDROID)
104
- SAMSUNG_GALAXY_S3 ||= Frameit::Device.new("samsung-galaxy-s3", "Samsung Galaxy S3", 3, [[720, 1280], [1280, 720]], 306, nil, Platform::ANDROID)
105
- SAMSUNG_GALAXY_S5 ||= Frameit::Device.new("samsung-galaxy-s5", "Samsung Galaxy S5", 3, [[1080, 1920], [1920, 1080]], 432, Color::BLACK, Platform::ANDROID)
106
- SAMSUNG_GALAXY_S7 ||= Frameit::Device.new("samsung-galaxy-s7", "Samsung Galaxy S7", 4, [[1440, 2560], [2560, 1440]], 577, Color::BLACK, Platform::ANDROID)
107
- SAMSUNG_GALAXY_S8 ||= Frameit::Device.new("samsung-galaxy-s8", "Samsung Galaxy S8", 5, [[1440, 2960], [2960, 1440]], 570, Color::MIDNIGHT_BLACK, Platform::ANDROID)
108
- SAMSUNG_GALAXY_S9 ||= Frameit::Device.new("samsung-galaxy-s9", "Samsung Galaxy S9", 6, [[1440, 2960], [2960, 1440]], 570, Color::MIDNIGHT_BLACK, Platform::ANDROID)
109
- SAMSUNG_GALAXY_S10 ||= Frameit::Device.new("samsung-galaxy-s10", "Samsung Galaxy S10", 7, [[1440, 3040], [3040, 1440]], 550, Color::PRISM_BLACK, Platform::ANDROID)
110
- 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)
111
- XIAOMI_MI_MIX_ALPHA ||= Frameit::Device.new("xiaomi-mi-mix-alpha", "Xiaomi Mi Mix Alpha", 1, [[2088, 2250], [2250, 2088]], 388, nil, Platform::ANDROID)
112
- 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)
113
- IPHONE_5C ||= Frameit::Device.new("iphone-5c", "Apple iPhone 5c", 2, [[640, 1136], [1136, 640]], 326, Color::WHITE)
114
- 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)
115
- 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)
116
- 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)
117
- 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)
118
- 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)
119
- IPHONE_8 ||= Frameit::Device.new("iphone-8", "Apple iPhone 8", 6, [[750, 1334], [1334, 750]], 326, Color::SPACE_GRAY)
120
- IPHONE_8_PLUS ||= Frameit::Device.new("iphone-8-plus", "Apple iPhone 8 Plus", 6, [[1242, 2208], [2208, 1242]], 401, Color::SPACE_GRAY)
121
- 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)
122
- 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)
123
- 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_65, :use_legacy_iphonexsmax)
124
- 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)
125
- IPHONE_11 ||= Frameit::Device.new("iphone-11", "Apple iPhone 11", 9, [[828, 1792], [1792, 828]], 326, Color::BLACK, Platform::IOS)
126
- IPHONE_11_PRO ||= Frameit::Device.new("iphone-11-pro", "Apple iPhone 11 Pro", 9, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS)
127
- 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)
128
- IPHONE_12 ||= Frameit::Device.new("iphone-12", "Apple iPhone 12", 10, [[1170, 2532], [2532, 1170]], 460, Color::BLACK, Platform::IOS)
129
- IPHONE_12_PRO ||= Frameit::Device.new("iphone-12-pro", "Apple iPhone 12 Pro", 10, [[1170, 2532], [2532, 1170]], 460, Color::SPACE_GRAY, Platform::IOS)
130
- IPHONE_12_PRO_MAX ||= Frameit::Device.new("iphone12-pro-max", "Apple iPhone 12 Pro Max", 10, [[1284, 2778], [2778, 1284]], 458, Color::GRAPHITE, Platform::IOS)
131
- IPHONE_12_MINI ||= Frameit::Device.new("iphone-12-mini", "Apple iPhone 12 Mini", 10, [[1125, 2436], [2436, 1125]], 476, Color::BLACK, Platform::IOS)
132
- IPHONE_13 ||= Frameit::Device.new("iphone-13", "Apple iPhone 13", 11, [[1170, 2532], [2532, 1170]], 460, Color::MIDNIGHT, Platform::IOS)
133
- IPHONE_13_PRO ||= Frameit::Device.new("iphone-13-pro", "Apple iPhone 13 Pro", 11, [[1170, 2532], [2532, 1170]], 460, Color::GRAPHITE, Platform::IOS)
134
- IPHONE_13_PRO_MAX ||= Frameit::Device.new("iphone13-pro-max", "Apple iPhone 13 Pro Max", 11, [[1284, 2778], [2778, 1284]], 458, Color::GRAPHITE, Platform::IOS)
135
- IPHONE_13_MINI ||= Frameit::Device.new("iphone-13-mini", "Apple iPhone 13 Mini", 11, [[1080, 2340], [2340, 1080]], 476, Color::MIDNIGHT, Platform::IOS)
136
- IPHONE_14 ||= Frameit::Device.new("iphone-14", "Apple iPhone 14", 12, [[1170, 2532], [2532, 1170]], 460, Color::MIDNIGHT, Platform::IOS)
137
- IPHONE_14_PLUS ||= Frameit::Device.new("iphone-14-plus", "Apple iPhone 14 Plus", 12, [[1284, 2778], [2778, 1284]], 458, Color::MIDNIGHT, Platform::IOS)
138
- IPHONE_14_PRO ||= Frameit::Device.new("iphone-14-pro", "Apple iPhone 14 Pro", 12, [[1178, 2556], [2556, 1178]], 460, Color::PURPLE, Platform::IOS)
139
- IPHONE_14_PRO_MAX ||= Frameit::Device.new("iphone14-pro-max", "Apple iPhone 14 Pro Max", 12, [[1290, 2796], [2796, 1290]], 458, Color::PURPLE, Platform::IOS)
140
- IPAD_10_2 ||= Frameit::Device.new("ipad-10-2", "Apple iPad 10.2", 1, [[1620, 2160], [2160, 1620]], 264, Color::SPACE_GRAY, Platform::IOS)
141
- 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)
142
- IPAD_AIR_2019 ||= Frameit::Device.new("ipad-air-2019", "Apple iPad Air (2019)", 2, [[1668, 2224], [2224, 1668]], 265, Color::SPACE_GRAY, Platform::IOS)
143
- IPAD_MINI_4 ||= Frameit::Device.new("ipad-mini-4", "Apple iPad Mini 4", 2, [[1536, 2048], [2048, 1536]], 324, Color::SPACE_GRAY)
144
- IPAD_MINI_2019 ||= Frameit::Device.new("ipad-mini-2019", "Apple iPad Mini (2019)", 3, [[1536, 2048], [2048, 1536]], 324, Color::SPACE_GRAY)
145
- # this is 1st or 2nd gen of iPad Pro 12.9:
146
- 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)
147
- # 3rd generation:
148
- 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)
149
- # 4th generation:
150
- 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)
125
+ GOOGLE_PIXEL_4 ||= Device.new("google-pixel-4", "Google Pixel 4", 9, [[1080, 2280], [2280, 1080]], 444, Color::JUST_BLACK, Platform::ANDROID)
126
+ GOOGLE_PIXEL_4_XL ||= Device.new("google-pixel-4-xl", "Google Pixel 4 XL", 9, [[1440, 3040], [3040, 1440]], 537, Color::JUST_BLACK, Platform::ANDROID)
127
+ GOOGLE_PIXEL_5 ||= Device.new("google-pixel-5", "Google Pixel 5", 10, [[1080, 2340], [2340, 1080]], 432, Color::JUST_BLACK, Platform::ANDROID)
128
+ HTC_ONE_A9 ||= Device.new("htc-one-a9", "HTC One A9", 6, [[1080, 1920], [1920, 1080]], 441, Color::BLACK, Platform::ANDROID)
129
+ HTC_ONE_M8 ||= Device.new("htc-one-m8", "HTC One M8", 3, [[1080, 1920], [1920, 1080]], 441, Color::BLACK, Platform::ANDROID)
130
+ HUAWEI_P8 ||= Device.new("huawei-p8", "Huawei P8", 5, [[1080, 1920], [1920, 1080]], 424, Color::BLACK, Platform::ANDROID)
131
+ MOTOROLA_MOTO_E ||= Device.new("motorola-moto-e", "Motorola Moto E", 3, [[540, 960], [960, 540]], 245, Color::BLACK, Platform::ANDROID)
132
+ MOTOROLA_MOTO_G ||= Device.new("motorola-moto-g", "Motorola Moto G", 4, [[1080, 1920], [1920, 1080]], 401, nil, Platform::ANDROID, nil)
133
+ NEXUS_4 ||= Device.new("nexus-4", "Nexus 4", 7, [[768, 1280], [1820, 768]], 318, nil, Platform::ANDROID)
134
+ NEXUS_5X ||= Device.new("nexus-5x", "Nexus 5X", 7, [[1080, 1920], [1920, 1080]], 423, nil, Platform::ANDROID)
135
+ NEXUS_6P ||= Device.new("nexus-6p", "Nexus 6P", 7, [[1440, 2560], [2560, 1440]], 518, nil, Platform::ANDROID)
136
+ NEXUS_9 ||= Device.new("nexus-9", "Nexus 9", 7, [[1536, 2048], [2048, 1536]], 281, nil, Platform::ANDROID)
137
+ SAMSUNG_GALAXY_GRAND_PRIME ||= Device.new("samsung-galaxy-grand-prime", "Samsung Galaxy Grand Prime", 5, [[540, 960], [960, 540]], 220, Color::BLACK, Platform::ANDROID)
138
+ SAMSUNG_GALAXY_NOTE_5 ||= Device.new("samsung-galaxy-note-5", "Samsung Galaxy Note 5", 5, [[1440, 2560], [2560, 1440]], 518, Color::BLACK, Platform::ANDROID)
139
+ SAMSUNG_GALAXY_NOTE_10 ||= Device.new("samsung-galaxy-note-10", "Samsung Galaxy Note 10", 6, [[1080, 2280], [2280, 1080]], 401, Color::AURA_BLACK, Platform::ANDROID)
140
+ SAMSUNG_GALAXY_NOTE_10_PLUS ||= Device.new("samsung-galaxy-note-10-plus", "Samsung Galaxy Note 10+", 7, [[1440, 3040], [3040, 1440]], 498, Color::AURA_BLACK, Platform::ANDROID)
141
+ SAMSUNG_GALAXY_S_DUOS ||= Device.new("samsung-galaxy-s-duos", "Samsung Galaxy S Duos", 3, [[480, 800], [800, 480]], 233, nil, Platform::ANDROID)
142
+ SAMSUNG_GALAXY_S3 ||= Device.new("samsung-galaxy-s3", "Samsung Galaxy S3", 3, [[720, 1280], [1280, 720]], 306, nil, Platform::ANDROID)
143
+ SAMSUNG_GALAXY_S5 ||= Device.new("samsung-galaxy-s5", "Samsung Galaxy S5", 3, [[1080, 1920], [1920, 1080]], 432, Color::BLACK, Platform::ANDROID)
144
+ SAMSUNG_GALAXY_S7 ||= Device.new("samsung-galaxy-s7", "Samsung Galaxy S7", 4, [[1440, 2560], [2560, 1440]], 577, Color::BLACK, Platform::ANDROID)
145
+ SAMSUNG_GALAXY_S8 ||= Device.new("samsung-galaxy-s8", "Samsung Galaxy S8", 5, [[1440, 2960], [2960, 1440]], 570, Color::MIDNIGHT_BLACK, Platform::ANDROID)
146
+ SAMSUNG_GALAXY_S9 ||= Device.new("samsung-galaxy-s9", "Samsung Galaxy S9", 6, [[1440, 2960], [2960, 1440]], 570, Color::MIDNIGHT_BLACK, Platform::ANDROID)
147
+ SAMSUNG_GALAXY_S10 ||= Device.new("samsung-galaxy-s10", "Samsung Galaxy S10", 7, [[1440, 3040], [3040, 1440]], 550, Color::PRISM_BLACK, Platform::ANDROID)
148
+ SAMSUNG_GALAXY_S10_PLUS ||= Device.new("samsung-galaxy-s10-plus", "Samsung Galaxy S10+", 8, [[1440, 3040], [3040, 1440]], 522, Color::PRISM_BLACK, Platform::ANDROID)
149
+ XIAOMI_MI_MIX_ALPHA ||= Device.new("xiaomi-mi-mix-alpha", "Xiaomi Mi Mix Alpha", 1, [[2088, 2250], [2250, 2088]], 388, nil, Platform::ANDROID)
150
+ 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)
151
+ IPHONE_5C ||= Device.new("iphone-5c", "Apple iPhone 5c", 2, [[640, 1136], [1136, 640]], 326, Color::WHITE)
152
+ 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])
153
+ IPHONE_6S ||= Device.new("iphone-6s", "Apple iPhone 6s", 4, [[750, 1334], [1334, 750]], 326, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPHONE_47], :use_legacy_iphone6s)
154
+ IPHONE_6S_PLUS ||= Device.new("iphone-6s-plus", "Apple iPhone 6s Plus", 4, [[1242, 2208], [2208, 1242]], 401, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPHONE_55], :use_legacy_iphone6s)
155
+ IPHONE_7 ||= Device.new("iphone-7", "Apple iPhone 7", 5, [[750, 1334], [1334, 750]], 326, Color::MATTE_BLACK, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPHONE_47], :use_legacy_iphone7)
156
+ IPHONE_7_PLUS ||= Device.new("iphone-7-plus", "Apple iPhone 7 Plus", 5, [[1242, 2208], [2208, 1242]], 401, Color::MATTE_BLACK, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPHONE_55], :use_legacy_iphone7)
157
+ IPHONE_8 ||= Device.new("iphone-8", "Apple iPhone 8", 6, [[750, 1334], [1334, 750]], 326, Color::SPACE_GRAY)
158
+ IPHONE_8_PLUS ||= Device.new("iphone-8-plus", "Apple iPhone 8 Plus", 6, [[1242, 2208], [2208, 1242]], 401, Color::SPACE_GRAY)
159
+ IPHONE_X ||= Device.new("iphone-X", "Apple iPhone X", 7, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPHONE_58], :use_legacy_iphonex)
160
+ IPHONE_XS ||= Device.new("iphone-XS", "Apple iPhone XS", 8, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPHONE_58], :use_legacy_iphonexs)
161
+ IPHONE_XR ||= Device.new("iphone-XR", "Apple iPhone XR", 8, [[828, 1792], [1792, 828]], 326, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPHONE_65], :use_legacy_iphonexsmax)
162
+ IPHONE_XS_MAX ||= Device.new("iphone-XS-Max", "Apple iPhone XS Max", 8, [[1242, 2688], [2688, 1242]], 458, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPHONE_65], :use_legacy_iphonexsmax)
163
+ IPHONE_11 ||= Device.new("iphone-11", "Apple iPhone 11", 9, [[828, 1792], [1792, 828]], 326, Color::BLACK, Platform::IOS)
164
+ IPHONE_11_PRO ||= Device.new("iphone-11-pro", "Apple iPhone 11 Pro", 9, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS)
165
+ 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)
166
+ IPHONE_12 ||= Device.new("iphone-12", "Apple iPhone 12", 10, [[1170, 2532], [2532, 1170]], 460, Color::BLACK, Platform::IOS)
167
+ IPHONE_12_PRO ||= Device.new("iphone-12-pro", "Apple iPhone 12 Pro", 10, [[1170, 2532], [2532, 1170]], 460, Color::SPACE_GRAY, Platform::IOS)
168
+ IPHONE_12_PRO_MAX ||= Device.new("iphone12-pro-max", "Apple iPhone 12 Pro Max", 10, [[1284, 2778], [2778, 1284]], 458, Color::GRAPHITE, Platform::IOS)
169
+ IPHONE_12_MINI ||= Device.new("iphone-12-mini", "Apple iPhone 12 Mini", 10, [[1125, 2436], [2436, 1125]], 476, Color::BLACK, Platform::IOS)
170
+ IPHONE_13 ||= Device.new("iphone-13", "Apple iPhone 13", 11, [[1170, 2532], [2532, 1170]], 460, Color::MIDNIGHT, Platform::IOS)
171
+ IPHONE_13_PRO ||= Device.new("iphone-13-pro", "Apple iPhone 13 Pro", 11, [[1170, 2532], [2532, 1170]], 460, Color::GRAPHITE, Platform::IOS)
172
+ IPHONE_13_PRO_MAX ||= Device.new("iphone13-pro-max", "Apple iPhone 13 Pro Max", 11, [[1284, 2778], [2778, 1284]], 458, Color::GRAPHITE, Platform::IOS)
173
+ IPHONE_13_MINI ||= Device.new("iphone-13-mini", "Apple iPhone 13 Mini", 11, [[1080, 2340], [2340, 1080]], 476, Color::MIDNIGHT, Platform::IOS)
174
+ IPHONE_14 ||= Device.new("iphone-14", "Apple iPhone 14", 12, [[1170, 2532], [2532, 1170]], 460, Color::MIDNIGHT, Platform::IOS)
175
+ IPHONE_14_PLUS ||= Device.new("iphone-14-plus", "Apple iPhone 14 Plus", 12, [[1284, 2778], [2778, 1284]], 458, Color::MIDNIGHT, Platform::IOS)
176
+ IPHONE_14_PRO ||= Device.new("iphone-14-pro", "Apple iPhone 14 Pro", 12, [[1179, 2556], [2556, 1179]], 460, Color::PURPLE, Platform::IOS)
177
+ IPHONE_14_PRO_MAX ||= Device.new("iphone14-pro-max", "Apple iPhone 14 Pro Max", 12, [[1290, 2796], [2796, 1290]], 458, Color::PURPLE, Platform::IOS)
178
+ IPAD_10_2 ||= Device.new("ipad-10-2", "Apple iPad 10.2", 1, [[1620, 2160], [2160, 1620]], 264, Color::SPACE_GRAY, Platform::IOS)
179
+ IPAD_AIR_2 ||= Device.new("ipad-air-2", "Apple iPad Air 2", 1, [[1536, 2048], [2048, 1536]], 264, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPAD_97])
180
+ IPAD_AIR_2019 ||= Device.new("ipad-air-2019", "Apple iPad Air (2019)", 2, [[1668, 2224], [2224, 1668]], 265, Color::SPACE_GRAY, Platform::IOS)
181
+ IPAD_MINI_4 ||= Device.new("ipad-mini-4", "Apple iPad Mini 4", 2, [[1536, 2048], [2048, 1536]], 324, Color::SPACE_GRAY)
182
+ IPAD_MINI_2019 ||= Device.new("ipad-mini-2019", "Apple iPad Mini (2019)", 3, [[1536, 2048], [2048, 1536]], 324, Color::SPACE_GRAY)
183
+ # iPad Pro 12.9" (2nd gen):
184
+ IPAD_PRO ||= Device.new("ipad-pro", "Apple iPad Pro", 3, [[2048, 2732], [2732, 2048]], 264, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_IPAD_PRO_129])
185
+ # iPad Pro 13" (3rd gen - rebranded from 12.9"):
186
+ 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])
187
+ # iPad Pro 13" (4th gen):
188
+ 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])
151
189
  # iPad Pro (10.5-inch) is not in frameit-frames repo, but must be included so that we are backward compatible with PR #15373
152
190
  # priority must be lower so that users who didn't copy the frame to their frameit frames folder will not get an error
153
191
  # ID and formatted name must be exactly as specified so that device.detect_device() will select this device if the filename includes them
154
- 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)
155
- 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)
192
+ 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])
193
+ 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])
156
194
 
157
- 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)
195
+ MAC ||= Device.new("mac", "Apple MacBook", 0, [[1280, 800], [1440, 900], [2560, 1600], [2880, 1800]], nil, Color::SPACE_GRAY, Platform::IOS, DEVICE_SCREEN_IDS[DisplayType::APP_DESKTOP])
158
196
 
159
197
  def self.all_device_names_without_apple
160
198
  Devices.constants.map { |c| Devices.const_get(c).formatted_name_without_apple }
@@ -24,7 +24,7 @@ module Frameit
24
24
  end
25
25
 
26
26
  if templates.count == 0
27
- if screenshot.deliver_screen_id == Deliver::AppScreenshot::ScreenSize::IOS_35
27
+ if screenshot.deliver_screen_id == DEVICE_SCREEN_IDS[DisplayType::APP_IPHONE_35]
28
28
  UI.important("Unfortunately 3.5\" device frames were discontinued. Skipping screen '#{screenshot.path}'")
29
29
  UI.error("Looked for: '#{filename}.png'")
30
30
  else
@@ -28,6 +28,7 @@ if [[ $? -eq 0 ]]; then
28
28
  echo "RVM detected, forcing to use system ruby"
29
29
  # This allows you to use rvm in a script. Otherwise you get a BS
30
30
  # error along the lines of "cannot use rvm as function". Jeez.
31
+ # shellcheck disable=SC1091
31
32
  [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
32
33
 
33
34
  # Cause rvm to use system ruby. AFAIK, this is effective only for
@@ -25,6 +25,14 @@ module Gym
25
25
  require 'gym/xcodebuild_fixes/generic_archive_fix'
26
26
  end
27
27
 
28
+ def building_for_ipa?
29
+ return !building_for_pkg?
30
+ end
31
+
32
+ def building_for_pkg?
33
+ return building_for_mac?
34
+ end
35
+
28
36
  def building_for_ios?
29
37
  if Gym.project.mac?
30
38
  # Can be building for iOS if mac project and catalyst or multiplatform and set to iOS
@@ -43,10 +51,7 @@ module Gym
43
51
  # Can be a mac project and not build mac if catalyst
44
52
  return building_mac_catalyst_for_mac?
45
53
  else
46
- # Can be mac project but multiplatform and building for iOS
47
- return false if building_multiplatform_for_ios?
48
-
49
- return Gym.project.mac?
54
+ return (!Gym.project.multiplatform? && Gym.project.mac?) || building_multiplatform_for_mac?
50
55
  end
51
56
  end
52
57
 
@@ -4,6 +4,7 @@ require 'credentials_manager/appfile_config'
4
4
  require_relative 'module'
5
5
 
6
6
  module Gym
7
+ # rubocop:disable Metrics/ClassLength
7
8
  class Options
8
9
  def self.available_options
9
10
  return @options if @options
@@ -305,6 +306,11 @@ module Gym
305
306
  description: "Sets a custom path for Swift Package Manager dependencies",
306
307
  type: String,
307
308
  optional: true),
309
+ FastlaneCore::ConfigItem.new(key: :package_cache_path,
310
+ env_name: "GYM_PACKAGE_CACHE_PATH",
311
+ description: "Sets a custom package cache path for Swift Package Manager dependencies",
312
+ type: String,
313
+ optional: true),
308
314
  FastlaneCore::ConfigItem.new(key: :skip_package_dependencies_resolution,
309
315
  env_name: "GYM_SKIP_PACKAGE_DEPENDENCIES_RESOLUTION",
310
316
  description: "Skips resolution of Swift Package Manager dependencies",
@@ -312,7 +318,12 @@ module Gym
312
318
  default_value: false),
313
319
  FastlaneCore::ConfigItem.new(key: :disable_package_automatic_updates,
314
320
  env_name: "GYM_DISABLE_PACKAGE_AUTOMATIC_UPDATES",
315
- description: "Prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file",
321
+ description: "Prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file. This translates in the option `-disableAutomaticPackageResolution` being passed to xcodebuild",
322
+ type: Boolean,
323
+ default_value: false),
324
+ FastlaneCore::ConfigItem.new(key: :skip_package_repository_fetches,
325
+ env_name: "GYM_SKIP_PACKAGE_REPOSITORY_FETCHES",
326
+ description: "Skips updating package dependencies from their remote. This translates in the option `-skipPackageUpdates` being passed to xcodebuild",
316
327
  type: Boolean,
317
328
  default_value: false),
318
329
  FastlaneCore::ConfigItem.new(key: :use_system_scm,
@@ -329,8 +340,15 @@ module Gym
329
340
  verify_block: proc do |value|
330
341
  av = %w(netrc keychain)
331
342
  UI.user_error!("Unsupported authorization provider '#{value}', must be: #{av}") unless av.include?(value)
332
- end)
343
+ end),
344
+ FastlaneCore::ConfigItem.new(key: :generate_appstore_info,
345
+ env_name: "GYM_GENERATE_APPSTORE_INFO",
346
+ description: "Generate AppStoreInfo.plist using swinfo for app-store exports",
347
+ type: Boolean,
348
+ optional: true,
349
+ default_value: false)
333
350
  ]
334
351
  end
335
352
  end
353
+ # rubocop:enable Metrics/ClassLength
336
354
  end
@@ -24,7 +24,7 @@ module Gym
24
24
  FileUtils.mkdir_p(File.expand_path(Gym.config[:output_directory]))
25
25
 
26
26
  # Archive
27
- if Gym.building_for_ios?
27
+ if Gym.building_for_ipa?
28
28
  fix_generic_archive unless Gym.project.watchos? # See https://github.com/fastlane/fastlane/pull/4325
29
29
  return BuildCommandGenerator.archive_path if Gym.config[:skip_package_ipa]
30
30
 
@@ -38,9 +38,10 @@ module Gym
38
38
  move_app_thinning_size_report
39
39
  move_apps_folder
40
40
  move_asset_packs
41
- move_appstore_info
41
+ appstore_info_path = move_appstore_info
42
+ generate_appstore_info(path) unless appstore_info_path
42
43
  end
43
- elsif Gym.building_for_mac?
44
+ elsif Gym.building_for_pkg?
44
45
  path = File.expand_path(Gym.config[:output_directory])
45
46
  compress_and_move_dsym
46
47
  if Gym.project.mac_app? || Gym.building_mac_catalyst_for_mac?
@@ -369,6 +370,40 @@ module Gym
369
370
  end
370
371
  end
371
372
 
373
+ # Create AppStoreInfo.plist using swinfo for iOS app-store exports
374
+ def generate_appstore_info(ipa_path)
375
+ return unless Gym.config[:generate_appstore_info] && Gym.building_for_ios? && Gym.config[:export_method] == 'app-store'
376
+
377
+ swinfo_plist_path = File.join(File.expand_path(Gym.config[:output_directory]), "AppStoreInfo.plist")
378
+ swinfo_path = File.join(FastlaneCore::Helper.xcode_path, "usr/bin/swinfo")
379
+
380
+ begin
381
+ UI.message("Generating AppStoreInfo.plist...")
382
+
383
+ # Build the swinfo command
384
+ command = [
385
+ "xcrun",
386
+ swinfo_path.shellescape,
387
+ "-f", ipa_path.shellescape,
388
+ "-o", swinfo_plist_path.shellescape,
389
+ "-prettyprint", "true",
390
+ "--plistFormat", "binary"
391
+ ].join(" ")
392
+
393
+ FastlaneCore::CommandExecutor.execute(command: command, print_all: FastlaneCore::Globals.verbose?, print_command: true)
394
+
395
+ if File.exist?(swinfo_plist_path)
396
+ UI.success("Successfully generated AppStoreInfo.plist:")
397
+ UI.message(swinfo_plist_path)
398
+ swinfo_plist_path
399
+ else
400
+ UI.error("Failed to generate AppStoreInfo.plist")
401
+ end
402
+ rescue => ex
403
+ UI.error("Error generating AppStoreInfo.plist: #{ex}")
404
+ end
405
+ end
406
+
372
407
  def find_archive_path
373
408
  Dir.glob(File.join(BuildCommandGenerator.build_path, "*.ipa")).last
374
409
  end
@@ -62,6 +62,7 @@ module Produce
62
62
  c.option('--file-provider-testing-mode', 'Enable File Provider Testing Mode')
63
63
  c.option('--fonts', 'Enable Fonts')
64
64
  c.option('--extended-virtual-address-space', 'Enable Extended Virtual Address Space')
65
+ c.option('--declared-age-range', 'Enable Declared Age Range capability')
65
66
  c.option('--game-center STRING', String, 'Enable Game Center, suitable values are "ios" and "macos"')
66
67
  c.option('--health-kit', 'Enable Health Kit')
67
68
  c.option('--hls-interstitial-preview', 'Enable Hls Interstitial Preview')
@@ -136,6 +137,7 @@ module Produce
136
137
  c.option('--custom-network-protocol', 'Disable Custom Network Protocol')
137
138
  c.option('--data-protection', 'Disable Data Protection')
138
139
  c.option('--extended-virtual-address-space', 'Disable Extended Virtual Address Space')
140
+ c.option('--declared-age-range', 'Disable Declared Age Range capability')
139
141
  c.option('--family-controls', 'Disable Family Controls')
140
142
  c.option('--file-provider-testing-mode', 'Disable File Provider Testing Mode')
141
143
  c.option('--fonts', 'Disable Fonts')
@@ -22,6 +22,7 @@ module Produce
22
22
  associated_domains: [SERVICE_ON, SERVICE_OFF],
23
23
  auto_fill_credential: [SERVICE_ON, SERVICE_OFF],
24
24
  class_kit: [SERVICE_ON, SERVICE_OFF],
25
+ declared_age_range: [SERVICE_ON, SERVICE_OFF],
25
26
  icloud: [SERVICE_LEGACY, SERVICE_CLOUDKIT],
26
27
  custom_network_protocol: [SERVICE_ON, SERVICE_OFF],
27
28
  data_protection: [
@@ -57,7 +57,7 @@ module Produce
57
57
 
58
58
  def valid_services_for(options)
59
59
  allowed_keys = [:access_wifi, :app_attest, :app_group, :apple_pay, :associated_domains, :auto_fill_credential, :car_play_audio_app, :car_play_messaging_app,
60
- :car_play_navigation_app, :car_play_voip_calling_app, :class_kit, :icloud, :critical_alerts, :custom_network_protocol, :data_protection,
60
+ :car_play_navigation_app, :car_play_voip_calling_app, :class_kit, :declared_age_range, :icloud, :critical_alerts, :custom_network_protocol, :data_protection,
61
61
  :extended_virtual_address_space, :file_provider_testing_mode, :family_controls, :fonts, :game_center, :health_kit, :hls_interstitial_preview, :home_kit, :hotspot,
62
62
  :hotspot_helper, :in_app_purchase, :inter_app_audio, :low_latency_hls, :managed_associated_domains, :maps, :multipath, :network_extension,
63
63
  :nfc_tag_reading, :passbook, :personal_vpn, :push_notification, :sign_in_with_apple, :siri_kit, :system_extension, :user_management, :vpn_configuration, :wallet,
@@ -174,6 +174,11 @@ module Produce
174
174
  bundle_id.update_capability(DATA_PROTECTION, enabled: on, settings: settings)
175
175
  end
176
176
 
177
+ if options.declared_age_range
178
+ UI.message("\tDeclared Age Range")
179
+ bundle_id.update_capability(DECLARED_AGE_RANGE, enabled: on)
180
+ end
181
+
177
182
  if options.extended_virtual_address_space
178
183
  UI.message("\tExtended Virtual Address Space")
179
184
  bundle_id.update_capability(EXTENDED_VIRTUAL_ADDRESSING, enabled: on)
@@ -38,6 +38,11 @@ module Scan
38
38
  return
39
39
  when /Testing failed/
40
40
  UI.build_failure!("Error building the application. #{details}")
41
+ when /Testing started.*\*\* TEST FAILED \*\*/m, /Testing started.*\*\* TEST EXECUTE FAILED \*\*/m
42
+ # Xcode 26+: If we see both "Testing started" and "** TEST FAILED **"
43
+ # or "** TEST EXECUTE FAILED **" (test-without-building), then tests
44
+ # were executed but failed.
45
+ return
41
46
  when /Executed/, /Failing tests:/
42
47
  # this is *really* important:
43
48
  # we don't want to raise an exception here
@@ -512,6 +512,11 @@ module Scan
512
512
  description: "Sets a custom path for Swift Package Manager dependencies",
513
513
  type: String,
514
514
  optional: true),
515
+ FastlaneCore::ConfigItem.new(key: :package_cache_path,
516
+ env_name: "SCAN_PACKAGE_CACHE_PATH",
517
+ description: "Sets a custom package cache path for Swift Package Manager dependencies",
518
+ type: String,
519
+ optional: true),
515
520
  FastlaneCore::ConfigItem.new(key: :skip_package_dependencies_resolution,
516
521
  env_name: "SCAN_SKIP_PACKAGE_DEPENDENCIES_RESOLUTION",
517
522
  description: "Skips resolution of Swift Package Manager dependencies",
@@ -519,7 +524,12 @@ module Scan
519
524
  default_value: false),
520
525
  FastlaneCore::ConfigItem.new(key: :disable_package_automatic_updates,
521
526
  env_name: "SCAN_DISABLE_PACKAGE_AUTOMATIC_UPDATES",
522
- description: "Prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file",
527
+ description: "Prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file. This translates in the option `-disableAutomaticPackageResolution` being passed to xcodebuild",
528
+ type: Boolean,
529
+ default_value: false),
530
+ FastlaneCore::ConfigItem.new(key: :skip_package_repository_fetches,
531
+ env_name: "SCAN_SKIP_PACKAGE_REPOSITORY_FETCHES",
532
+ description: "Skips updating package dependencies from their remote. This translates in the option `-skipPackageUpdates` being passed to xcodebuild",
523
533
  type: Boolean,
524
534
  default_value: false),
525
535
  FastlaneCore::ConfigItem.new(key: :use_system_scm,
@@ -69,6 +69,14 @@ module Scan
69
69
  options << "-enableAddressSanitizer #{config[:address_sanitizer] ? 'YES' : 'NO'}" unless config[:address_sanitizer].nil?
70
70
  options << "-enableThreadSanitizer #{config[:thread_sanitizer] ? 'YES' : 'NO'}" unless config[:thread_sanitizer].nil?
71
71
  if FastlaneCore::Helper.xcode_at_least?(11)
72
+ if config[:cloned_source_packages_path] && !options.include?("-clonedSourcePackagesDirPath #{config[:cloned_source_packages_path].shellescape}")
73
+ options << "-clonedSourcePackagesDirPath #{config[:cloned_source_packages_path].shellescape}"
74
+ end
75
+
76
+ if config[:package_cache_path] && !options.include?("-packageCachePath #{config[:package_cache_path].shellescape}")
77
+ options << "-packageCachePath #{config[:package_cache_path].shellescape}"
78
+ end
79
+
72
80
  options << "-testPlan '#{config[:testplan]}'" if config[:testplan]
73
81
 
74
82
  # detect_values will ensure that these values are present as Arrays if
@@ -176,6 +176,7 @@ PROVISIONS_BY_ID=()
176
176
  DEFAULT_PROVISION=""
177
177
  TEMP_DIR="_floatsignTemp"
178
178
  USE_APP_ENTITLEMENTS=""
179
+ VERBOSE=""
179
180
  XCODE_VERSION="$(xcodebuild -version | grep "Xcode" | /usr/bin/cut -f 2 -d ' ')"
180
181
 
181
182
  # List of plist keys used for reference to and from nested apps and extensions
@@ -548,8 +549,8 @@ function resign {
548
549
  for assetpack in "$ODR_DIR"/*
549
550
  do
550
551
  if [[ "$assetpack" == *.assetpack ]]; then
551
- rm -rf $assetpack/_CodeSignature
552
- /usr/bin/codesign ${VERBOSE} --generate-entitlement-der ${KEYCHAIN_FLAG} -f -s "$CERTIFICATE" "$assetpack"
552
+ rm -rf "$assetpack"/_CodeSignature
553
+ /usr/bin/codesign ${VERBOSE} --generate-entitlement-der "${KEYCHAIN_FLAG}" -f -s "$CERTIFICATE" "$assetpack"
553
554
  checkStatus
554
555
  else
555
556
  log "Ignoring non-assetpack: $assetpack"
@@ -823,7 +824,7 @@ function resign {
823
824
  log "Certificate $CERTIFICATE matches a SHA1 pattern"
824
825
  local certificate_matches="$( security find-identity -v -p codesigning | grep -m 1 "$CERTIFICATE" )"
825
826
  if [ -n "$certificate_matches" ]; then
826
- certificate_name="$(/usr/bin/sed -E s/[^\"]+\"\([^\"]+\)\".*/\\1/ <<< $certificate_matches )"
827
+ certificate_name="$(/usr/bin/sed -E s/[^\"]+\"\([^\"]+\)\".*/\\1/ <<< "$certificate_matches" )"
827
828
  log "Certificate name: $certificate_name"
828
829
  fi
829
830
  fi
@@ -917,10 +918,12 @@ log "Repackaging as $NEW_FILE"
917
918
  # Navigate to the temporary directory (sending the output to null)
918
919
  # Zip all the contents, saving the zip file in the above directory
919
920
  # Navigate back to the originating directory (sending the output to null)
921
+ # shellcheck disable=SC2164
920
922
  pushd "$TEMP_DIR" > /dev/null
921
923
  # TODO: Fix shellcheck warning and remove directive
922
924
  # shellcheck disable=SC2035
923
925
  zip -qry "../$TEMP_DIR.ipa" *
926
+ # shellcheck disable=SC2164
924
927
  popd > /dev/null
925
928
 
926
929
  # Move the resulting ipa to the target destination
@@ -1,5 +1,6 @@
1
1
  require 'plist'
2
2
  require 'fastlane_core/globals'
3
+ require 'fastlane_core/provisioning_profile'
3
4
 
4
5
  require_relative 'module'
5
6
 
@@ -19,10 +20,10 @@ module Sigh
19
20
 
20
21
  def self.install_profile(profile)
21
22
  UI.message("Installing provisioning profile...")
22
- profile_path = File.expand_path("~") + "/Library/MobileDevice/Provisioning Profiles/"
23
+ profile_path = FastlaneCore::ProvisioningProfile.profiles_path
23
24
  uuid = ENV["SIGH_UUID"] || ENV["SIGH_UDID"]
24
25
  profile_filename = uuid + ".mobileprovision"
25
- destination = profile_path + profile_filename
26
+ destination = File.join(profile_path, profile_filename)
26
27
 
27
28
  # If the directory doesn't exist, make it first
28
29
  unless File.directory?(profile_path)
@@ -126,8 +127,9 @@ module Sigh
126
127
  end
127
128
 
128
129
  def self.load_profiles
129
- UI.message("Loading Provisioning profiles from ~/Library/MobileDevice/Provisioning Profiles/")
130
- profiles_path = File.expand_path("~") + "/Library/MobileDevice/Provisioning Profiles/*.mobileprovision"
130
+ profiles_path = FastlaneCore::ProvisioningProfile.profiles_path
131
+ UI.message("Loading Provisioning profiles from #{profiles_path}")
132
+ profiles_path = File.join(profiles_path, "*.mobileprovision")
131
133
  profile_paths = Dir[profiles_path]
132
134
 
133
135
  profiles = []
@@ -84,7 +84,7 @@ module Sigh
84
84
 
85
85
  includes = 'bundleId'
86
86
 
87
- unless Sigh.config[:skip_certificate_verification] || Sigh.config[:include_all_certificates]
87
+ unless (Sigh.config[:skip_certificate_verification] || Sigh.config[:include_all_certificates]) && Sigh.config[:cert_id].to_s.length == 0
88
88
  includes += ',certificates'
89
89
  end
90
90
 
@@ -105,6 +105,8 @@ module Sigh
105
105
 
106
106
  # Take the provisioning profile name into account
107
107
  results = filter_profiles_by_name(results) if Sigh.config[:provisioning_name].to_s.length > 0
108
+ # Take the cert_id into account
109
+ results = filter_profiles_by_cert_id(results) if Sigh.config[:cert_id].to_s.length > 0
108
110
  return results if Sigh.config[:skip_certificate_verification] || Sigh.config[:include_all_certificates]
109
111
 
110
112
  UI.message("Verifying certificates...")
@@ -199,6 +201,21 @@ module Sigh
199
201
  profiles
200
202
  end
201
203
 
204
+ def filter_profiles_by_cert_id(profiles)
205
+ filtered = profiles.find_all do |current_profile|
206
+ valid_cert_id = false
207
+ current_profile.certificates.each do |cert|
208
+ if cert.id == Sigh.config[:cert_id].to_s
209
+ valid_cert_id = true
210
+ else
211
+ UI.message("Provisioning Profile cert_id : '#{cert.id}' does not match given cert_id : '#{Sigh.config[:cert_id]}', skipping this one...")
212
+ end
213
+ end
214
+ valid_cert_id
215
+ end
216
+ filtered
217
+ end
218
+
202
219
  def fetch_certificates(certificate_types)
203
220
  filter = {
204
221
  certificateType: certificate_types.join(',')
@@ -66,7 +66,7 @@ module Snapshot
66
66
 
67
67
  config[:devices] << sim.name
68
68
  end
69
- elsif Snapshot.project.mac?
69
+ elsif config[:devices].nil? && Snapshot.project.mac?
70
70
  config[:devices] = ["Mac"]
71
71
  end
72
72
  end