diff --git a/Sources/CoreBusiness/DataProvider/Server.swift b/Sources/CoreBusiness/DataProvider/Server.swift index ba95efa5e..ff7654926 100644 --- a/Sources/CoreBusiness/DataProvider/Server.swift +++ b/Sources/CoreBusiness/DataProvider/Server.swift @@ -26,15 +26,13 @@ public struct Server { private let baseUrl: URL private let queryItems: [URLQueryItem] - /// Creates a server with custom settings. + /// This API will be removed in a future Pillarbox release. Do not use. /// - /// - Parameters: - /// - baseUrl: The base URL of the server. - /// - queryItems: Additional query items to associate with each request. - /// - /// Useful for servers which can exactly pose as SRG SSR servers and deliver the same playback metadata format and - /// image scaling capabilities. + /// > Warning: This API will be removed in a future Pillarbox release. Do not use. public init(baseUrl: URL, queryItems: [URLQueryItem] = []) { + // FIXME: This initializer must be made private after SAM replaces the IL. The assertion must be removed at + // the same time. + assert(Bundle.main.allowsReservedInitializer, "This API will be removed in a future Pillarbox release. Do not use.") self.baseUrl = baseUrl self.queryItems = queryItems } @@ -71,3 +69,10 @@ public struct Server { } } } + +private extension Bundle { + var allowsReservedInitializer: Bool { + guard let bundleIdentifier = Bundle.main.bundleIdentifier else { return false } + return bundleIdentifier.hasPrefix("ch.srgssr.Pillarbox-demo") || bundleIdentifier.hasPrefix("com.apple.dt.xctest.tool") + } +} diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 41a7b30ad..fe1df8e03 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -25,9 +25,8 @@ DEVICES = { ICON_GLOBS = { ios: '/Demo/Resources/Assets.xcassets/AppIcon.appiconset/*.png', - tvos: \ - '/Demo/Resources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/*/Back.imagestacklayer' \ - '/Content.imageset/*.png' + tvos: '/Demo/Resources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/*/Back.imagestacklayer' \ + '/Content.imageset/*.png' }.freeze SHIELD_SCALES = {