fastlane 2.128.1 → 2.133.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +72 -72
  3. data/cert/lib/cert/module.rb +2 -0
  4. data/cert/lib/cert/options.rb +6 -0
  5. data/cert/lib/cert/runner.rb +17 -11
  6. data/deliver/lib/deliver/submit_for_review.rb +1 -1
  7. data/fastlane/lib/fastlane.rb +4 -1
  8. data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
  9. data/fastlane/lib/fastlane/actions/actions_helper.rb +4 -0
  10. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +11 -3
  11. data/fastlane/lib/fastlane/actions/appetize_viewing_url_generator.rb +1 -1
  12. data/fastlane/lib/fastlane/actions/automatic_code_signing.rb +1 -1
  13. data/fastlane/lib/fastlane/actions/carthage.rb +4 -3
  14. data/fastlane/lib/fastlane/actions/commit_github_file.rb +1 -1
  15. data/fastlane/lib/fastlane/actions/copy_artifacts.rb +1 -1
  16. data/fastlane/lib/fastlane/actions/danger.rb +7 -0
  17. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +23 -4
  18. data/fastlane/lib/fastlane/actions/download_dsyms.rb +35 -9
  19. data/fastlane/lib/fastlane/actions/ensure_env_vars.rb +58 -0
  20. data/fastlane/lib/fastlane/actions/get_version_number.rb +21 -2
  21. data/fastlane/lib/fastlane/actions/github_api.rb +1 -1
  22. data/fastlane/lib/fastlane/actions/gradle.rb +37 -8
  23. data/fastlane/lib/fastlane/actions/import_from_git.rb +1 -1
  24. data/fastlane/lib/fastlane/actions/onesignal.rb +59 -29
  25. data/fastlane/lib/fastlane/actions/pod_push.rb +29 -10
  26. data/fastlane/lib/fastlane/actions/puts.rb +1 -1
  27. data/fastlane/lib/fastlane/actions/register_devices.rb +38 -22
  28. data/fastlane/lib/fastlane/actions/resign.rb +2 -2
  29. data/fastlane/lib/fastlane/actions/slather.rb +1 -0
  30. data/fastlane/lib/fastlane/actions/sonar.rb +18 -0
  31. data/fastlane/lib/fastlane/actions/update_fastlane.rb +1 -1
  32. data/fastlane/lib/fastlane/commands_generator.rb +17 -1
  33. data/fastlane/lib/fastlane/fast_file.rb +7 -2
  34. data/fastlane/lib/fastlane/helper/adb_helper.rb +5 -0
  35. data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +12 -6
  36. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +2 -0
  37. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +3 -0
  38. data/fastlane/lib/fastlane/setup/setup_android.rb +1 -1
  39. data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +126 -34
  40. data/fastlane/lib/fastlane/swift_fastlane_function.rb +82 -9
  41. data/fastlane/lib/fastlane/swift_runner_upgrader.rb +4 -0
  42. data/fastlane/lib/fastlane/version.rb +1 -1
  43. data/fastlane/swift/Actions.swift +15 -0
  44. data/fastlane/swift/Deliverfile.swift +1 -1
  45. data/fastlane/swift/DeliverfileProtocol.swift +121 -1
  46. data/fastlane/swift/Fastlane.swift +4164 -291
  47. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +9 -0
  48. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  49. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  50. data/fastlane/swift/Gymfile.swift +1 -1
  51. data/fastlane/swift/GymfileProtocol.swift +93 -11
  52. data/fastlane/swift/Matchfile.swift +1 -1
  53. data/fastlane/swift/MatchfileProtocol.swift +65 -1
  54. data/fastlane/swift/Plugins.swift +15 -0
  55. data/fastlane/swift/Precheckfile.swift +1 -1
  56. data/fastlane/swift/PrecheckfileProtocol.swift +15 -2
  57. data/fastlane/swift/Scanfile.swift +1 -1
  58. data/fastlane/swift/ScanfileProtocol.swift +111 -3
  59. data/fastlane/swift/Screengrabfile.swift +1 -1
  60. data/fastlane/swift/ScreengrabfileProtocol.swift +39 -2
  61. data/fastlane/swift/Snapshotfile.swift +1 -1
  62. data/fastlane/swift/SnapshotfileProtocol.swift +71 -1
  63. data/fastlane/swift/upgrade_manifest.json +1 -1
  64. data/fastlane_core/lib/fastlane_core/analytics/analytics_event_builder.rb +1 -1
  65. data/fastlane_core/lib/fastlane_core/command_executor.rb +1 -1
  66. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +1 -1
  67. data/fastlane_core/lib/fastlane_core/helper.rb +1 -1
  68. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +1 -3
  69. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +3 -2
  70. data/frameit/lib/frameit/editor.rb +1 -1
  71. data/frameit/lib/frameit/screenshot.rb +4 -0
  72. data/gym/lib/gym/.runner.rb.swp +0 -0
  73. data/gym/lib/gym/generators/build_command_generator.rb +5 -1
  74. data/gym/lib/gym/options.rb +17 -17
  75. data/gym/lib/gym/runner.rb +33 -5
  76. data/match/lib/match/generator.rb +1 -0
  77. data/match/lib/match/importer.rb +1 -1
  78. data/match/lib/match/module.rb +2 -0
  79. data/match/lib/match/nuke.rb +6 -6
  80. data/match/lib/match/options.rb +17 -0
  81. data/match/lib/match/runner.rb +12 -8
  82. data/match/lib/match/storage/git_storage.rb +8 -2
  83. data/match/lib/match/storage/google_cloud_storage.rb +85 -33
  84. data/match/lib/match/storage/interface.rb +1 -1
  85. data/produce/lib/produce/service.rb +7 -1
  86. data/scan/lib/scan/options.rb +1 -1
  87. data/scan/lib/scan/runner.rb +1 -1
  88. data/sigh/lib/sigh/download_all.rb +48 -8
  89. data/sigh/lib/sigh/runner.rb +13 -5
  90. data/snapshot/lib/assets/SnapshotHelper.swift +3 -3
  91. data/snapshot/lib/snapshot/commands_generator.rb +2 -2
  92. data/snapshot/lib/snapshot/options.rb +5 -0
  93. data/snapshot/lib/snapshot/reports_generator.rb +3 -0
  94. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  95. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +1 -1
  96. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +16 -1
  97. data/snapshot/lib/snapshot/update.rb +4 -2
  98. data/spaceship/lib/spaceship/client.rb +1 -1
  99. data/spaceship/lib/spaceship/connect_api/models/app.rb +6 -6
  100. data/spaceship/lib/spaceship/connect_api/models/beta_tester_metric.rb +1 -0
  101. data/spaceship/lib/spaceship/connect_api/models/build.rb +3 -3
  102. data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +1 -1
  103. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +1 -1
  104. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +1 -1
  105. data/spaceship/lib/spaceship/connect_api/models/device.rb +1 -1
  106. data/spaceship/lib/spaceship/connect_api/models/profile.rb +1 -1
  107. data/spaceship/lib/spaceship/du/du_client.rb +4 -0
  108. data/spaceship/lib/spaceship/portal/.certificate.rb.swp +0 -0
  109. data/spaceship/lib/spaceship/portal/certificate.rb +15 -1
  110. data/spaceship/lib/spaceship/portal/provisioning_profile.rb +1 -1
  111. data/spaceship/lib/spaceship/spaceauth_runner.rb +1 -1
  112. data/spaceship/lib/spaceship/test_flight/tester.rb +1 -1
  113. data/spaceship/lib/spaceship/tunes/app_version.rb +4 -0
  114. data/spaceship/lib/spaceship/tunes/application.rb +4 -0
  115. data/spaceship/lib/spaceship/tunes/availability.rb +40 -8
  116. data/spaceship/lib/spaceship/tunes/b2b_organization.rb +50 -0
  117. data/spaceship/lib/spaceship/tunes/build_details.rb +160 -18
  118. data/spaceship/lib/spaceship/tunes/display_family.rb +3 -3
  119. data/spaceship/lib/spaceship/tunes/iap.rb +2 -0
  120. data/spaceship/lib/spaceship/tunes/iap_detail.rb +17 -0
  121. data/spaceship/lib/spaceship/tunes/iap_family_details.rb +10 -2
  122. data/spaceship/lib/spaceship/tunes/tunes_client.rb +63 -2
  123. data/supply/lib/supply/client.rb +1 -1
  124. metadata +54 -47
