Saltar al contenido principal
El SDK de Swift de InsForge proporciona un cliente Swift nativo para interactuar con servicios de InsForge desde aplicaciones iOS, macOS, tvOS y watchOS.

Instalación

Swift Package Manager

Add InsForge to your Swift Package Manager dependencies:

Enable Logging (Optional)

For debugging, you can configure the SDK log level and destination:
Log Levels:
LevelDescription
.traceMost verbose, includes all internal details
.debugDetailed information for debugging
.infoGeneral operational information (default)
.warningWarnings that don’t prevent operation
.errorErrors that affect functionality
.criticalCritical failures
Log Destinations:
DestinationDescription
.consoleStandard output (print)
.osLogApple’s unified logging system (recommended for iOS/macOS)
.noneDisable logging
.customProvide your own LogHandler factory
Use .info or .error in production to avoid exposing sensitive data in logs.
O agréguelo a través de Xcode:
  1. File → Add Packages…
  2. Ingrese: https://github.com/insforge/insforge-swift.git

CocoaPods (próximamente)

Inicio rápido

Características

  • Base de datos - Operaciones CRUD de tipo seguro con soporte de Codable
  • Autenticación - Autenticación con correo electrónico/contraseña y OAuth
  • Almacenamiento - Carga, descarga y gestión de archivos
  • IA - Completaciones de chat y generación de imágenes
  • Tiempo real - Mensajería pub/sub basada en WebSocket
  • Integración de SwiftUI - Envolturas de propiedades y valores de entorno

Compatibilidad de plataformas

PlataformaVersión mínima
iOS15.0+
macOS12.0+
tvOS15.0+
watchOS8.0+

Referencia del SDK

Database

CRUD operations with Codable models

Authentication

Sign up, sign in, OAuth, and user management

Storage

File upload, download, and management

AI

Chat completions and image generation

Realtime

WebSocket pub/sub messaging