@@ -13,7 +13,7 @@ Built for Swift 6.1+ with full concurrency safety.
1313## Requirements
1414
1515- Swift 6.1+
16- - iOS 17 +, macOS 14 +, tvOS 17 +, watchOS 10 +
16+ - iOS 15 +, macOS 12 +, tvOS 15 +, watchOS 8 +
1717
1818## Installation
1919
@@ -220,60 +220,6 @@ struct MyServer: URLServer {
220220}
221221```
222222
223- ## Migrating from 1.x to 2.0
224-
225- FTAPIKit 2.0 is a major rewrite focused on Swift Concurrency. Here are the breaking changes:
226-
227- ### Server Protocol Simplified
228-
229- The separate ` Server ` and ` URLServer ` protocols have been merged into a single ` URLServer ` protocol.
230- If you previously conformed to the abstract ` Server ` protocol directly, switch to ` URLServer ` .
231-
232- ### Completion Handlers & Combine Removed
233-
234- All API calls now use async/await exclusively:
235-
236- ``` swift
237- // Old (1.x)
238- server.call (response : endpoint) { result in ... }
239- server.publisher (response : endpoint).sink { ... }
240-
241- // New (2.0)
242- let response = try await server.call (response : endpoint)
243- ```
244-
245- ### buildRequest is Now Async
246-
247- If you override ` buildRequest ` , you must mark it as ` async ` :
248-
249- ``` swift
250- func buildRequest (endpoint : Endpoint) async throws -> URLRequest {
251- var request = try buildStandardRequest (endpoint : endpoint)
252- request.addValue (" Bearer \( token ) " , forHTTPHeaderField : " Authorization" )
253- return request
254- }
255- ```
256-
257- ### Response Types Must Be Sendable
258-
259- All ` ResponseEndpoint ` response types must conform to ` Sendable ` :
260-
261- ``` swift
262- struct User : Codable , Sendable {
263- let id: Int
264- let name: String
265- }
266- ```
267-
268- ### CocoaPods & Linux Removed
269-
270- FTAPIKit 2.0 is distributed exclusively via Swift Package Manager.
271- Linux support has been dropped.
272-
273- ### Minimum Platform Versions Raised
274-
275- - iOS 17+, macOS 14+, tvOS 17+, watchOS 10+
276-
277223## Contributors
278224
279225Current maintainer and main contributor is [ Matěj Kašpar Jirásek] ( https://github.com/mkj-is ) , <matej.jirasek@futured.app >.
0 commit comments