@@ -457,7 +457,7 @@ module Spaceship
457
457
  devices.map(&:id),
458
458
  mac: mac?,
459
459
  sub_platform: tvos? ? 'tvOS' : nil,
460
- template_name: template_name
460
+ template_name: is_template_profile ? template.purpose_name : nil
461
461
  )
462
462
  end
463
463
 
@@ -25,7 +25,7 @@ module Spaceship
25
25
  puts("Please try unsetting the FASTLANE_SESSION environment variable".yellow)
26
26
  puts("(if it is set) and re-run `fastlane spaceauth`".yellow)
27
27
  puts("")
28
- puts("Execption type: #{ex.class}")
28
+ puts("Exception type: #{ex.class}")
29
29
  raise ex
30
30
  end
31
31
 
@@ -93,7 +93,7 @@ module Spaceship
93
93
  end
94
94
 
95
95
  # @return (Spaceship::TestFlight::Tester) Returns the testers matching the parameter.
96
- # ITC searchs all fields, and is full text. The search results are the union of all words in the search text
96
+ # ITC searches all fields, and is full text. The search results are the union of all words in the search text
97
97
  # @param text (String) (required): Value used to filter the tester, case insensitive
98
98
  def self.search(app_id: nil, text: nil, is_email_exact_match: false)
