Supports both iPhone + iPad screenshots

Prefers showing screenshots for current device, but falls back to all screenshots if there are no relevant ones.
This commit is contained in:
Riley Testut
2023-10-13 13:40:08 -05:00
parent 0c14de4474
commit cd67222237
13 changed files with 259 additions and 77 deletions

View File

@@ -199,6 +199,12 @@ private extension FetchSourceOperation
// Privacy permissions MUST have a usage description.
guard permission.usageDescription != nil else { throw SourceError.missingPermissionUsageDescription(for: permission.permission, app: app, source: source) }
}
for screenshot in app.screenshots(for: .ipad)
{
// All iPad screenshots MUST have an explicit size.
guard screenshot.size != nil else { throw SourceError.missingScreenshotSize(for: screenshot, source: source) }
}
}
if let previousSourceID = self.$source.identifier