fastlane 2.147.0 → 2.150.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +82 -82
  3. data/cert/lib/cert/commands_generator.rb +1 -0
  4. data/credentials_manager/lib/credentials_manager/cli.rb +2 -0
  5. data/deliver/lib/deliver.rb +0 -1
  6. data/deliver/lib/deliver/app_screenshot.rb +28 -27
  7. data/deliver/lib/deliver/commands_generator.rb +1 -0
  8. data/deliver/lib/deliver/html_generator.rb +2 -2
  9. data/deliver/lib/deliver/options.rb +6 -11
  10. data/deliver/lib/deliver/runner.rb +7 -4
  11. data/deliver/lib/deliver/setup.rb +5 -30
  12. data/deliver/lib/deliver/submit_for_review.rb +124 -83
  13. data/deliver/lib/deliver/upload_metadata.rb +284 -143
  14. data/deliver/lib/deliver/upload_price_tier.rb +15 -8
  15. data/deliver/lib/deliver/upload_screenshots.rb +86 -37
  16. data/fastlane/lib/assets/s3_html_template.erb +1 -1
  17. data/fastlane/lib/fastlane/actions/crashlytics.rb +0 -4
  18. data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -1
  19. data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +42 -2
  20. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +1 -1
  21. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +2 -2
  22. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +3 -11
  23. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +15 -2
  24. data/fastlane/lib/fastlane/actions/download_dsyms.rb +7 -1
  25. data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +1 -1
  26. data/fastlane/lib/fastlane/actions/google_play_track_release_names.rb +74 -0
  27. data/fastlane/lib/fastlane/actions/hipchat.rb +1 -1
  28. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +1 -1
  29. data/fastlane/lib/fastlane/actions/slack.rb +2 -2
  30. data/fastlane/lib/fastlane/actions/slather.rb +8 -1
  31. data/fastlane/lib/fastlane/actions/spm.rb +7 -0
  32. data/fastlane/lib/fastlane/actions/swiftlint.rb +14 -0
  33. data/fastlane/lib/fastlane/actions/sync_code_signing.rb +1 -1
  34. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +3 -34
  35. data/fastlane/lib/fastlane/actions/xcodebuild.rb +4 -4
  36. data/fastlane/lib/fastlane/cli_tools_distributor.rb +28 -6
  37. data/fastlane/lib/fastlane/commands_generator.rb +1 -1
  38. data/fastlane/lib/fastlane/documentation/actions_list.rb +1 -1
  39. data/fastlane/lib/fastlane/lane.rb +3 -3
  40. data/fastlane/lib/fastlane/lane_manager.rb +0 -10
  41. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +3 -3
  42. data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +29 -0
  43. data/fastlane/lib/fastlane/swift_fastlane_function.rb +22 -5
  44. data/fastlane/lib/fastlane/swift_lane_manager.rb +0 -8
  45. data/fastlane/lib/fastlane/version.rb +1 -1
  46. data/fastlane/swift/ControlCommand.swift +1 -0
  47. data/fastlane/swift/Deliverfile.swift +1 -1
  48. data/fastlane/swift/Fastlane.swift +140 -30
  49. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +3 -9
  50. data/fastlane/swift/Gymfile.swift +1 -1
  51. data/fastlane/swift/GymfileProtocol.swift +1 -1
  52. data/fastlane/swift/Matchfile.swift +1 -1
  53. data/fastlane/swift/MatchfileProtocol.swift +5 -1
  54. data/fastlane/swift/Precheckfile.swift +1 -1
  55. data/fastlane/swift/RubyCommand.swift +29 -6
  56. data/fastlane/swift/RubyCommandable.swift +1 -0
  57. data/fastlane/swift/Runner.swift +85 -13
  58. data/fastlane/swift/Scanfile.swift +1 -1
  59. data/fastlane/swift/ScanfileProtocol.swift +10 -2
  60. data/fastlane/swift/Screengrabfile.swift +1 -1
  61. data/fastlane/swift/Snapshotfile.swift +1 -1
  62. data/fastlane/swift/SnapshotfileProtocol.swift +17 -1
  63. data/fastlane/swift/SocketClient.swift +76 -45
  64. data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
  65. data/fastlane/swift/SocketResponse.swift +1 -0
  66. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +1 -3
  67. data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +7 -0
  68. data/frameit/lib/frameit/commands_generator.rb +1 -0
  69. data/frameit/lib/frameit/device_types.rb +100 -100
  70. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  71. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +4 -0
  72. data/gym/lib/gym/options.rb +1 -1
  73. data/gym/lib/gym/runner.rb +14 -0
  74. data/match/lib/match/commands_generator.rb +1 -0
  75. data/match/lib/match/generator.rb +2 -1
  76. data/match/lib/match/nuke.rb +21 -16
  77. data/match/lib/match/options.rb +18 -1
  78. data/match/lib/match/storage/git_storage.rb +4 -0
  79. data/match/lib/match/storage/google_cloud_storage.rb +4 -0
  80. data/match/lib/match/storage/interface.rb +4 -0
  81. data/match/lib/match/storage/s3_storage.rb +4 -0
  82. data/pem/lib/pem/commands_generator.rb +1 -0
  83. data/pilot/lib/pilot/build_manager.rb +23 -7
  84. data/pilot/lib/pilot/options.rb +5 -0
  85. data/produce/lib/produce/commands_generator.rb +1 -0
  86. data/produce/lib/produce/itunes_connect.rb +20 -20
  87. data/produce/lib/produce/options.rb +3 -3
  88. data/scan/lib/scan/detect_values.rb +3 -0
  89. data/scan/lib/scan/options.rb +20 -2
  90. data/scan/lib/scan/test_command_generator.rb +6 -1
  91. data/scan/lib/scan/test_result_parser.rb +9 -2
  92. data/screengrab/lib/screengrab/runner.rb +10 -9
  93. data/sigh/lib/assets/resign.sh +7 -7
  94. data/sigh/lib/sigh/commands_generator.rb +1 -0
  95. data/sigh/lib/sigh/options.rb +7 -1
  96. data/sigh/lib/sigh/runner.rb +2 -1
  97. data/snapshot/lib/assets/SnapshotHelper.swift +16 -37
  98. data/snapshot/lib/assets/SnapshotHelperXcode8.swift +3 -3
  99. data/snapshot/lib/snapshot/detect_values.rb +15 -0
  100. data/snapshot/lib/snapshot/options.rb +31 -0
  101. data/snapshot/lib/snapshot/reports_generator.rb +8 -1
  102. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +3 -1
  103. data/snapshot/lib/snapshot/test_command_generator.rb +8 -3
  104. data/snapshot/lib/snapshot/test_command_generator_base.rb +7 -1
  105. data/spaceship/lib/spaceship/.DS_Store +0 -0
  106. data/spaceship/lib/spaceship/client.rb +9 -1
  107. data/spaceship/lib/spaceship/commands_generator.rb +1 -0
  108. data/spaceship/lib/spaceship/connect_api.rb +21 -2
  109. data/spaceship/lib/spaceship/connect_api/client.rb +47 -11
  110. data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
  111. data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +109 -0
  112. data/spaceship/lib/spaceship/connect_api/models/app.rb +113 -3
  113. data/spaceship/lib/spaceship/connect_api/models/app_category.rb +94 -0
  114. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +74 -0
  115. data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +38 -0
  116. data/spaceship/lib/spaceship/connect_api/models/app_price.rb +22 -0
  117. data/spaceship/lib/spaceship/connect_api/models/app_price_tier.rb +12 -0
  118. data/spaceship/lib/spaceship/connect_api/models/app_review_attachment.rb +81 -0
  119. data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +117 -0
  120. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +101 -0
  121. data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +51 -0
  122. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +182 -0
  123. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +70 -0
  124. data/spaceship/lib/spaceship/connect_api/models/app_store_version_phased_release.rb +36 -0
  125. data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +26 -0
  126. data/spaceship/lib/spaceship/connect_api/models/build.rb +8 -0
  127. data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +40 -0
  128. data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +26 -0
  129. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +10 -3
  130. data/spaceship/lib/spaceship/connect_api/tunes/client.rb +33 -0
  131. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +703 -0
  132. data/spaceship/lib/spaceship/errors.rb +3 -0
  133. data/spaceship/lib/spaceship/spaceauth_runner.rb +2 -2
  134. data/supply/lib/supply/client.rb +19 -0
  135. data/supply/lib/supply/commands_generator.rb +1 -0
  136. data/supply/lib/supply/options.rb +9 -0
  137. data/supply/lib/supply/reader.rb +16 -0
  138. data/supply/lib/supply/uploader.rb +4 -0
  139. metadata +52 -47
  140. data/deliver/lib/deliver/upload_assets.rb +0 -27
  141. data/supply/lib/supply/.client.rb.swp +0 -0