99
99
  text = text.strip
@@ -192,6 +192,9 @@ module Spaceship
192
192
  # @return (Hash) Represents the trailers of this app version (read-only)
193
193
  attr_reader :trailers
194
194
 
195
+ # @return (Hash) A hash representing all in-app purchases that can get submitted with this version
196
+ attr_reader :in_app_purchases
197
+
195
198
  # @return (Hash) Represents the phased_release hash (read-only)
196
199
  # For now, please use the `toggle_phased_release` method and call `.save!`
197
200
  # as the API will probably change in the future
@@ -233,6 +236,7 @@ module Spaceship
233
236
  'supportsAppleWatch' => :supports_apple_watch,
234
237
  'versionId' => :version_id,
235
238
  'version.value' => :version,
239
+ 'submittableAddOns.value' => :in_app_purchases,
236
240
  'phasedRelease' => :phased_release,
237
241
 
238
242
  # GeoJson
@@ -158,6 +158,10 @@ module Spaceship
158
158
  client.get_resolution_center(apple_id, platform)
159
159
  end
160
160
 
161
+ def reply_resolution_center(app_id, platform, thread_id, version_id, version_number, from, message_body)
162
+ client.post_resolution_center(app_id, platform, thread_id, version_id, version_number, from, message_body)
163
+ end
164
+
161
165
  def ratings(version_id: '', storefront: '')
162
166
  attrs = client.get_ratings(apple_id, platform, version_id, storefront)
163
167
  attrs[:application] = self
@@ -1,5 +1,6 @@
1
1
  require_relative 'territory'
2
2
  require_relative 'b2b_user'
3
+ require_relative 'b2b_organization'
3
4
  module Spaceship
4
5
  module Tunes
5
6
  class Availability < TunesBase
@@ -27,6 +28,9 @@ module Spaceship
27
28
  # @return (Array of Spaceship::Tunes::B2bUser objects) A list of users
28
29
  attr_accessor :b2b_users
29
30
 
