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
committed by Magesh K
parent 57059967c6
commit a49e16f591
13 changed files with 258 additions and 76 deletions

View File

@@ -209,6 +209,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