CocoaPods trunk is moving to be read-only. Read more on the blog, there are 8 months to go.

RiviumStorage 0.1.0

RiviumStorage 0.1.0

Maintained by Rivium.



  • By
  • Rivium

Rivium

Rivium Storage iOS SDK

File storage and image transformation SDK for iOS with upload, download, and on-the-fly image processing.

Swift 5.5+ iOS 11.0+ SPM Compatible MIT License


Installation

Swift Package Manager

In Xcode:

  1. File → Add Package Dependencies
  2. Enter: https://github.com/Rivium-co/rivium-storage-ios-sdk
  3. Select version: 0.1.0
  4. Add RiviumStorage library to your target

Or in Package.swift:

dependencies: [
    .package(url: "https://github.com/Rivium-co/rivium-storage-ios-sdk", from: "0.1.0"),
]

CocoaPods

pod 'RiviumStorage', '~> 0.1'

Then run:

pod install

Quick Start

import RiviumStorage

// Initialize
let storage = RiviumStorage(apiKey: "YOUR_API_KEY")

// Upload a file
let file = try await storage.upload(
    bucketId: "my-bucket-id",
    path: "images/photo.jpg",
    data: imageData,
    options: UploadOptions(contentType: "image/jpeg")
)
print("Uploaded: \(file.url ?? file.id)")

// Download a file
let data = try await storage.download(fileId: file.id)

// Generate a transform URL (200x200 WebP thumbnail)
let url = storage.getTransformUrl(
    fileId: file.id,
    transforms: ImageTransforms(width: 200, height: 200, format: "webp")
)

// Delete a file
try await storage.delete(fileId: file.id)

Features

  • File Upload & Download — Upload files with metadata, download by ID
  • Bucket Management — List, get by ID or name
  • URL Generation — Public URLs, download URLs, and transform URLs
  • Image Transformations — Resize, crop, format conversion, blur, sharpen, rotate
  • Policy Enforcement — User-scoped access control via userId
  • Dual API — Completion handlers (iOS 11+) and async/await (iOS 13+)
  • No Dependencies — Pure Foundation, zero third-party libraries

Documentation

For full documentation, visit rivium.co/docs.

License

MIT License — see LICENSE for details.