Skip to content

Commit f97458e

Browse files
committed
update + tvos
1 parent 1d11374 commit f97458e

13 files changed

+13
-13
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SwiftUI view that asynchronously loads and displays an OpenAI image from open AP
66
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FThe-Igor%2Fopenai-async-image-swiftui%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/The-Igor/openai-async-image-swiftui)
77

88
## Features
9-
- [x] Multiplatform iOS, macOS and watchOS
9+
- [x] Multiplatform iOS, macOS, watchOS and tvOS
1010
- [x] Customizable in term of SwiftUI Image specs [renderingMode, resizable, antialiased...]
1111
- [x] Customizable in term of the transport layer [Loader]
1212
- [x] Based on interfaces not implementations

Sources/openai-async-image-swiftui/OpenAIAsyncImage.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import SwiftUI
1010
fileprivate typealias ImageSize = OpenAIImageSize
1111

1212
/// Async image component to load and show OpenAI image from OpenAI image API
13-
@available(iOS 15.0, macOS 12.0, *)
13+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1414
public struct OpenAIAsyncImage<Content: View, T: IOpenAILoader>: View {
1515

1616
/// Custom view builder tpl

Sources/openai-async-image-swiftui/enum/AsyncImageErrors.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// Set of errors for ``OpenAIAsyncImage``
11-
@available(iOS 15.0, macOS 12.0, *)
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1212
enum AsyncImageErrors: Error, Equatable{
1313

1414
/// Could not create Image from uiImage

Sources/openai-async-image-swiftui/enum/ImageState.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import SwiftUI
99

1010
/// Set of states for ``OpenAIAsyncImage``
11-
@available(iOS 15.0, macOS 12.0, *)
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1212
public enum ImageState{
1313

1414
/// Loading currently

Sources/openai-async-image-swiftui/enum/OpenAIImageSize.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024
11-
@available(iOS 15.0, macOS 12.0, *)
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1212
public enum OpenAIImageSize: String, Encodable{
1313

1414
case dpi256 = "256x256"

Sources/openai-async-image-swiftui/enum/ResponseFormat.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// Type of response format from OpenAI API
11-
@available(iOS 15.0, macOS 12.0, *)
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1212
enum ResponseFormat: String,Encodable{
1313

1414
case url = "url"

Sources/openai-async-image-swiftui/environmentKey/OpenAIAsyncImageLoaderKey.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import SwiftUI
99

1010
/// A key for accessing default loader in the environment
11-
@available(iOS 15.0, macOS 12.0, *)
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1212
public struct OpenAIDefaultLoaderKey : EnvironmentKey{
1313
public typealias Value = OpenAIDefaultLoader
1414

Sources/openai-async-image-swiftui/model/Input.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Foundation
99

1010

1111
/// Input format to OpenAI API
12-
@available(iOS 15.0, macOS 12.0, *)
12+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1313
struct Input: Encodable{
1414

1515
/// A text description of the desired image(s). The maximum length is 1000 characters

Sources/openai-async-image-swiftui/model/Output.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// Output format for OpenAI API
11-
@available(iOS 15.0, macOS 12.0, *)
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1212
struct Output: Decodable{
1313

1414
/// Date and time

Sources/openai-async-image-swiftui/net/OpenAIImageEndpoint.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// Set of specs for access to OpenAPI image resource
11-
@available(iOS 15.0, macOS 12.0, *)
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1212
public struct OpenAIImageEndpoint: IOpenAIImageEndpoint{
1313

1414
// MARK: - Static

Sources/openai-async-image-swiftui/protocol/IOpenAIImageEndpoint.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// Defines access API to OpenAI image API
11-
@available(iOS 15.0, macOS 12.0, *)
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1212
public protocol IOpenAIImageEndpoint{
1313

1414
/// Base url to OpenAPI image resource

Sources/openai-async-image-swiftui/protocol/IOpenAILoader.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import SwiftUI
99

1010
/// Loader for getting images
11-
@available(iOS 15.0, macOS 12.0, *)
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1212
public protocol IOpenAILoader{
1313

1414
/// Load image by text

Sources/openai-async-image-swiftui/viewModel/OpenAIDefaultLoader.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import UIKit.UIImage
1616
import AppKit.NSImage
1717
#endif
1818

19-
@available(iOS 15.0, macOS 12.0, *)
19+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
2020
public final class OpenAIDefaultLoader : IOpenAILoader{
2121

2222
/// Http async client

0 commit comments

Comments
 (0)