@@ -0,0 +1,22 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class AppPrice
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :start_date
8
+
9
+ attr_accessor :price_tier
10
+
11
+ attr_mapping({
12
+ "startDate" => "start_date",
13
+
14
+ "priceTier" => "price_tier"
15
+ })
16
+
17
+ def self.type
18
+ return "appPrices"
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,12 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class AppPriceTier
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ def self.type
8
+ return "appPriceTiers"
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,81 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class AppReviewAttachment
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :file_name
8
+ attr_accessor :source_file_checksum
9
+ attr_accessor :upload_operations
10
+ attr_accessor :asset_delivery_state
11
+ attr_accessor :uploaded
12
+
13
+ attr_mapping({
14
+ "fileName" => "file_name",
15
+ "sourceFileChecksum" => "source_file_checksum",
16
+ "uploadOperations" => "upload_operations",
17
+ "assetDeliveryState" => "asset_delivery_state",
18
+ "uploaded" => "uploaded"
19
+ })
20
+
21
+ def self.type
22
+ return "appReviewAttachments"
23
+ end
24
+
25
+ #
26
+ # API
27
+ #
28
+
29
+ def self.create(app_store_review_detail_id: nil, path: nil)
30
+ require 'faraday'
31
+
32
+ filename = File.basename(path)
33
+ filesize = File.size(path)
34
+ payload = File.binread(path)
35
+
36
+ post_attributes = {
37
+ fileSize: filesize,
38
+ fileName: filename
39
+ }
40
+
41
+ post_resp = Spaceship::ConnectAPI.post_app_review_attachment(app_store_review_detail_id: app_store_review_detail_id, attributes: post_attributes).to_models.first
42
+
43
+ # {
44
+ # "method": "PUT",
45
+ # "url": "https://some-url-apple-gives-us",
46
+ # "length": 57365,
47
+ # "offset": 0,
48
+ # "requestHeaders": [
49
+ # {
50
+ # "name": "Content-Type",
51
+ # "value": "image/png"
52
+ # }
53
+ # ]
54
+ # }
55
+ upload_operation = post_resp.upload_operations.first
56
+
57
+ headers = {}
58
+ upload_operation["requestHeaders"].each do |hash|
59
+ headers[hash["name"]] = hash["value"]
60
+ end
61
+
62
+ Faraday.put(
63
+ upload_operation["url"],
64
+ payload,
65
+ headers
66
+ )
67
+
68
+ patch_attributes = {
69
+ uploaded: true,
70
+ sourceFileChecksum: "checksum-holder"
71
+ }
72
+
73
+ Spaceship::ConnectAPI.patch_app_review_attachment(app_review_attachment_id: post_resp.id, attributes: patch_attributes).to_models.first
74
+ end
75
+
76
+ def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
77
+ Spaceship::ConnectAPI.delete_app_review_attachment(app_review_attachment_id: id)
78
+ end
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,117 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class AppScreenshot
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :file_name
8
+ attr_accessor :source_file_checksum
9
+ attr_accessor :image_asset
10
+ attr_accessor :asset_token
11
+ attr_accessor :asset_type
12
+ attr_accessor :upload_operations
13
+ attr_accessor :asset_delivery_state
14
+ attr_accessor :uploaded
15
+
16
+ # "fileSize": 92542,
17
+ # "fileName": "ftl_3241d62418767c0aa9b889b020c4f8db_45455763d4aaf7b18ee0045bc787f3de.png",
18
+ # "sourceFileChecksum": "c237fd7852ed8f9285d16d9a28d2ec25",
19
+ # "imageAsset": {
20
+ # "templateUrl": "https://is4-ssl.mzstatic.com/image/thumb/Purple113/v4/61/18/68/61186886-b234-5bd0-1f4a-563124f18511/pr_source.png/{w}x{h}bb.{f}",
21
+ # "width": 2048,
22
+ # "height": 2732
23
+ # },
24
+ # "assetToken": "Purple113/v4/61/18/68/61186886-b234-5bd0-1f4a-563124f18511/pr_source.png",
25
+ # "assetType": "SortedJ99ScreenShot",
26
+ # "uploadOperations": null,
27
+ # "assetDeliveryState": {
28
+ # "errors": [],
29
+ # "warnings": null,
30
+ # "state": "COMPLETE"
31
+ # },
32
+ # "uploaded": null
33
+
34
+ # "assetDeliveryState": {
35
+ # "errors": [],
36
+ # "warnings": null,
37
+ # "state": "AWAITING_UPLOAD"
38
+ # },
39
+
40
+ # "assetDeliveryState": {
41
+ # "errors": [],
42
+ # "warnings": null,
43
+ # "state": "UPLOAD_COMPLETE"
44
+ # },
45
+
46
+ attr_mapping({
47
+ "fileName" => "file_name",
48
+ "sourceFileChecksum" => "source_file_checksum",
49
+ "imageAsset" => "image_asset",
50
+ "assetToken" => "asset_token",
51
+ "assetType" => "asset_type",
52
+ "uploadOperations" => "upload_operations",
53
+ "assetDeliveryState" => "asset_delivery_state",
54
+ "uploaded" => "uploaded"
55
+ })
56
+
57
+ def self.type
58
+ return "appScreenshots"
59
+ end
60
+
61
+ #
62
+ # API
63
+ #
64
+
65
+ def self.create(app_screenshot_set_id: nil, path: nil)
66
+ require 'faraday'
67
+
68
+ filename = File.basename(path)
69
+ filesize = File.size(path)
70
+ payload = File.binread(path)
71
+
72
+ post_attributes = {
73
+ fileSize: filesize,
74
+ fileName: filename
75
+ }
76
+
77
+ post_resp = Spaceship::ConnectAPI.post_app_screenshot(app_screenshot_set_id: app_screenshot_set_id, attributes: post_attributes).to_models.first
78
+
79
+ # {
80
+ # "method": "PUT",
81
+ # "url": "https://some-url-apple-gives-us",
82
+ # "length": 57365,
83
+ # "offset": 0,
84
+ # "requestHeaders": [
85
+ # {
86
+ # "name": "Content-Type",
87
+ # "value": "image/png"
88
+ # }
89
+ # ]
90
+ # }
91
+ upload_operation = post_resp.upload_operations.first
92
+
93
+ headers = {}
94
+ upload_operation["requestHeaders"].each do |hash|
95
+ headers[hash["name"]] = hash["value"]
96
+ end
97
+
98
+ Faraday.put(
99
+ upload_operation["url"],
100
+ payload,
101
+ headers
102
+ )
103
+
104
+ patch_attributes = {
105
+ uploaded: true,
106
+ sourceFileChecksum: "checksum-holder"
107
+ }
108
+
109
+ Spaceship::ConnectAPI.patch_app_screenshot(app_screenshot_id: post_resp.id, attributes: patch_attributes).to_models.first
110
+ end
111
+
112
+ def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
113
+ Spaceship::ConnectAPI.delete_app_screenshot(app_screenshot_id: id)
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,101 @@
1
+ require_relative '../model'
2
+ require_relative './app_screenshot'
3
+
4
+ module Spaceship
5
+ class ConnectAPI
6
+ class AppScreenshotSet
7
+ include Spaceship::ConnectAPI::Model
8
+
9
+ attr_accessor :screenshot_display_type
10
+
11
+ attr_accessor :app_screenshots
12
+
13
+ module DisplayType
14
+ APP_IPHONE_35 = "APP_IPHONE_35"
15
+ APP_IPHONE_40 = "APP_IPHONE_40"
16
+ APP_IPHONE_47 = "APP_IPHONE_47"
17
+ APP_IPHONE_55 = "APP_IPHONE_55"
18
+ APP_IPHONE_58 = "APP_IPHONE_58"
19
+ APP_IPHONE_65 = "APP_IPHONE_65"
20
+
21
+ APP_IPAD_97 = "APP_IPAD_97"
22
+ APP_IPAD_105 = "APP_IPAD_105"
23
+ APP_IPAD_PRO_3GEN_11 = "APP_IPAD_PRO_3GEN_11"
24
+ APP_IPAD_PRO_129 = "APP_IPAD_PRO_129"
25
+ APP_IPAD_PRO_3GEN_129 = "APP_IPAD_PRO_3GEN_129"
26
+
27
+ IMESSAGE_APP_IPHONE_40 = "IMESSAGE_APP_IPHONE_40"
28
+ IMESSAGE_APP_IPHONE_47 = "IMESSAGE_APP_IPHONE_47"
29
+ IMESSAGE_APP_IPHONE_55 = "IMESSAGE_APP_IPHONE_55"
30
+ IMESSAGE_APP_IPHONE_58 = "IMESSAGE_APP_IPHONE_58"
31
+ IMESSAGE_APP_IPHONE_65 = "IMESSAGE_APP_IPHONE_65"
32
+
33
+ IMESSAGE_APP_IPAD_97 = "IMESSAGE_APP_IPAD_97"
34
+ IMESSAGE_APP_IPAD_105 = "IMESSAGE_APP_IPAD_105"
35
+ IMESSAGE_APP_IPAD_PRO_129 = "IMESSAGE_APP_IPAD_PRO_129"
36
+ IMESSAGE_APP_IPAD_PRO_3GEN_11 = "IMESSAGE_APP_IPAD_PRO_3GEN_11"
37
+ IMESSAGE_APP_IPAD_PRO_3GEN_129 = "IMESSAGE_APP_IPAD_PRO_3GEN_129"
38
+
39
+ APP_WATCH_SERIES_3 = "APP_WATCH_SERIES_3"
40
+ APP_WATCH_SERIES_4 = "APP_WATCH_SERIES_4"
41
+
42
+ APP_DESKTOP = "APP_DESKTOP"
43
+
44
+ ALL = [
45
+ APP_IPHONE_35,
46
+ APP_IPHONE_40,
47
+ APP_IPHONE_47,
48
+ APP_IPHONE_55,
49
+ APP_IPHONE_58,
50
+ APP_IPHONE_65,
51
+
52
+ APP_IPAD_97,
53
+ APP_IPAD_105,
54
+ APP_IPAD_PRO_3GEN_11,
55
+ APP_IPAD_PRO_129,
56
+ APP_IPAD_PRO_3GEN_129,
57
+
58
+ IMESSAGE_APP_IPHONE_40,
59
+ IMESSAGE_APP_IPHONE_47,
60
+ IMESSAGE_APP_IPHONE_55,
61
+ IMESSAGE_APP_IPHONE_58,
62
+ IMESSAGE_APP_IPHONE_65,
63
+
64
+ IMESSAGE_APP_IPAD_97,
65
+ IMESSAGE_APP_IPAD_105,
66
+ IMESSAGE_APP_IPAD_PRO_129,
67
+ IMESSAGE_APP_IPAD_PRO_3GEN_11,
68
+ IMESSAGE_APP_IPAD_PRO_3GEN_129,
69
+
70
+ APP_WATCH_SERIES_3,
71
+ APP_WATCH_SERIES_4,
72
+
73
+ APP_DESKTOP
74
+ ]
75
+ end
76
+
77
+ attr_mapping({
78
+ "screenshotDisplayType" => "screenshot_display_type",
79
+
80
+ "appScreenshots" => "app_screenshots"
81
+ })
82
+
83
+ def self.type
84
+ return "appScreenshotSets"
85
+ end
86
+
87
+ #
88
+ # API
89
+ #
90
+
91
+ def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
92
+ resp = Spaceship::ConnectAPI.get_app_screenshot_sets(filter: filter, includes: includes, limit: limit, sort: sort)
93
+ return resp.to_models
94
+ end
95
+
96
+ def upload_screenshot(path: nil)
97
+ return Spaceship::ConnectAPI::AppScreenshot.create(app_screenshot_set_id: id, path: path)
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,51 @@
1
+ require_relative '../model'
2
+ require_relative './app_review_attachment'
3
+
4
+ module Spaceship
5
+ class ConnectAPI
6
+ class AppStoreReviewDetail
7
+ include Spaceship::ConnectAPI::Model
8
+
9
+ attr_accessor :contact_first_name
10
+ attr_accessor :contact_last_name
11
+ attr_accessor :contact_phone
12
+ attr_accessor :contact_email
13
+ attr_accessor :demo_account_name
14
+ attr_accessor :demo_account_password
15
+ attr_accessor :demo_account_required
16
+ attr_accessor :notes
17
+
18
+ attr_mapping({
19
+ "contactFirstName" => "contact_first_name",
20
+ "contactLastName" => "contact_last_name",
21
+ "contactPhone" => "contact_phone",
22
+ "contactEmail" => "contact_email",
23
+ "demoAccountName" => "demo_account_name",
24
+ "demoAccountPassword" => "demo_account_password",
25
+ "demoAccountRequired" => "demo_account_required",
26
+ "notes" => "notes"
27
+ })
28
+
29
+ def self.type
30
+ return "appStoreReviewDetails"
31
+ end
32
+
33
+ #
34
+ # API
35
+ #
36
+
37
+ def fetch_app_review_attachments
38
+ resp = Spaceship::ConnectAPI.get_app_review_attachments(app_store_review_detail_id: id)
39
+ return resp.to_models
40
+ end
41
+
42
+ def update(attributes: nil)
43
+ return Spaceship::ConnectAPI.patch_app_store_review_detail(app_store_review_detail_id: id, attributes: attributes)
44
+ end
45
+
46
+ def upload_attachment(path: nil)
47
+ return Spaceship::ConnectAPI::AppReviewAttachment.create(app_store_review_detail_id: id, path: path)
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,182 @@
1
+ require_relative '../model'
2
+ require_relative './app_store_version_localization'
3
+
4
+ module Spaceship
5
+ class ConnectAPI
6
+ class AppStoreVersion
7
+ include Spaceship::ConnectAPI::Model
8
+
9
+ attr_accessor :platform
10
+ attr_accessor :version_string
11
+ attr_accessor :app_store_state
12
+ attr_accessor :store_icon
13
+ attr_accessor :watch_store_icon
14
+ attr_accessor :copyright
15
+ attr_accessor :release_type
16
+ attr_accessor :earliest_release_date # 2020-06-17T12:00:00-07:00
17
+ attr_accessor :uses_idfa
18
+ attr_accessor :is_watch_only
19
+ attr_accessor :downloadable
20
+ attr_accessor :created_date
21
+
22
+ module AppStoreState
23
+ READY_FOR_SALE = "READY_FOR_SALE"
24
+ WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
25
+ DEVELOPER_REJECTED = "DEVELOPER_REJECTED"
26
+ REJECTED = "REJECTED"
27
+ PREPARE_FOR_SUBMISSION = "PREPARE_FOR_SUBMISSION"
28
+ METADATA_REJECTED = "METADATA_REJECTED"
29
+ end
30
+
31
+ module ReleaseType
32
+ AFTER_APPROVAL = "AFTER_APPROVAL"
33
+ MANUAL = "MANUAL"
34
+ SCHEDULED = "SCHEDULED"
35
+ end
36
+
37
+ attr_mapping({
38
+ "platform" => "platform",
39
+ "versionString" => "version_string",
40
+ "appStoreState" => "app_store_state",
41
+ "storeIcon" => "store_icon",
42
+ "watchStoreIcon" => "watch_store_icon",
43
+ "copyright" => "copyright",
44
+ "releaseType" => "release_type",
45
+ "earliestReleaseDate" => "earliest_release_date",
46
+ "usesIdfa" => "uses_idfa",
47
+ "isWatchOnly" => "is_watch_only",
48
+ "downloadable" => "downloadable",
49
+ "createdDate" => "created_date"
50
+ })
51
+
52
+ def self.type
53
+ return "appStoreVersions"
54
+ end
55
+
56
+ #
57
+ # API
58
+ #
59
+
60
+ # app,routingAppCoverage,resetRatingsRequest,appStoreVersionSubmission,appStoreVersionPhasedRelease,ageRatingDeclaration,appStoreReviewDetail,idfaDeclaration,gameCenterConfiguration
61
+ def self.get(app_store_version_id: nil, includes: nil, limit: nil, sort: nil)
62
+ return Spaceship::ConnectAPI.get_app_store_version(
63
+ app_store_version_id: app_store_version_id,
64
+ includes: includes
65
+ ).first
66
+ end
67
+
68
+ def update(attributes: nil)
69
+ return Spaceship::ConnectAPI.patch_app_store_version(app_store_version_id: id, attributes: attributes).first
70
+ end
71
+
72
+ #
73
+ # Age Rating Delcaration
74
+ #
75
+
76
+ def fetch_age_rating_declaration
77
+ resp = Spaceship::ConnectAPI.get_age_rating_declaration(app_store_version_id: id)
78
+ return resp.to_models.first
79
+ end
80
+
81
+ #
82
+ # App Store Version Localizations
83
+ #
84
+
85
+ def create_app_store_version_localization(attributes: nil)
86
+ resp = Spaceship::ConnectAPI.post_app_store_version_localization(app_store_version_id: id, attributes: attributes)
87
+ return resp.to_models.first
88
+ end
89
+
90
+ # appScreenshotSets,appPreviewSets
91
+ def get_app_store_version_localizations(filter: {}, includes: "appScreenshotSets", limit: nil, sort: nil)
92
+ filter ||= {}
93
+ filter["appStoreVersion"] = id
94
+ return Spaceship::ConnectAPI::AppStoreVersionLocalization.all(filter: filter, includes: includes, limit: limit, sort: sort)
95
+ end
96
+
97
+ #
98
+ # App Store Review Detail
99
+ #
100
+
101
+ def create_app_store_review_detail(attributes: nil)
102
+ resp = Spaceship::ConnectAPI.post_app_store_review_detail(app_store_version_id: id, attributes: attributes)
103
+ return resp.to_models.first
104
+ end
105
+
106
+ def fetch_app_store_review_detail
107
+ resp = Spaceship::ConnectAPI.get_app_store_review_detail(app_store_version_id: id)
108
+ return resp.to_models.first
109
+ end
110
+
111
+ #
112
+ # App Store Version Phased Releases
113
+ #
114
+
115
+ def fetch_app_store_version_phased_release
116
+ resp = Spaceship::ConnectAPI.get_app_store_version_phased_release(app_store_version_id: id)
117
+ return resp.to_models.first
118
+ end
119
+
120
+ def create_app_store_version_phased_release(attributes: nil)
121
+ resp = Spaceship::ConnectAPI.post_app_store_version_phased_release(app_store_version_id: id, attributes: attributes)
122
+ return resp.to_models.first
123
+ end
124
+
125
+ #
126
+ # App Store Version Submissions
127
+ #
128
+
129
+ def fetch_app_store_version_submission
130
+ resp = Spaceship::ConnectAPI.get_app_store_version_submission(app_store_version_id: id)
131
+ return resp.to_models.first
132
+ end
133
+
134
+ def create_app_store_version_submission
135
+ resp = Spaceship::ConnectAPI.post_app_store_version_submission(app_store_version_id: id)
136
+ return resp.to_models.first
137
+ end
138
+
139
+ #
140
+ # Build
141
+ #
142
+
143
+ def get_build(build_id: nil)
144
+ resp = Spaceship::ConnectAPI.get_build(app_store_version_id: id, build_id: build_id)
145
+ return resp.to_models.first
146
+ end
147
+
148
+ def select_build(build_id: nil)
149
+ resp = Spaceship::ConnectAPI.patch_app_store_version_with_build(app_store_version_id: id, build_id: build_id)
150
+ return resp.to_models.first
151
+ end
152
+
153
+ #
154
+ # IDFA Declarations
155
+ #
156
+
157
+ def fetch_idfa_declaration
158
+ resp = Spaceship::ConnectAPI.get_idfa_declaration(app_store_version_id: id)
159
+ return resp.to_models.first
160
+ end
161
+
162
+ def create_idfa_declaration(attributes: nil)
163
+ resp = Spaceship::ConnectAPI.post_idfa_declaration(app_store_version_id: id, attributes: attributes)
164
+ return resp.to_models.first
165
+ end
166
+
167
+ #
168
+ # Reset Ratings Requests
169
+ #
170
+
171
+ def fetch_reset_ratings_request
172
+ resp = Spaceship::ConnectAPI.get_reset_ratings_request(app_store_version_id: id)
173
+ return resp.to_models.first
174
+ end
175
+
176
+ def create_reset_ratings_request
177
+ resp = Spaceship::ConnectAPI.post_reset_ratings_request(app_store_version_id: id)
178
+ return resp.to_models.first
179
+ end
180
+ end
181
+ end
182
+ end