Skip to content

Releases: convenience-init/Blend

Blend v1.0.0 Release Notes

12 Sep 23:20

Choose a tag to compare

Initial Release

I'm excited to announce the first stable release of Blend, a powerful Swift 6 networking library designed for modern iOS and macOS development. Blend brings together robust networking capabilities, comprehensive image handling, and deep SwiftUI integration in a type-safe, protocol-oriented architecture.

Major Features

SwiftUI-First Design

  • Native reactive components and view modifiers built specifically for SwiftUI
  • AsyncImageModel for observable image loading states
  • BlendImageView component with built-in upload capabilities
  • Seamless integration with SwiftUI's data flow patterns

Protocol-Oriented Architecture

  • AsyncRequestable: Foundation protocol for basic networking with single response types
  • AdvancedAsyncRequestable: Extended protocol supporting master-detail patterns and CRUD operations with dual response types
  • Type-safe service composition with associated types
  • Flexible endpoint definitions with comprehensive configuration options

Complete Image Solution

  • Actor-isolated ImageService for thread-safe image operations
  • Download, upload, and intelligent LRU caching
  • Cross-platform image support (PlatformImage typealias)
  • Multipart and Base64 upload options with progress tracking
  • Platform-specific extensions for consistent APIs

Modern Swift Concurrency

  • Full Swift 6 strict concurrency compliance
  • Async/await throughout the API surface
  • Actor isolation for shared state management
  • Sendable conformance for data types

Cross-Platform Support

  • iOS 18.0+ and macOS 15.0+ (minimum requirements)
  • Platform abstraction with conditional compilation
  • Unified APIs across Apple platforms

Comprehensive Error Handling

  • Centralized NetworkError enum with specific error cases
  • HTTP status code handling, decoding errors, network failures
  • Image processing and upload error scenarios
  • Localized error messages and recovery suggestions

Developer Experience

  • Extensive documentation and API reference
  • Comprehensive example projects for all major features
  • Swift Package Manager integration
  • Xcode 16.0+ compatibility

What's Included

Core Networking

  • Flexible endpoint protocol with timeout, headers, and query parameter support
  • Automatic JSON encoding/decoding
  • Request deduplication and retry logic
  • Background session support for large transfers

Image Operations

  • Intelligent caching with configurable limits
  • Progress callbacks for uploads
  • Compression quality controls
  • Cache management APIs

SwiftUI Integration

  • Async image loading view modifiers
  • Upload progress indicators
  • Error state handling in UI
  • Reactive state management

Examples & Documentation

  • Basic networking walkthrough
  • Advanced patterns (master-detail, CRUD)
  • Image operations complete guide
  • SwiftUI integration examples
  • Error handling patterns

Requirements

  • Swift: 6.0+
  • iOS: 18.0+ (includes iPadOS 18.0+)
  • macOS: 15.0+
  • Xcode: 16.0+

Installation

Add Blend to your project using Swift Package Manager:

dependencies: [
    .package(url: "https://github.com/convenience-init/Blend", from: "1.0.0")
]

🚀 Quick Start

import Blend

// Basic networking
class UserService: AsyncRequestable {
    typealias ResponseModel = [User]
    
    func getUsers() async throws -> [User] {
        return try await sendRequest(to: UsersEndpoint())
    }
}

// Advanced networking with multiple response types
class ProductService: AdvancedAsyncRequestable {
    typealias ResponseModel = [ProductSummary]
    typealias SecondaryResponseModel = ProductDetails
    
    func getProducts() async throws -> [ProductSummary] {
        return try await fetchList(from: ProductsEndpoint())
    }
    
    func getProduct(id: String) async throws -> ProductDetails {
        return try await fetchDetails(from: ProductDetailsEndpoint(id: id))
    }
}

// Image operations
let imageService = ImageService()
let imageData = try await imageService.fetchImageData(from: "https://example.com/image.jpg")

Migration Guide

As this is the initial release, there are no migration steps required. Blend is designed to be adopted incrementally in existing projects.

Known Issues

  • Some platform-specific image operations require manual platform checks

Acknowledgments

Special thanks to the Swift community for the inspiration and the Apple platforms team for the networking foundations that make libraries like Blend possible.


Blend v1.0.0 represents a solid foundation for modern Swift networking. We're committed to maintaining backward compatibility and adding new features based on community feedback.

For questions, issues, or contributions, please visit our GitHub repository.