Throws error when adding marketplace source to non-marketplace AltStore (and vice versa)

This commit is contained in:
Riley Testut
2024-02-15 15:34:28 -06:00
committed by Magesh K
parent 6ee90f6c2a
commit 2899e3ea5f
4 changed files with 36 additions and 0 deletions

View File

@@ -226,6 +226,12 @@ private extension FetchSourceOperation
// All iPad screenshots MUST have an explicit size.
guard screenshot.size != nil else { throw SourceError.missingScreenshotSize(for: screenshot, source: source) }
}
#if MARKETPLACE
guard app.marketplaceID != nil else { throw SourceError.marketplaceAppsRequired(source: source) }
#else
guard app.marketplaceID == nil else { throw SourceError.marketplaceAppsNotSupported(source: source) }
#endif
}
if let previousSourceID = self.$source.identifier