fastlane 2.150.1 → 2.151.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +78 -78
- data/{fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp → deliver/lib/deliver/.commands_generator.rb.swp} +0 -0
- data/deliver/lib/deliver/.submit_for_review.rb.swp +0 -0
- data/deliver/lib/deliver/app_screenshot.rb +4 -4
- data/deliver/lib/deliver/download_screenshots.rb +35 -28
- data/deliver/lib/deliver/options.rb +7 -1
- data/deliver/lib/deliver/runner.rb +7 -3
- data/deliver/lib/deliver/submit_for_review.rb +7 -7
- data/deliver/lib/deliver/upload_metadata.rb +5 -5
- data/deliver/lib/deliver/upload_screenshots.rb +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +3 -0
- data/fastlane/lib/fastlane/actions/notarize.rb +13 -3
- data/fastlane/lib/fastlane/actions/pod_push.rb +10 -1
- data/fastlane/lib/fastlane/actions/resign.rb +1 -1
- data/fastlane/lib/fastlane/actions/setup_ci.rb +5 -0
- data/fastlane/lib/fastlane/actions/setup_circle_ci.rb +1 -1
- data/fastlane/lib/fastlane/actions/setup_travis.rb +1 -1
- data/fastlane/lib/fastlane/actions/slather.rb +7 -0
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +10 -2
- data/fastlane/lib/fastlane/documentation/docs_generator.rb +1 -1
- data/{pilot/lib/pilot/.manager.rb.swp → fastlane/lib/fastlane/helper/.s3_client_helper.rb.swp} +0 -0
- data/fastlane/lib/fastlane/helper/s3_client_helper.rb +28 -11
- data/fastlane/lib/fastlane/server/socket_server.rb +7 -1
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +1 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +1 -1
- data/fastlane/swift/ArgumentProcessor.swift +24 -24
- data/fastlane/swift/ControlCommand.swift +3 -3
- data/fastlane/swift/Deliverfile.swift +4 -8
- data/fastlane/swift/DeliverfileProtocol.swift +181 -182
- data/fastlane/swift/Fastlane.swift +2819 -2805
- data/fastlane/swift/Gymfile.swift +4 -8
- data/fastlane/swift/GymfileProtocol.swift +133 -134
- data/fastlane/swift/LaneFileProtocol.swift +17 -17
- data/fastlane/swift/Matchfile.swift +4 -8
- data/fastlane/swift/MatchfileProtocol.swift +115 -112
- data/fastlane/swift/Plugins.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +4 -8
- data/fastlane/swift/PrecheckfileProtocol.swift +22 -23
- data/fastlane/swift/RubyCommand.swift +34 -37
- data/fastlane/swift/RubyCommandable.swift +3 -1
- data/fastlane/swift/Runner.swift +76 -69
- data/fastlane/swift/Scanfile.swift +4 -8
- data/fastlane/swift/ScanfileProtocol.swift +190 -191
- data/fastlane/swift/Screengrabfile.swift +4 -8
- data/fastlane/swift/ScreengrabfileProtocol.swift +67 -68
- data/fastlane/swift/Snapshotfile.swift +4 -8
- data/fastlane/swift/SnapshotfileProtocol.swift +127 -128
- data/fastlane/swift/SocketClient.swift +84 -90
- data/fastlane/swift/SocketResponse.swift +14 -14
- data/fastlane/swift/formatting/Brewfile +1 -0
- data/fastlane/swift/formatting/Brewfile.lock.json +39 -0
- data/fastlane/swift/formatting/Rakefile +18 -0
- data/fastlane/swift/main.swift +5 -6
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +21 -10
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +1 -1
- data/{fastlane/lib/fastlane/actions/.hockey.rb.swp → frameit/lib/frameit/.editor.rb.swp} +0 -0
- data/match/lib/assets/READMETemplate.md +5 -2
- data/match/lib/match/options.rb +4 -0
- data/match/lib/match/runner.rb +5 -4
- data/match/lib/match/storage/git_storage.rb +1 -1
- data/match/lib/match/storage/s3_storage.rb +25 -7
- data/sigh/lib/assets/resign.sh +18 -0
- data/spaceship/lib/spaceship/{connect_api/.DS_Store → .DS_Store} +0 -0
- data/spaceship/lib/spaceship/client.rb +1 -2
- data/spaceship/lib/spaceship/connect_api.rb +1 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +0 -1
- data/spaceship/lib/spaceship/connect_api/file_uploader.rb +0 -1
- data/spaceship/lib/spaceship/connect_api/models/app.rb +3 -3
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +24 -1
- data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +7 -6
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +31 -2
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +24 -2
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +11 -1
- data/spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb +64 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +45 -0
- metadata +45 -51
- data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/spaceship/lib/spaceship/babosa_fix.rb +0 -30
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
task(default: %w[setup])
|
4
|
+
|
5
|
+
task(setup: [:brew, :lint])
|
6
|
+
|
7
|
+
task(:brew) do
|
8
|
+
raise '`brew` is required. Please install brew. https://brew.sh/' unless system('which brew')
|
9
|
+
|
10
|
+
puts('➡️ Brew')
|
11
|
+
sh('brew bundle')
|
12
|
+
end
|
13
|
+
|
14
|
+
task(:lint) do
|
15
|
+
Dir.chdir('..') do
|
16
|
+
sh("swiftformat . --config formatting/.swiftformat --verbose --selfrequired waitWithPolling --exclude Fastfile.swift --swiftversion 4.0")
|
17
|
+
end
|
18
|
+
end
|
data/fastlane/swift/main.swift
CHANGED
@@ -20,18 +20,18 @@ let timeout = argumentProcessor.commandTimeout
|
|
20
20
|
class MainProcess {
|
21
21
|
var doneRunningLane = false
|
22
22
|
var thread: Thread!
|
23
|
-
|
23
|
+
|
24
24
|
@objc func connectToFastlaneAndRunLane() {
|
25
25
|
runner.startSocketThread(port: argumentProcessor.port)
|
26
|
-
|
26
|
+
|
27
27
|
let completedRun = Fastfile.runLane(named: argumentProcessor.currentLane, parameters: argumentProcessor.laneParameters())
|
28
28
|
if completedRun {
|
29
29
|
runner.disconnectFromFastlaneProcess()
|
30
30
|
}
|
31
|
-
|
31
|
+
|
32
32
|
doneRunningLane = true
|
33
33
|
}
|
34
|
-
|
34
|
+
|
35
35
|
func startFastlaneThread() {
|
36
36
|
thread = Thread(target: self, selector: #selector(connectToFastlaneAndRunLane), object: nil)
|
37
37
|
thread.name = "worker thread"
|
@@ -42,11 +42,10 @@ class MainProcess {
|
|
42
42
|
let process: MainProcess = MainProcess()
|
43
43
|
process.startFastlaneThread()
|
44
44
|
|
45
|
-
while
|
45
|
+
while !process.doneRunningLane, RunLoop.current.run(mode: RunLoopMode.defaultRunLoopMode, before: Date(timeIntervalSinceNow: 2)) {
|
46
46
|
// no op
|
47
47
|
}
|
48
48
|
|
49
49
|
// Please don't remove the lines below
|
50
50
|
// They are used to detect outdated files
|
51
51
|
// FastlaneRunnerAPIVersion [0.9.2]
|
52
|
-
|
@@ -149,14 +149,22 @@ module FastlaneCore
|
|
149
149
|
end
|
150
150
|
|
151
151
|
def additional_upload_parameters
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
|
157
|
-
|
152
|
+
# As Apple recommends in Transporter User Guide we shouldn't specify the -t transport parameter
|
153
|
+
# and instead allow Transporter to use automatic transport discovery
|
154
|
+
# to determine the best transport mode for packages.
|
155
|
+
# It became crucial after WWDC 2020 as it leaded to "Broken pipe (Write failed)" exception
|
156
|
+
# More information https://github.com/fastlane/fastlane/issues/16749
|
157
|
+
env_deliver_additional_params = ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"]
|
158
|
+
if env_deliver_additional_params.to_s.strip.empty?
|
159
|
+
return nil
|
160
|
+
end
|
161
|
+
|
162
|
+
deliver_additional_params = env_deliver_additional_params.to_s.strip
|
163
|
+
if !deliver_additional_params.include?("-t ")
|
164
|
+
UI.user_error!("Invalid transport parameter")
|
165
|
+
else
|
166
|
+
return deliver_additional_params
|
158
167
|
end
|
159
|
-
return ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"]
|
160
168
|
end
|
161
169
|
end
|
162
170
|
|
@@ -241,10 +249,11 @@ module FastlaneCore
|
|
241
249
|
def build_upload_command(username, password, source = "/tmp", provider_short_name = "")
|
242
250
|
if Helper.mac? && Helper.xcode_at_least?(11)
|
243
251
|
[
|
252
|
+
"ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}",
|
244
253
|
'xcrun iTMSTransporter',
|
245
254
|
'-m upload',
|
246
255
|
"-u #{username.shellescape}",
|
247
|
-
"-p
|
256
|
+
"-p @env:ITMS_TRANSPORTER_PASSWORD",
|
248
257
|
"-f #{source.shellescape}",
|
249
258
|
additional_upload_parameters, # that's here, because the user might overwrite the -t option
|
250
259
|
'-k 100000',
|
@@ -277,10 +286,11 @@ module FastlaneCore
|
|
277
286
|
def build_download_command(username, password, apple_id, destination = "/tmp", provider_short_name = "")
|
278
287
|
if Helper.mac? && Helper.xcode_at_least?(11)
|
279
288
|
[
|
289
|
+
"ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}",
|
280
290
|
'xcrun iTMSTransporter',
|
281
291
|
'-m lookupMetadata',
|
282
292
|
"-u #{username.shellescape}",
|
283
|
-
"-p
|
293
|
+
"-p @env:ITMS_TRANSPORTER_PASSWORD",
|
284
294
|
"-apple_id #{apple_id.shellescape}",
|
285
295
|
"-destination #{destination.shellescape}",
|
286
296
|
("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?),
|
@@ -311,10 +321,11 @@ module FastlaneCore
|
|
311
321
|
def build_provider_ids_command(username, password)
|
312
322
|
if Helper.mac? && Helper.xcode_at_least?(11)
|
313
323
|
[
|
324
|
+
"ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}",
|
314
325
|
'xcrun iTMSTransporter',
|
315
326
|
'-m provider',
|
316
327
|
"-u #{username.shellescape}",
|
317
|
-
"-p
|
328
|
+
"-p @env:ITMS_TRANSPORTER_PASSWORD",
|
318
329
|
'2>&1' # cause stderr to be written to stdout
|
319
330
|
].compact.join(' ')
|
320
331
|
else
|
@@ -205,7 +205,7 @@ module Commander
|
|
205
205
|
ui.error(" - Use Homebrew")
|
206
206
|
ui.error(" - update brew with `brew update`")
|
207
207
|
ui.error(" - install fastlane using:")
|
208
|
-
ui.error(" - `brew
|
208
|
+
ui.error(" - `brew install fastlane`")
|
209
209
|
ui.error(" - Use One-Click-Installer:")
|
210
210
|
ui.error(" - download fastlane at https://download.fastlane.tools")
|
211
211
|
ui.error(" - extract the archive and double click the `install`")
|
Binary file
|
@@ -20,7 +20,7 @@ Install _fastlane_ using
|
|
20
20
|
[sudo] gem install fastlane -NV
|
21
21
|
```
|
22
22
|
|
23
|
-
or alternatively using `brew
|
23
|
+
or alternatively using `brew install fastlane`
|
24
24
|
|
25
25
|
### Usage
|
26
26
|
|
@@ -29,12 +29,15 @@ Navigate to your project folder and run
|
|
29
29
|
```
|
30
30
|
fastlane match appstore
|
31
31
|
```
|
32
|
+
|
32
33
|
```
|
33
34
|
fastlane match adhoc
|
34
35
|
```
|
36
|
+
|
35
37
|
```
|
36
38
|
fastlane match development
|
37
39
|
```
|
40
|
+
|
38
41
|
```
|
39
42
|
fastlane match enterprise
|
40
43
|
```
|
@@ -51,6 +54,6 @@ This directory contains all your certificates with their private keys
|
|
51
54
|
|
52
55
|
This directory contains all provisioning profiles
|
53
56
|
|
54
|
-
|
57
|
+
---
|
55
58
|
|
56
59
|
For more information open [fastlane match git repo](https://docs.fastlane.tools/actions/match/)
|
data/match/lib/match/options.rb
CHANGED
@@ -186,6 +186,10 @@ module Match
|
|
186
186
|
env_name: "MATCH_S3_BUCKET",
|
187
187
|
description: "Name of the S3 bucket",
|
188
188
|
optional: true),
|
189
|
+
FastlaneCore::ConfigItem.new(key: :s3_object_prefix,
|
190
|
+
env_name: "MATCH_S3_OBJECT_PREFIX",
|
191
|
+
description: "Prefix to be used on all objects uploaded to S3",
|
192
|
+
optional: true),
|
189
193
|
|
190
194
|
# Keychain
|
191
195
|
FastlaneCore::ConfigItem.new(key: :keychain_name,
|
data/match/lib/match/runner.rb
CHANGED
@@ -46,10 +46,11 @@ module Match
|
|
46
46
|
google_cloud_bucket_name: params[:google_cloud_bucket_name].to_s,
|
47
47
|
google_cloud_keys_file: params[:google_cloud_keys_file].to_s,
|
48
48
|
google_cloud_project_id: params[:google_cloud_project_id].to_s,
|
49
|
-
s3_region: params[:s3_region]
|
50
|
-
s3_access_key: params[:s3_access_key]
|
51
|
-
s3_secret_access_key: params[:s3_secret_access_key]
|
52
|
-
s3_bucket: params[:s3_bucket]
|
49
|
+
s3_region: params[:s3_region],
|
50
|
+
s3_access_key: params[:s3_access_key],
|
51
|
+
s3_secret_access_key: params[:s3_secret_access_key],
|
52
|
+
s3_bucket: params[:s3_bucket],
|
53
|
+
s3_object_prefix: params[:s3_object_prefix],
|
53
54
|
readonly: params[:readonly],
|
54
55
|
username: params[:readonly] ? nil : params[:username], # only pass username if not readonly
|
55
56
|
team_id: params[:team_id],
|
@@ -14,6 +14,7 @@ module Match
|
|
14
14
|
attr_reader :s3_bucket
|
15
15
|
attr_reader :s3_region
|
16
16
|
attr_reader :s3_client
|
17
|
+
attr_reader :s3_object_prefix
|
17
18
|
attr_reader :readonly
|
18
19
|
attr_reader :username
|
19
20
|
attr_reader :team_id
|
@@ -24,6 +25,7 @@ module Match
|
|
24
25
|
s3_access_key = params[:s3_access_key]
|
25
26
|
s3_secret_access_key = params[:s3_secret_access_key]
|
26
27
|
s3_bucket = params[:s3_bucket]
|
28
|
+
s3_object_prefix = params[:s3_object_prefix]
|
27
29
|
|
28
30
|
if params[:git_url].to_s.length > 0
|
29
31
|
UI.important("Looks like you still define a `git_url` somewhere, even though")
|
@@ -37,6 +39,7 @@ module Match
|
|
37
39
|
s3_access_key: s3_access_key,
|
38
40
|
s3_secret_access_key: s3_secret_access_key,
|
39
41
|
s3_bucket: s3_bucket,
|
42
|
+
s3_object_prefix: s3_object_prefix,
|
40
43
|
readonly: params[:readonly],
|
41
44
|
username: params[:username],
|
42
45
|
team_id: params[:team_id],
|
@@ -48,6 +51,7 @@ module Match
|
|
48
51
|
s3_access_key: nil,
|
49
52
|
s3_secret_access_key: nil,
|
50
53
|
s3_bucket: nil,
|
54
|
+
s3_object_prefix: nil,
|
51
55
|
readonly: nil,
|
52
56
|
username: nil,
|
53
57
|
team_id: nil,
|
@@ -55,6 +59,7 @@ module Match
|
|
55
59
|
@s3_bucket = s3_bucket
|
56
60
|
@s3_region = s3_region
|
57
61
|
@s3_client = Fastlane::Helper::S3ClientHelper.new(access_key: s3_access_key, secret_access_key: s3_secret_access_key, region: s3_region)
|
62
|
+
@s3_object_prefix = s3_object_prefix.to_s
|
58
63
|
@readonly = readonly
|
59
64
|
@username = username
|
60
65
|
@team_id = team_id
|
@@ -88,8 +93,10 @@ module Match
|
|
88
93
|
# No existing working directory, creating a new one now
|
89
94
|
self.working_directory = Dir.mktmpdir
|
90
95
|
|
91
|
-
s3_client.find_bucket!(s3_bucket).objects.each do |object|
|
92
|
-
file_path = object.key # :team_id/path/to/file
|
96
|
+
s3_client.find_bucket!(s3_bucket).objects(prefix: s3_object_prefix).each do |object|
|
97
|
+
file_path = strip_s3_object_prefix(object.key) # :s3_object_prefix:team_id/path/to/file
|
98
|
+
|
99
|
+
# strip s3_prefix from file_path
|
93
100
|
download_path = File.join(self.working_directory, file_path)
|
94
101
|
|
95
102
|
FileUtils.mkdir_p(File.expand_path("..", download_path))
|
@@ -113,12 +120,11 @@ module Match
|
|
113
120
|
|
114
121
|
files_to_upload.each do |file_name|
|
115
122
|
# Go from
|
116
|
-
# "/var/folders/px/bz2kts9n69g8crgv4jpjh6b40000gn/T/d20181026-96528-1av4gge/profiles/development/Development_me.mobileprovision"
|
123
|
+
# "/var/folders/px/bz2kts9n69g8crgv4jpjh6b40000gn/T/d20181026-96528-1av4gge/:team_id/profiles/development/Development_me.mobileprovision"
|
117
124
|
# to
|
118
|
-
# "profiles/development/Development_me.mobileprovision"
|
125
|
+
# ":s3_object_prefix:team_id/profiles/development/Development_me.mobileprovision"
|
119
126
|
#
|
120
|
-
|
121
|
-
target_path = sanitize_file_name(file_name)
|
127
|
+
target_path = s3_object_path(file_name)
|
122
128
|
UI.verbose("Uploading '#{target_path}' to S3 Storage...")
|
123
129
|
|
124
130
|
body = File.read(file_name)
|
@@ -130,7 +136,8 @@ module Match
|
|
130
136
|
|
131
137
|
def delete_files(files_to_delete: [], custom_message: nil)
|
132
138
|
files_to_delete.each do |file_name|
|
133
|
-
target_path =
|
139
|
+
target_path = s3_object_path(file_name)
|
140
|
+
UI.verbose("Deleting '#{target_path}' from S3 Storage...")
|
134
141
|
s3_client.delete_file(s3_bucket, target_path)
|
135
142
|
end
|
136
143
|
end
|
@@ -152,6 +159,17 @@ module Match
|
|
152
159
|
|
153
160
|
private
|
154
161
|
|
162
|
+
def s3_object_path(file_name)
|
163
|
+
santized = sanitize_file_name(file_name)
|
164
|
+
return santized if santized.start_with?(s3_object_prefix)
|
165
|
+
|
166
|
+
s3_object_prefix + santized
|
167
|
+
end
|
168
|
+
|
169
|
+
def strip_s3_object_prefix(object_path)
|
170
|
+
object_path.gsub(/^#{s3_object_prefix}/, "")
|
171
|
+
end
|
172
|
+
|
155
173
|
def sanitize_file_name(file_name)
|
156
174
|
file_name.gsub(self.working_directory + "/", "")
|
157
175
|
end
|
data/sigh/lib/assets/resign.sh
CHANGED
@@ -69,6 +69,9 @@
|
|
69
69
|
# new features March 2019
|
70
70
|
# 1. two more fixes for only creating the archived-expanded-entitlements.xcent file if the version of Xcode < 9.3 as Xcode 10 does not create it.
|
71
71
|
#
|
72
|
+
# new features June 2020
|
73
|
+
# 1. enable (re)signing of OnDemandResources when ipa has been built for the appstore
|
74
|
+
#
|
72
75
|
|
73
76
|
# Logging functions
|
74
77
|
|
@@ -528,6 +531,21 @@ function resign {
|
|
528
531
|
PlistBuddy -c "Set :CFBundleVersion $BUNDLE_VERSION" "$APP_PATH/Info.plist"
|
529
532
|
fi
|
530
533
|
|
534
|
+
# Check for and resign OnDemandResource folders
|
535
|
+
ODR_DIR="$(dirname $APP_PATH)/OnDemandResources"
|
536
|
+
if [ -d "$ODR_DIR" ]; then
|
537
|
+
for assetpack in "$ODR_DIR"/*
|
538
|
+
do
|
539
|
+
if [[ "$assetpack" == *.assetpack ]]; then
|
540
|
+
rm -rf $assetpack/_CodeSignature
|
541
|
+
/usr/bin/codesign ${VERBOSE} ${KEYCHAIN_FLAG} -f -s "$CERTIFICATE" "$assetpack"
|
542
|
+
checkStatus
|
543
|
+
else
|
544
|
+
log "Ignoring non-assetpack: $assetpack"
|
545
|
+
fi
|
546
|
+
done
|
547
|
+
fi
|
548
|
+
|
531
549
|
# Check for and resign any embedded frameworks (new feature for iOS 8 and above apps)
|
532
550
|
FRAMEWORKS_DIR="$APP_PATH/Frameworks"
|
533
551
|
if [ -d "$FRAMEWORKS_DIR" ]; then
|
Binary file
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'babosa'
|
1
2
|
require 'faraday' # HTTP Client
|
2
3
|
require 'faraday-cookie_jar'
|
3
4
|
require 'faraday_middleware'
|
@@ -7,7 +8,6 @@ require 'cgi'
|
|
7
8
|
require 'tempfile'
|
8
9
|
|
9
10
|
require 'fastlane/version'
|
10
|
-
require_relative 'babosa_fix'
|
11
11
|
require_relative 'helper/net_http_generic_request'
|
12
12
|
require_relative 'helper/plist_middleware'
|
13
13
|
require_relative 'helper/rels_middleware'
|
@@ -206,7 +206,6 @@ module Spaceship
|
|
206
206
|
|
207
207
|
@client = Faraday.new(self.class.hostname, options) do |c|
|
208
208
|
c.response(:json, content_type: /\bjson$/)
|
209
|
-
c.response(:xml, content_type: /\bxml$/)
|
210
209
|
c.response(:plist, content_type: /\bplist$/)
|
211
210
|
c.use(:cookie_jar, jar: @cookie)
|
212
211
|
c.use(FaradayMiddleware::RelsMiddleware)
|
@@ -50,6 +50,7 @@ require 'spaceship/connect_api/models/app_store_version_phased_release'
|
|
50
50
|
require 'spaceship/connect_api/models/app_store_version'
|
51
51
|
require 'spaceship/connect_api/models/idfa_declaration'
|
52
52
|
require 'spaceship/connect_api/models/reset_ratings_request'
|
53
|
+
require 'spaceship/connect_api/models/sandbox_tester'
|
53
54
|
require 'spaceship/connect_api/models/territory'
|
54
55
|
|
55
56
|
module Spaceship
|
@@ -28,7 +28,6 @@ module Spaceship
|
|
28
28
|
|
29
29
|
@client = Faraday.new(hostname, options) do |c|
|
30
30
|
c.response(:json, content_type: /\bjson$/)
|
31
|
-
c.response(:xml, content_type: /\bxml$/)
|
32
31
|
c.response(:plist, content_type: /\bplist$/)
|
33
32
|
c.use(FaradayMiddleware::RelsMiddleware)
|
34
33
|
c.adapter(Faraday.default_adapter)
|
@@ -78,7 +78,7 @@ module Spaceship
|
|
78
78
|
# App Info
|
79
79
|
#
|
80
80
|
|
81
|
-
def fetch_edit_app_info
|
81
|
+
def fetch_edit_app_info(includes: Spaceship::ConnectAPI::AppInfo::ESSENTIAL_INCLUDES)
|
82
82
|
states = [
|
83
83
|
Spaceship::ConnectAPI::AppInfo::AppStoreState::PREPARE_FOR_SUBMISSION,
|
84
84
|
Spaceship::ConnectAPI::AppInfo::AppStoreState::DEVELOPER_REJECTED,
|
@@ -89,7 +89,7 @@ module Spaceship
|
|
89
89
|
]
|
90
90
|
|
91
91
|
filter = { app: id }
|
92
|
-
resp = Spaceship::ConnectAPI.get_app_infos(filter: filter)
|
92
|
+
resp = Spaceship::ConnectAPI.get_app_infos(filter: filter, includes: includes)
|
93
93
|
return resp.to_models.select do |model|
|
94
94
|
states.include?(model.app_store_state)
|
95
95
|
end.first
|
@@ -110,7 +110,7 @@ module Spaceship
|
|
110
110
|
# App Store Versions
|
111
111
|
#
|
112
112
|
|
113
|
-
def reject_version_if_possible!
|
113
|
+
def reject_version_if_possible!(platform: nil)
|
114
114
|
platform ||= Spaceship::ConnectAPI::Platform::IOS
|
115
115
|
filter = {
|
116
116
|
appStoreState: [
|
@@ -9,6 +9,13 @@ module Spaceship
|
|
9
9
|
attr_accessor :brazil_age_rating
|
10
10
|
attr_accessor :kids_age_band
|
11
11
|
|
12
|
+
attr_accessor :primary_category
|
13
|
+
attr_accessor :primary_subcategory_one
|
14
|
+
attr_accessor :primary_subcategory_two
|
15
|
+
attr_accessor :secondary_category
|
16
|
+
attr_accessor :secondary_subcategory_one
|
17
|
+
attr_accessor :secondary_subcategory_two
|
18
|
+
|
12
19
|
module AppStoreState
|
13
20
|
READY_FOR_SALE = "READY_FOR_SALE"
|
14
21
|
PROCESSING_FOR_APP_STORE = "PROCESSING_FOR_APP_STORE"
|
@@ -30,9 +37,25 @@ module Spaceship
|
|
30
37
|
"appStoreState" => "app_store_state",
|
31
38
|
"appStoreAgeRating" => "app_store_age_rating",
|
32
39
|
"brazilAgeRating" => "brazil_age_rating",
|
33
|
-
"kidsAgeBand" => "kids_age_band"
|
40
|
+
"kidsAgeBand" => "kids_age_band",
|
41
|
+
|
42
|
+
"primaryCategory" => "primary_category",
|
43
|
+
"primarySubcategoryOne" => "primary_subcategory_one",
|
44
|
+
"primarySubcategoryTwo" => "primary_subcategory_two",
|
45
|
+
"secondaryCategory" => "secondary_category",
|
46
|
+
"secondarySubcategoryOne" => "secondary_subcategory_one",
|
47
|
+
"secondarySubcategoryTwo" => "secondary_subcategory_two"
|
34
48
|
})
|
35
49
|
|
50
|
+
ESSENTIAL_INCLUDES = [
|
51
|
+
"primaryCategory",
|
52
|
+
"primarySubcategoryOne",
|
53
|
+
"primarySubcategoryTwo",
|
54
|
+
"secondaryCategory",
|
55
|
+
"secondarySubcategoryOne",
|
56
|
+
"secondarySubcategoryTwo"
|
57
|
+
].join(",")
|
58
|
+
|
36
59
|
def self.type
|
37
60
|
return "appInfos"
|
38
61
|
end
|