31
+ # @return (Array of Spaceship::Tunes::B2bOrganization objects) A list of b2b orgs
32
+ attr_accessor :b2b_organizations
33
+
30
34
  attr_mapping(
31
35
  'theWorld' => :include_future_territories,
32
36
  'preOrder.clearedForPreOrder.value' => :cleared_for_preorder,
@@ -47,12 +51,12 @@ module Spaceship
47
51
  # Base::DataHash sets values for paths that don't exist
48
52
  obj = self.new(
49
53
  'preOrder' => {
50
- 'clearedForPreOrder' => {
51
- 'value' => false
52
- },
53
- 'appAvailableDate' => {
54
- 'value' => nil
55
- }
54
+ 'clearedForPreOrder' => {
55
+ 'value' => false
56
+ },
57
+ 'appAvailableDate' => {
58
+ 'value' => nil
59
+ }
56
60
  }
57
61
  )
58
62
 
@@ -66,8 +70,8 @@ module Spaceship
66
70
  obj.include_future_territories = params.fetch(:include_future_territories, true)
67
71
  obj.cleared_for_preorder = params.fetch(:cleared_for_preorder, false)
68
72
  obj.app_available_date = params.fetch(:app_available_date, nil)
69
- obj.b2b_unavailable = params.fetch(:b2b_unavailable, false)
70
- obj.b2b_app_enabled = params.fetch(:b2b_app_enabled, false)
73
+ obj.b2b_unavailable = params.fetch(:b2b_unavailable, false)
74
+ obj.b2b_app_enabled = params.fetch(:b2b_app_enabled, false)
71
75
  obj.educational_discount = params.fetch(:educational_discount, true)
72
76
  return obj
73
77
  end
@@ -80,6 +84,10 @@ module Spaceship
80
84
  @b2b_users || raw_data['b2bUsers'].map { |user| B2bUser.new(user) }
81
85
  end
82
86
 
87
+ def b2b_organizations
88
+ @b2b_organizations || raw_data['b2bOrganizations'].map { |user| B2bOrganization.new(user) }
89
+ end
90
+
83
91
  def b2b_app_enabled
84
92
  @b2b_app_enabled.nil? ? raw_data['b2bAppEnabled'] : @b2b_app_enabled
85
93
  end
@@ -127,6 +135,30 @@ module Spaceship
127
135
 
128
136
  return self
129
137
  end
138
+
139
+ # Updates users for b2b enabled apps
140
+ def update_dep_organizations(organization_list = [])
141
+ raise "Cannot add dep organizations if b2b is not enabled" unless b2b_app_enabled
142
+
143
+ added_orgs = b2b_organizations
144
+
145
+ # Returns if list is unchanged
146
+ return self if (added_orgs - organization_list) == (organization_list - added_orgs)
147
+
148
+ orgs_to_add = organization_list.reject { |organization| added_orgs.include?(organization) }
149
+ orgs_to_remove = added_orgs.nil? ? organization_list : added_orgs.reject { |organization| organization_list.include?(organization) }
150
+
151
+ @b2b_organizations = b2b_organizations.reject { |organization| orgs_to_remove.include?(organization) }
152
+ @b2b_organizations.concat(orgs_to_add)
153
+ @b2b_organizations.concat(orgs_to_remove.map do |organization|
154
+ B2bOrganization.from_id_info(dep_id: organization.dep_customer_id,
155
+ dep_name: organization.name,
156
+ dep_org_id: organization.dep_organization_id,
157
+ type: false)
158
+ end)
159
+
160
+ return self
161
+ end
130
162
  end
131
163
  end
132
164
  end
@@ -0,0 +1,50 @@
1
+ require_relative 'tunes_base'
2
+ module Spaceship
3
+ module Tunes
4
+ class B2bOrganization < TunesBase
5
+ # @return (String) add or remove
6
+ attr_accessor :type
7
+
8
+ # @return (String) customer id
9
+ attr_accessor :dep_customer_id
10
+
11
+ # @return (String) organization id
12
+ attr_accessor :dep_organization_id
13
+
14
+ # @return (String) organization name
15
+ attr_accessor :name
16
+
17
+ # enum for types
18
+ class TYPE
19
+ ADD = "ADD"
20
+ REMOVE = "REMOVE"
21
+ NO_CHANGE = "NO_CHANGE"
22
+ end
23
+
24
+ attr_mapping(
25
+ 'value.type' => :type,
26
+ 'value.depCustomerId' => :dep_customer_id,
27
+ 'value.organizationId' => :dep_organization_id,
28
+ 'value.name' => :name
29
+ )
30
+
31
+ def self.from_id_info(dep_id: nil, dep_org_id: nil, dep_name: nil, type: TYPE::NO_CHANGE)
32
+ self.new({ "value" => { "type" => type, "depCustomerId" => dep_id, "organizationId" => dep_org_id, "name" => dep_name } })
33
+ end
34
+
35
+ def ==(other)
36
+ other.class == self.class && other.state == self.state
37
+ end
38
+
39
+ def state
40
+ return [type, dep_customer_id, name]
41
+ end
42
+
43
+ alias eql? ==
44
+
45
+ def hash
46
+ state.hash
47
+ end
48
+ end
49
+ end
50
+ end
@@ -6,36 +6,178 @@ module Spaceship
6
6
  class BuildDetails < TunesBase
7
7
  # @return (String) The App identifier of this app, provided by App Store Connect
8
8
  # @example
9
- # "1013943394"
9
+ # '1013943394'
10
10
  attr_accessor :apple_id
11
11
 
12
- # @return (String) Link to the dSYM file (not always available)
13
- # lol, it's unencrypted http
14
- attr_accessor :dsym_url
12
+ # @return (Integer) Upload date of build as UNIX timestamp
13
+ # @example 1563813377000
14
+ attr_accessor :upload_date
15
15
 
16
- # @return [Bool]
17
- attr_accessor :include_symbols
16
+ # @return (String) State of the build/binary
17
+ # @example 'ITC.apps.preReleaseBuildStatus.Validated'
18
+ attr_accessor :binary_state
18
19
 
19
- # @return [Integer]
20
- attr_accessor :number_of_asset_packs
20
+ # @return (String) Name of uploaded file
21
+ # @example 'MyApp.ipa'
22
+ attr_accessor :file_name
23
+
24
+ # @return (String) SDK used to build app
25
+ # @example '13A340'
26
+ attr_accessor :build_sdk
27
+
28
+ # @return (String) Platform
29
+ # @example '13A340'
30
+ attr_accessor :build_platform
31
+
32
+ # @return (String) Bundle ID of build
33
+ # @example 'com.sample.app'
34
+ attr_accessor :bundle_id
35
+
36
+ # @return (String) Name of app
37
+ # @example 'Test App'
38
+ attr_accessor :app_name
39
+
40
+ # @return (String) Supported architectures of the build
41
+ # @example 'armv7, arm64'
42
+ attr_accessor :supported_architectures
43
+
44
+ # @return (String) Localizations of the build
45
+ # @example 'English'
46
+ attr_accessor :localizations
47
+
48
+ # @return (Boolean) Is this a Newsstand app?
49
+ # @example false
50
+ attr_accessor :newsstand_app
51
+
52
+ # @return (Boolean) Does the build contain an app icon?
53
+ # @example true
54
+ attr_accessor :prerendered_icon_flag
55
+
56
+ # @return [Hash] containing all entitlements for all targets
57
+ # @example 'Sample.app/Sample: {'com.apple.developer.team-identifier': 'ABC123DEF456'}'
58
+ attr_accessor :entitlements
59
+
60
+ # @return (String) Platform of the app
61
+ # @example 'ios'
62
+ attr_accessor :app_plattform
63
+
64
+ # @return (String) Device Requirements / Device Protocols
65
+ attr_accessor :device_protocols
66
+
67
+ # @return (String) Version code of the build
68
+ # @example '4'
69
+ attr_accessor :cf_bundle_version
70
+
71
+ # @return (String) Version code of the build train
72
+ # @example '1.6'
73
+ attr_accessor :cf_bundle_short_version
74
+
75
+ # @return (String) Minimum iOS Version
76
+ # @example '9.3'
77
+ attr_accessor :min_os_version
78
+
79
+ # @return (String) Enabled Device Family
80
+ # @example 'iPhone / iPod touch, iPad''
81
+ attr_accessor :device_families
82
+
83
+ # @return (String) Required Capabilities
84
+ # @example 'armv7'
85
+ attr_accessor :capabilities
86
+
87
+ # @return (Int) Compressed File Size in bytes
88
+ # @example '9365224'
89
+ attr_accessor :size_in_bytes
90
+
91
+ # @return (Hash) Estimated App Store file sizes for all devices in bytes
92
+ attr_accessor :sizes_in_bytes
21
93
 
22
- # @return [Bool]
94
+ # @return (Hash) Estimated App Store file sizes for all devices in bytes
95
+ attr_accessor :sizes_in_bytes_with_device_loc
96
+
97
+ # @return (Boolean) Contains On Demand Resources
98
+ # @example false
23
99
  attr_accessor :contains_odr
24
100
 
25
- # e.g. "13A340"
26
- attr_accessor :build_sdk
101
+ # @return (Integer) Number of Asset packs
102
+ # @example 0
103
+ attr_accessor :number_of_asset_packs
27
104
 
28
- # @return [String] e.g. "MyApp.ipa"
29
- attr_accessor :file_name
105
+ # @return (Boolean) Includes Symbols
106
+ # @example true
107
+ attr_accessor :include_symbols
108
+
109
+ # @return (Boolean) App Uses Non-Exempt Encryption (Optional)
110
+ # @example null
111
+ attr_accessor :use_encryption_in_plist
112
+
113
+ # @return (Boolean) App Encryption Export Compliance Code (Optional)
114
+ # @example null
115
+ attr_accessor :export_compliance_code_value_in_plist
116
+
117
+ # @return (Boolean) Includes Stickers
118
+ # @example false
119
+ attr_accessor :has_stickers
120
+
121
+ # @return (Boolean) Includes iMessage App
122
+ # @example false
123
+ attr_accessor :has_messages_extension
124
+
125
+ # @return (Boolean) // Not sure what this is for
126
+ # @example false
127
+ attr_accessor :launch_prohibited
128
+
129
+ # @return (Boolean) Uses SiriKit
130
+ # @example false
131
+ attr_accessor :uses_synapse
132
+
133
+ # @return (Boolean) App uses Location Services
134
+ # @example false
135
+ attr_accessor :uses_location_background_mode
136
+
137
+ # @return (String) Link to the dSYM file (not always available)
138
+ # @example build/***.****.*****.*****-1.0.0-2647.dSYM.zip
139
+ attr_accessor :dsym_url
140
+
141
+ # @return (Boolean) Watch-Only App
142
+ # @example false
143
+ attr_accessor :watch_only
30
144
 
31
145
  attr_mapping(
32
146
  'apple_id' => :apple_id,
33
- 'dsymurl' => :dsym_url,
34
- 'includesSymbols' => :include_symbols,
35
- 'numberOfAssetPacks' => :number_of_asset_packs,
36
- 'containsODR' => :contains_odr,
147
+ 'uploadDate' => :upload_date,
148
+ 'binaryState' => :binary_state,
149
+ 'fileName' => :file_name,
37
150
  'buildSdk' => :build_sdk,
38
- 'fileName' => :file_name
151
+ 'buildPlatform' => :build_platform,
152
+ 'bundleId' => :bundle_id,
153
+ 'appName' => :app_name,
154
+ 'supportedArchitectures' => :supported_architectures,
155
+ 'localizations' => :localizations,
156
+ 'newsstandApp' => :newsstand_app,
157
+ 'prerenderedIconFlag' => :prerendered_icon_flag,
158
+ 'entitlements' => :entitlements,
159
+ 'appPlatform' => :app_platform,
160
+ 'deviceProtocols' => :device_protocols,
161
+ 'cfBundleVersion' => :cf_bundle_version,
162
+ 'cfBundleShortVersion' => :cf_bundle_short_version,
163
+ 'minOsVersion' => :min_os_version,
164
+ 'deviceFamilies' => :device_families,
165
+ 'capabilities' => :capabilities,
166
+ 'sizeInBytes' => :size_in_bytes,
167
+ 'sizesInBytes' => :sizes_in_bytes,
168
+ 'sizesInBytesWithDeviceLoc' => :sizes_in_bytes_with_device_loc,
169
+ 'containsODR' => :contains_odr,
170
+ 'numberOfAssetPacks' => :number_of_asset_packs,
171
+ 'includesSymbols' => :include_symbols,
172
+ 'useEncryptionInPlist' => :use_encryption_in_plist,
173
+ 'exportComplianceCodeValueInPlist' => :export_compliance_code_value_in_plist,
174
+ 'hasStickers' => :has_stickers,
175
+ 'hasMessagesExtension' => :has_messages_extension,
176
+ 'launchProhibited' => :launch_prohibited,
177
+ 'usesSynapse' => :uses_synapse,
178
+ 'usesLocationBackgroundMode' => :uses_location_background_mode,
179
+ 'dsymurl' => :dsym_url,
180
+ 'watchOnly' => :watch_only
39
181
  )
40
182
  end
41
183
  end
@@ -5,7 +5,7 @@ module Spaceship
5
5
  # A definition of different styled displays used by devices
6
6
  # that App Store Connect supports storing screenshots.
7
7
  # Display styles often only vary based on screen resolution
8
- # however other aspects of a displays physical apperance are
8
+ # however other aspects of a displays physical appearance are
9
9
  # also factored (i.e if the home indicator is provided via
10
10
  # a hardware button or a software interface).
11
11
  class DisplayFamily
@@ -15,12 +15,12 @@ module Spaceship
15
15
  # Spaceship::Tunes::AppScreenshot#device_type attribute.
16
16
  attr_accessor :name
17
17
 
18
- # The user friendly name of this defintion.
18
+ # The user friendly name of this definition.
19
19
  #
20
20
  # Source: Media Manager in App Store Connect.
21
21
  attr_accessor :friendly_name
22
22
 
23
- # The user friendly category for this defintion (i.e iPhone,
23
+ # The user friendly category for this definition (i.e iPhone,
24
24
  # Apple TV or Desktop).
25
25
  attr_accessor :friendly_category_name
26
26
 
@@ -65,6 +65,7 @@ module Spaceship
65
65
  reference_name: nil,
66
66
  product_id: nil,
67
67
  cleared_for_sale: true,
68
+ merch_screenshot: nil,
68
69
  review_notes: nil,
69
70
  review_screenshot: nil,
70
71
  pricing_intervals: nil,
@@ -78,6 +79,7 @@ module Spaceship
78
79
  reference_name: reference_name,
79
80
  product_id: product_id,
80
81
  cleared_for_sale: cleared_for_sale,
82
+ merch_screenshot: merch_screenshot,
81
83
  review_notes: review_notes,
82
84
  review_screenshot: review_screenshot,
83
85
  pricing_intervals: pricing_intervals,
@@ -30,6 +30,10 @@ module Spaceship
30
30
  # @return (Bool) Cleared for sale flag
31
31
  attr_accessor :cleared_for_sale
32
32
 
33
+ # @return (Hash) app store promotion image (optional)
34
+ attr_accessor :merch_screenshot
35
+
36
+ # @return (Hash) app review screenshot (required)
33
37
  attr_accessor :review_screenshot
34
38
 
35
39
  # @return (String) the notes for the review team
@@ -142,6 +146,12 @@ module Spaceship
142
146
  Tunes::IAPStatus.get_from_string(raw_data["versions"].first["status"])
143
147
  end
144
148
 
149
+ # @return (Hash) Hash containing existing promotional image data
150
+ def merch_screenshot
151
+ return nil unless raw_data && raw_data["versions"] && raw_data["versions"].first && raw_data["versions"].first["merch"] && raw_data["versions"].first["merch"]["images"].first["image"]["value"]
152
+ raw_data["versions"].first["merch"]["images"].first["image"]["value"]
153
+ end
154
+
145
155
  # @return (Hash) Hash containing existing review screenshot data
146
156
  def review_screenshot
147
157
  return nil unless raw_data && raw_data["versions"] && raw_data["versions"].first && raw_data["versions"].first["reviewScreenshot"] && raw_data['versions'].first["reviewScreenshot"]["value"]
@@ -172,6 +182,13 @@ module Spaceship
172
182
  raw_data.set(["pricingIntervals"], raw_pricing_intervals)
173
183
  @raw_pricing_data["subscriptions"] = raw_pricing_intervals if @raw_pricing_data
174
184
 
185
+ if @merch_screenshot
186
+ # Upload App Store Promotional image (Optional)
187
+ upload_file = UploadFile.from_path(@merch_screenshot)
188
+ merch_data = client.upload_purchase_merch_screenshot(application.apple_id, upload_file)
189
+ raw_data["versions"][0]["merch"] = merch_data
190
+ end
191
+
175
192
  if @review_screenshot
176
193
  # Upload Screenshot
177
194
  upload_file = UploadFile.from_path(@review_screenshot)