fastlane 2.157.2 → 2.160.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +80 -80
- data/deliver/lib/deliver/options.rb +17 -1
- data/deliver/lib/deliver/runner.rb +36 -6
- data/deliver/lib/deliver/upload_metadata.rb +36 -6
- data/deliver/lib/deliver/upload_price_tier.rb +7 -2
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +12 -8
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +1 -0
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +1 -1
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +116 -71
- data/fastlane/lib/fastlane/actions/set_changelog.rb +2 -1
- data/fastlane/lib/fastlane/helper/git_helper.rb +2 -0
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +6 -4
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +1 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +2 -1
- data/fastlane/swift/Appfile.swift +2 -4
- data/fastlane/swift/ArgumentProcessor.swift +2 -6
- data/fastlane/swift/ControlCommand.swift +2 -5
- data/fastlane/swift/Deliverfile.swift +5 -2
- data/fastlane/swift/DeliverfileProtocol.swift +15 -4
- data/fastlane/swift/Fastfile.swift +5 -1
- data/fastlane/swift/Fastlane.swift +2279 -2237
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +5 -5
- data/fastlane/swift/Gymfile.swift +5 -2
- data/fastlane/swift/GymfileProtocol.swift +6 -3
- data/fastlane/swift/LaneFileProtocol.swift +36 -19
- data/fastlane/swift/MainProcess.swift +77 -0
- data/fastlane/swift/Matchfile.swift +5 -2
- data/fastlane/swift/MatchfileProtocol.swift +6 -3
- data/fastlane/swift/Plugins.swift +2 -1
- data/fastlane/swift/Precheckfile.swift +5 -2
- data/fastlane/swift/PrecheckfileProtocol.swift +18 -3
- data/fastlane/swift/RubyCommand.swift +2 -6
- data/fastlane/swift/RubyCommandable.swift +2 -6
- data/fastlane/swift/Runner.swift +5 -9
- data/fastlane/swift/RunnerArgument.swift +2 -6
- data/fastlane/swift/Scanfile.swift +5 -2
- data/fastlane/swift/ScanfileProtocol.swift +6 -3
- data/fastlane/swift/Screengrabfile.swift +5 -2
- data/fastlane/swift/ScreengrabfileProtocol.swift +6 -3
- data/fastlane/swift/Snapshotfile.swift +5 -2
- data/fastlane/swift/SnapshotfileProtocol.swift +6 -3
- data/fastlane/swift/SocketClient.swift +3 -7
- data/fastlane/swift/SocketClientDelegateProtocol.swift +2 -6
- data/fastlane/swift/SocketResponse.swift +2 -6
- data/fastlane/swift/formatting/Brewfile.lock.json +18 -10
- data/fastlane/swift/main.swift +4 -8
- data/fastlane/swift/upgrade_manifest.json +1 -1
- data/frameit/lib/frameit/editor.rb +1 -0
- data/match/lib/match/importer.rb +5 -2
- data/match/lib/match/spaceship_ensure.rb +5 -5
- data/pilot/lib/pilot/build_manager.rb +0 -3
- data/pilot/lib/pilot/manager.rb +1 -2
- data/pilot/lib/pilot/options.rb +2 -2
- data/precheck/lib/precheck/options.rb +25 -0
- data/precheck/lib/precheck/rule_processor.rb +94 -60
- data/precheck/lib/precheck/runner.rb +26 -5
- data/produce/lib/produce/itunes_connect.rb +2 -1
- data/sigh/lib/assets/resign.sh +9 -6
- data/sigh/lib/sigh/runner.rb +2 -1
- data/snapshot/lib/assets/SnapshotHelper.swift +17 -2
- data/spaceship/lib/spaceship/client.rb +1 -0
- data/spaceship/lib/spaceship/connect_api.rb +1 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +34 -7
- data/spaceship/lib/spaceship/connect_api/file_uploader.rb +2 -0
- data/spaceship/lib/spaceship/connect_api/models/.app_store_version_submission.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +22 -14
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +1 -0
- data/spaceship/lib/spaceship/connect_api/models/app_price_point.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +2 -2
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +10 -6
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +3 -5
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_phased_release.rb +21 -0
- data/spaceship/lib/spaceship/connect_api/spaceship.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +50 -50
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +31 -6
- metadata +21 -18
@@ -18,10 +18,24 @@ module Precheck
|
|
18
18
|
hide_keys: [:output_path],
|
19
19
|
title: "Summary for precheck #{Fastlane::VERSION}")
|
20
20
|
|
21
|
-
|
21
|
+
if api_token
|
22
|
+
|
23
|
+
# As of 2020-09-15, App Store Connect API does not have support for IAPs yet
|
24
|
+
# This means that API Key will fail if checking for IAPs.
|
25
|
+
#
|
26
|
+
# There is also a check in Deliver::Runner for this.
|
27
|
+
# Please remove check in Deliver when the API support IAPs.
|
28
|
+
if Precheck.config[:include_in_app_purchases]
|
29
|
+
UI.user_error!("Precheck cannot check In-app purchases with the App Store Connect API Key (yet). Exclude In-app purchases from precheck or use Apple ID login")
|
30
|
+
end
|
31
|
+
|
32
|
+
UI.message("Creating authorization token for App Store Connect API")
|
33
|
+
Spaceship::ConnectAPI.token = api_token
|
34
|
+
elsif Spaceship::Tunes.client.nil?
|
35
|
+
# Team selection passed though FASTLANE_ITC_TEAM_ID and FASTLANE_ITC_TEAM_NAME environment variables
|
36
|
+
# Prompts select team if multiple teams and none specified
|
22
37
|
UI.message("Starting login with user '#{Precheck.config[:username]}'")
|
23
|
-
Spaceship::
|
24
|
-
Spaceship::Tunes.select_team
|
38
|
+
Spaceship::ConnectAPI.login(Precheck.config[:username], use_portal: false, use_tunes: true)
|
25
39
|
|
26
40
|
UI.message("Successfully logged in")
|
27
41
|
end
|
@@ -57,6 +71,12 @@ module Precheck
|
|
57
71
|
return true
|
58
72
|
end
|
59
73
|
|
74
|
+
def api_token
|
75
|
+
@api_token ||= Spaceship::ConnectAPI::Token.create(Precheck.config[:api_key]) if Precheck.config[:api_key]
|
76
|
+
@api_token ||= Spaceship::ConnectAPI::Token.from_json_file(Precheck.config[:api_key_path]) if Precheck.config[:api_key_path]
|
77
|
+
return @api_token
|
78
|
+
end
|
79
|
+
|
60
80
|
def print_items_not_checked(processor_result: nil)
|
61
81
|
names = processor_result.items_not_checked.map(&:friendly_name)
|
62
82
|
UI.message("😶 Metadata fields not checked by any rule: #{names.join(', ')}".yellow) if names.length > 0
|
@@ -160,11 +180,12 @@ module Precheck
|
|
160
180
|
end
|
161
181
|
|
162
182
|
def app
|
163
|
-
Spaceship::
|
183
|
+
Spaceship::ConnectAPI::App.find(Precheck.config[:app_identifier])
|
164
184
|
end
|
165
185
|
|
166
186
|
def latest_app_version
|
167
|
-
|
187
|
+
platform = Spaceship::ConnectAPI::Platform.map(Precheck.config[:platform])
|
188
|
+
@latest_version ||= app.get_edit_app_store_version(platform: platform)
|
168
189
|
end
|
169
190
|
|
170
191
|
# Makes sure the current App ID exists. If not, it will show an appropriate error message
|
@@ -9,8 +9,9 @@ module Produce
|
|
9
9
|
@full_bundle_identifier = app_identifier
|
10
10
|
@full_bundle_identifier.gsub!('*', Produce.config[:bundle_identifier_suffix].to_s) if wildcard_bundle?
|
11
11
|
|
12
|
+
# Team selection passed though FASTLANE_ITC_TEAM_ID and FASTLANE_ITC_TEAM_NAME environment variables
|
13
|
+
# Prompts select team if multiple teams and none specified
|
12
14
|
Spaceship::ConnectAPI.login(Produce.config[:username], nil, use_portal: false, use_tunes: true)
|
13
|
-
Spaceship::ConnectAPI.client.select_team
|
14
15
|
|
15
16
|
create_new_app
|
16
17
|
end
|
data/sigh/lib/assets/resign.sh
CHANGED
@@ -72,6 +72,9 @@
|
|
72
72
|
# new features June 2020
|
73
73
|
# 1. enable (re)signing of OnDemandResources when ipa has been built for the appstore
|
74
74
|
#
|
75
|
+
# new features August 2020
|
76
|
+
# 1. fixes usage for users with GNU-sed in their $PATH
|
77
|
+
#
|
75
78
|
|
76
79
|
# Logging functions
|
77
80
|
|
@@ -762,7 +765,7 @@ function resign {
|
|
762
765
|
|
763
766
|
# Get the entry from app's entitlements
|
764
767
|
# Read it with PlistBuddy as XML, then strip the header and <plist></plist> part
|
765
|
-
ENTITLEMENTS_VALUE="$(PlistBuddy -x -c "Print $KEY" "$APP_ENTITLEMENTS" 2>/dev/null | sed -e 's,.*<plist[^>]*>\(.*\)</plist>,\1,g')"
|
768
|
+
ENTITLEMENTS_VALUE="$(PlistBuddy -x -c "Print $KEY" "$APP_ENTITLEMENTS" 2>/dev/null | /usr/bin/sed -e 's,.*<plist[^>]*>\(.*\)</plist>,\1,g')"
|
766
769
|
if [[ -z "$ENTITLEMENTS_VALUE" ]]; then
|
767
770
|
log "No value for '$KEY'"
|
768
771
|
continue
|
@@ -780,7 +783,7 @@ function resign {
|
|
780
783
|
log "Certificate $CERTIFICATE matches a SHA1 pattern"
|
781
784
|
local certificate_matches="$( security find-identity -v -p codesigning | grep -m 1 "$CERTIFICATE" )"
|
782
785
|
if [ -n "$certificate_matches" ]; then
|
783
|
-
certificate_name="$(
|
786
|
+
certificate_name="$(/usr/bin/sed -E s/[^\"]+\"\([^\"]+\)\".*/\\1/ <<< $certificate_matches )"
|
784
787
|
log "Certificate name: $certificate_name"
|
785
788
|
fi
|
786
789
|
fi
|
@@ -807,18 +810,18 @@ function resign {
|
|
807
810
|
# otherwise it interprets they key path as nested keys
|
808
811
|
# TODO: Should be able to replace with echo ${KEY//\./\\\\.} and remove shellcheck disable directive
|
809
812
|
# shellcheck disable=SC2001
|
810
|
-
PLUTIL_KEY=$(echo "$KEY" | sed 's/\./\\\./g')
|
813
|
+
PLUTIL_KEY=$(echo "$KEY" | /usr/bin/sed 's/\./\\\./g')
|
811
814
|
plutil -insert "$PLUTIL_KEY" -xml "$ENTITLEMENTS_VALUE" "$PATCHED_ENTITLEMENTS"
|
812
815
|
|
813
816
|
# Patch the ID value if specified
|
814
817
|
if [[ "$ID_TYPE" == "APP_ID" ]]; then
|
815
818
|
# Replace old value with new value in patched entitlements
|
816
819
|
log "Replacing old app identifier prefix '$OLD_APP_ID' with new value '$NEW_APP_ID'"
|
817
|
-
sed -i .bak "s/$OLD_APP_ID/$NEW_APP_ID/g" "$PATCHED_ENTITLEMENTS"
|
820
|
+
/usr/bin/sed -i .bak "s/$OLD_APP_ID/$NEW_APP_ID/g" "$PATCHED_ENTITLEMENTS"
|
818
821
|
elif [[ "$ID_TYPE" == "TEAM_ID" ]]; then
|
819
822
|
# Replace old team identifier with new value
|
820
823
|
log "Replacing old team ID '$OLD_TEAM_ID' with new team ID: '$NEW_TEAM_ID'"
|
821
|
-
sed -i .bak "s/$OLD_TEAM_ID/$NEW_TEAM_ID/g" "$PATCHED_ENTITLEMENTS"
|
824
|
+
/usr/bin/sed -i .bak "s/$OLD_TEAM_ID/$NEW_TEAM_ID/g" "$PATCHED_ENTITLEMENTS"
|
822
825
|
else
|
823
826
|
continue
|
824
827
|
fi
|
@@ -835,7 +838,7 @@ function resign {
|
|
835
838
|
# e.g. <string>AB1GP98Q19.com.example.foo</string>
|
836
839
|
# vs
|
837
840
|
# com.example.foo
|
838
|
-
sed -i .bak "s!${OLD_BUNDLE_ID}</string>!${NEW_BUNDLE_ID}</string>!g" "$PATCHED_ENTITLEMENTS"
|
841
|
+
/usr/bin/sed -i .bak "s!${OLD_BUNDLE_ID}</string>!${NEW_BUNDLE_ID}</string>!g" "$PATCHED_ENTITLEMENTS"
|
839
842
|
|
840
843
|
log "Resigning application using certificate: '$CERTIFICATE'"
|
841
844
|
log "and patched entitlements:"
|
data/sigh/lib/sigh/runner.rb
CHANGED
@@ -17,9 +17,10 @@ module Sigh
|
|
17
17
|
hide_keys: [:output_path],
|
18
18
|
title: "Summary for sigh #{Fastlane::VERSION}")
|
19
19
|
|
20
|
+
# Team selection passed though FASTLANE_ITC_TEAM_ID and FASTLANE_ITC_TEAM_NAME environment variables
|
21
|
+
# Prompts select team if multiple teams and none specified
|
20
22
|
UI.message("Starting login with user '#{Sigh.config[:username]}'")
|
21
23
|
Spaceship::ConnectAPI.login(Sigh.config[:username], nil, use_portal: true, use_tunes: false)
|
22
|
-
Spaceship::ConnectAPI.select_team
|
23
24
|
UI.message("Successfully logged in")
|
24
25
|
|
25
26
|
profiles = [] if Sigh.config[:skip_fetch_profiles]
|
@@ -165,6 +165,8 @@ open class Snapshot: NSObject {
|
|
165
165
|
}
|
166
166
|
|
167
167
|
let screenshot = XCUIScreen.main.screenshot()
|
168
|
+
let image = XCUIDevice.shared.orientation.isLandscape ? fixLandscapeOrientation(image: screenshot.image) : screenshot.image
|
169
|
+
|
168
170
|
guard var simulator = ProcessInfo().environment["SIMULATOR_DEVICE_NAME"], let screenshotsDir = screenshotsDirectory else { return }
|
169
171
|
|
170
172
|
do {
|
@@ -174,7 +176,7 @@ open class Snapshot: NSObject {
|
|
174
176
|
simulator = regex.stringByReplacingMatches(in: simulator, range: range, withTemplate: "")
|
175
177
|
|
176
178
|
let path = screenshotsDir.appendingPathComponent("\(simulator)-\(name).png")
|
177
|
-
try
|
179
|
+
try image.pngData()?.write(to: path, options: .atomic)
|
178
180
|
} catch let error {
|
179
181
|
NSLog("Problem writing screenshot: \(name) to \(screenshotsDir)/\(simulator)-\(name).png")
|
180
182
|
NSLog(error.localizedDescription)
|
@@ -182,6 +184,19 @@ open class Snapshot: NSObject {
|
|
182
184
|
#endif
|
183
185
|
}
|
184
186
|
|
187
|
+
class func fixLandscapeOrientation(image: UIImage) -> UIImage {
|
188
|
+
if #available(iOS 10.0, *) {
|
189
|
+
let format = UIGraphicsImageRendererFormat()
|
190
|
+
format.scale = image.scale
|
191
|
+
let renderer = UIGraphicsImageRenderer(size: image.size, format: format)
|
192
|
+
return renderer.image { context in
|
193
|
+
image.draw(in: CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height))
|
194
|
+
}
|
195
|
+
} else {
|
196
|
+
return image
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
185
200
|
class func waitForLoadingIndicatorToDisappear(within timeout: TimeInterval) {
|
186
201
|
#if os(tvOS)
|
187
202
|
return
|
@@ -279,4 +294,4 @@ private extension CGFloat {
|
|
279
294
|
|
280
295
|
// Please don't remove the lines below
|
281
296
|
// They are used to detect outdated configuration files
|
282
|
-
// SnapshotHelperVersion [1.
|
297
|
+
// SnapshotHelperVersion [1.24]
|
@@ -39,6 +39,7 @@ require 'spaceship/connect_api/models/app_info_localization'
|
|
39
39
|
require 'spaceship/connect_api/models/app_preview_set'
|
40
40
|
require 'spaceship/connect_api/models/app_preview'
|
41
41
|
require 'spaceship/connect_api/models/app_price'
|
42
|
+
require 'spaceship/connect_api/models/app_price_point'
|
42
43
|
require 'spaceship/connect_api/models/app_price_tier'
|
43
44
|
require 'spaceship/connect_api/models/app_store_review_attachment'
|
44
45
|
require 'spaceship/connect_api/models/app_store_review_detail'
|
@@ -43,20 +43,27 @@ module Spaceship
|
|
43
43
|
# @param portal_team_id (String) (optional): The Spaceship::Portal team id
|
44
44
|
# @param tunes_team_id (String) (optional): The Spaceship::Tunes team id
|
45
45
|
# @param team_name (String) (optional): The team name
|
46
|
+
# @param skip_select_team (Boolean) (optional): Whether to skip automatic selection or prompt for team
|
46
47
|
#
|
47
48
|
# @raise InvalidUserCredentialsError: raised if authentication failed
|
48
49
|
#
|
49
50
|
# @return (Spaceship::ConnectAPI::Client) The client the login method was called for
|
50
|
-
def self.login(user = nil, password = nil, use_portal: true, use_tunes: true, portal_team_id: nil, tunes_team_id: nil, team_name: nil)
|
51
|
+
def self.login(user = nil, password = nil, use_portal: true, use_tunes: true, portal_team_id: nil, tunes_team_id: nil, team_name: nil, skip_select_team: false)
|
51
52
|
portal_client = Spaceship::Portal.login(user, password) if use_portal
|
52
53
|
tunes_client = Spaceship::Tunes.login(user, password) if use_tunes
|
53
54
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
55
|
+
unless skip_select_team
|
56
|
+
# Check if environment variables are set for Spaceship::Portal or Spaceship::Tunes to select team
|
57
|
+
portal_team_id ||= ENV['FASTLANE_TEAM_ID']
|
58
|
+
portal_team_name = team_name || ENV['FASTLANE_TEAM_NAME']
|
59
|
+
tunes_team_id ||= ENV['FASTLANE_ITC_TEAM_ID']
|
60
|
+
tunes_team_name = team_name || ENV['FASTLANE_ITC_TEAM_NAME']
|
61
|
+
|
62
|
+
# The clients will prompt for a team selection if:
|
63
|
+
# 1. client exists
|
64
|
+
# 2. team_id and team_name are nil and user belongs to multiple teams
|
65
|
+
portal_client.select_team(team_id: portal_team_id, team_name: portal_team_name) if portal_client
|
66
|
+
tunes_client.select_team(team_id: tunes_team_id, team_name: tunes_team_name) if tunes_client
|
60
67
|
end
|
61
68
|
|
62
69
|
return ConnectAPI::Client.new(tunes_client: tunes_client, portal_client: portal_client)
|
@@ -89,6 +96,26 @@ module Spaceship
|
|
89
96
|
)
|
90
97
|
end
|
91
98
|
|
99
|
+
def portal_team_id
|
100
|
+
return nil if @portal_client.nil?
|
101
|
+
return @portal_client.team_id
|
102
|
+
end
|
103
|
+
|
104
|
+
def tunes_team_id
|
105
|
+
return nil if @tunes_client.nil?
|
106
|
+
return @tunes_client.team_id
|
107
|
+
end
|
108
|
+
|
109
|
+
def portal_teams
|
110
|
+
return nil if @portal_client.nil?
|
111
|
+
return @portal_client.teams
|
112
|
+
end
|
113
|
+
|
114
|
+
def tunes_teams
|
115
|
+
return nil if @tunes_client.nil?
|
116
|
+
return @tunes_client.teams
|
117
|
+
end
|
118
|
+
|
92
119
|
def in_house?
|
93
120
|
if token
|
94
121
|
if token.in_house.nil?
|
Binary file
|
@@ -16,6 +16,7 @@ module Spaceship
|
|
16
16
|
attr_accessor :available_in_new_territories
|
17
17
|
attr_accessor :content_rights_declaration
|
18
18
|
attr_accessor :app_store_versions
|
19
|
+
attr_accessor :prices
|
19
20
|
|
20
21
|
module ContentRightsDeclaration
|
21
22
|
USES_THIRD_PARTY_CONTENT = "USES_THIRD_PARTY_CONTENT"
|
@@ -34,9 +35,15 @@ module Spaceship
|
|
34
35
|
|
35
36
|
"contentRightsDeclaration" => "content_rights_declaration",
|
36
37
|
|
37
|
-
"appStoreVersions" => "app_store_versions"
|
38
|
+
"appStoreVersions" => "app_store_versions",
|
39
|
+
"prices" => "prices"
|
38
40
|
})
|
39
41
|
|
42
|
+
ESSENTIAL_INCLUDES = [
|
43
|
+
"appStoreVersions",
|
44
|
+
"prices"
|
45
|
+
].join(",")
|
46
|
+
|
40
47
|
def self.type
|
41
48
|
return "apps"
|
42
49
|
end
|
@@ -45,7 +52,7 @@ module Spaceship
|
|
45
52
|
# Apps
|
46
53
|
#
|
47
54
|
|
48
|
-
def self.all(filter: {}, includes:
|
55
|
+
def self.all(filter: {}, includes: ESSENTIAL_INCLUDES, limit: nil, sort: nil)
|
49
56
|
resps = Spaceship::ConnectAPI.get_apps(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
|
50
57
|
return resps.flat_map(&:to_models)
|
51
58
|
end
|
@@ -84,13 +91,13 @@ module Spaceship
|
|
84
91
|
def fetch_live_app_info(includes: Spaceship::ConnectAPI::AppInfo::ESSENTIAL_INCLUDES)
|
85
92
|
states = [
|
86
93
|
Spaceship::ConnectAPI::AppInfo::AppStoreState::READY_FOR_SALE,
|
94
|
+
Spaceship::ConnectAPI::AppInfo::AppStoreState::PENDING_APPLE_RELEASE,
|
87
95
|
Spaceship::ConnectAPI::AppInfo::AppStoreState::PENDING_DEVELOPER_RELEASE,
|
88
96
|
Spaceship::ConnectAPI::AppInfo::AppStoreState::PROCESSING_FOR_APP_STORE,
|
89
97
|
Spaceship::ConnectAPI::AppInfo::AppStoreState::IN_REVIEW
|
90
98
|
]
|
91
99
|
|
92
|
-
|
93
|
-
resp = Spaceship::ConnectAPI.get_app_infos(filter: filter, includes: includes)
|
100
|
+
resp = Spaceship::ConnectAPI.get_app_infos(app_id: id, includes: includes)
|
94
101
|
return resp.to_models.select do |model|
|
95
102
|
states.include?(model.app_store_state)
|
96
103
|
end.first
|
@@ -106,8 +113,7 @@ module Spaceship
|
|
106
113
|
Spaceship::ConnectAPI::AppInfo::AppStoreState::INVALID_BINARY
|
107
114
|
]
|
108
115
|
|
109
|
-
|
110
|
-
resp = Spaceship::ConnectAPI.get_app_infos(filter: filter, includes: includes)
|
116
|
+
resp = Spaceship::ConnectAPI.get_app_infos(app_id: id, includes: includes)
|
111
117
|
return resp.to_models.select do |model|
|
112
118
|
states.include?(model.app_store_state)
|
113
119
|
end.first
|
@@ -128,8 +134,6 @@ module Spaceship
|
|
128
134
|
#
|
129
135
|
|
130
136
|
def fetch_app_prices(filter: {}, includes: "priceTier", limit: nil, sort: nil)
|
131
|
-
filter ||= {}
|
132
|
-
filter[:app] = id
|
133
137
|
resp = Spaceship::ConnectAPI.get_app_prices(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort)
|
134
138
|
return resp.to_models
|
135
139
|
end
|
@@ -142,6 +146,7 @@ module Spaceship
|
|
142
146
|
platform ||= Spaceship::ConnectAPI::Platform::IOS
|
143
147
|
filter = {
|
144
148
|
appStoreState: [
|
149
|
+
Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::PENDING_APPLE_RELEASE,
|
145
150
|
Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::PENDING_DEVELOPER_RELEASE,
|
146
151
|
Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::IN_REVIEW,
|
147
152
|
Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::WAITING_FOR_REVIEW
|
@@ -192,7 +197,7 @@ module Spaceship
|
|
192
197
|
.last
|
193
198
|
end
|
194
199
|
|
195
|
-
def get_live_app_store_version(platform: nil, includes:
|
200
|
+
def get_live_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
|
196
201
|
platform ||= Spaceship::ConnectAPI::Platform::IOS
|
197
202
|
filter = {
|
198
203
|
appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::READY_FOR_SALE,
|
@@ -201,7 +206,7 @@ module Spaceship
|
|
201
206
|
return get_app_store_versions(filter: filter, includes: includes).first
|
202
207
|
end
|
203
208
|
|
204
|
-
def get_edit_app_store_version(platform: nil, includes:
|
209
|
+
def get_edit_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
|
205
210
|
platform ||= Spaceship::ConnectAPI::Platform::IOS
|
206
211
|
filter = {
|
207
212
|
appStoreState: [
|
@@ -221,7 +226,7 @@ module Spaceship
|
|
221
226
|
.last
|
222
227
|
end
|
223
228
|
|
224
|
-
def get_in_review_app_store_version(platform: nil, includes:
|
229
|
+
def get_in_review_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
|
225
230
|
platform ||= Spaceship::ConnectAPI::Platform::IOS
|
226
231
|
filter = {
|
227
232
|
appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::IN_REVIEW,
|
@@ -230,16 +235,19 @@ module Spaceship
|
|
230
235
|
return get_app_store_versions(filter: filter, includes: includes).first
|
231
236
|
end
|
232
237
|
|
233
|
-
def get_pending_release_app_store_version(platform: nil, includes:
|
238
|
+
def get_pending_release_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
|
234
239
|
platform ||= Spaceship::ConnectAPI::Platform::IOS
|
235
240
|
filter = {
|
236
|
-
appStoreState:
|
241
|
+
appStoreState: [
|
242
|
+
Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::PENDING_APPLE_RELEASE,
|
243
|
+
Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::PENDING_DEVELOPER_RELEASE
|
244
|
+
].join(','),
|
237
245
|
platform: platform
|
238
246
|
}
|
239
247
|
return get_app_store_versions(filter: filter, includes: includes).first
|
240
248
|
end
|
241
249
|
|
242
|
-
def get_app_store_versions(filter: {}, includes:
|
250
|
+
def get_app_store_versions(filter: {}, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES, limit: nil, sort: nil)
|
243
251
|
resps = Spaceship::ConnectAPI.get_app_store_versions(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort).all_pages
|
244
252
|
return resps.flat_map(&:to_models)
|
245
253
|
end
|
@@ -20,6 +20,7 @@ module Spaceship
|
|
20
20
|
READY_FOR_SALE = "READY_FOR_SALE"
|
21
21
|
PROCESSING_FOR_APP_STORE = "PROCESSING_FOR_APP_STORE"
|
22
22
|
PENDING_DEVELOPER_RELEASE = "PENDING_DEVELOPER_RELEASE"
|
23
|
+
PENDING_APPLE_RELEASE = "PENDING_APPLE_RELEASE"
|
23
24
|
IN_REVIEW = "IN_REVIEW"
|
24
25
|
WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
|
25
26
|
DEVELOPER_REJECTED = "DEVELOPER_REJECTED"
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppPricePoint
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :customer_price
|
8
|
+
|
9
|
+
attr_accessor :proceeds
|
10
|
+
|
11
|
+
attr_accessor :price_tier
|
12
|
+
attr_accessor :territory
|
13
|
+
|
14
|
+
attr_mapping({
|
15
|
+
"customerPrice" => "customer_price",
|
16
|
+
"proceeds" => "proceeds",
|
17
|
+
"priceTier" => "price_tier",
|
18
|
+
"territory" => "territory"
|
19
|
+
})
|
20
|
+
|
21
|
+
def self.type
|
22
|
+
return "appPricePoints"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -112,8 +112,8 @@ module Spaceship
|
|
112
112
|
# API
|
113
113
|
#
|
114
114
|
|
115
|
-
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
116
|
-
resp = Spaceship::ConnectAPI.get_app_screenshot_sets(filter: filter, includes: includes, limit: limit, sort: sort)
|
115
|
+
def self.all(app_store_version_localization_id: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
116
|
+
resp = Spaceship::ConnectAPI.get_app_screenshot_sets(app_store_version_localization_id: app_store_version_localization_id, filter: filter, includes: includes, limit: limit, sort: sort)
|
117
117
|
return resp.to_models
|
118
118
|
end
|
119
119
|
|
@@ -26,6 +26,7 @@ module Spaceship
|
|
26
26
|
READY_FOR_SALE = "READY_FOR_SALE"
|
27
27
|
PROCESSING_FOR_APP_STORE = "PROCESSING_FOR_APP_STORE"
|
28
28
|
PENDING_DEVELOPER_RELEASE = "PENDING_DEVELOPER_RELEASE"
|
29
|
+
PENDING_APPLE_RELEASE = "PENDING_APPLE_RELEASE"
|
29
30
|
IN_REVIEW = "IN_REVIEW"
|
30
31
|
WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
|
31
32
|
DEVELOPER_REJECTED = "DEVELOPER_REJECTED"
|
@@ -55,9 +56,15 @@ module Spaceship
|
|
55
56
|
"downloadable" => "downloadable",
|
56
57
|
"createdDate" => "created_date",
|
57
58
|
|
58
|
-
"appStoreVersionSubmission" => "app_store_version_submission"
|
59
|
+
"appStoreVersionSubmission" => "app_store_version_submission",
|
60
|
+
"build" => "build"
|
59
61
|
})
|
60
62
|
|
63
|
+
ESSENTIAL_INCLUDES = [
|
64
|
+
"appStoreVersionSubmission",
|
65
|
+
"build"
|
66
|
+
].join(",")
|
67
|
+
|
61
68
|
def self.type
|
62
69
|
return "appStoreVersions"
|
63
70
|
end
|
@@ -108,11 +115,8 @@ module Spaceship
|
|
108
115
|
return resp.to_models.first
|
109
116
|
end
|
110
117
|
|
111
|
-
|
112
|
-
|
113
|
-
filter ||= {}
|
114
|
-
filter["appStoreVersion"] = id
|
115
|
-
return Spaceship::ConnectAPI::AppStoreVersionLocalization.all(filter: filter, includes: includes, limit: limit, sort: sort)
|
118
|
+
def get_app_store_version_localizations(filter: {}, includes: nil, limit: nil, sort: nil)
|
119
|
+
return Spaceship::ConnectAPI::AppStoreVersionLocalization.all(app_store_version_id: id, filter: filter, includes: includes, limit: limit, sort: sort)
|
116
120
|
end
|
117
121
|
|
118
122
|
#
|