File storage and image transformation SDK for iOS with upload, download, and on-the-fly image processing.
In Xcode:
- File → Add Package Dependencies
- Enter:
https://github.com/Rivium-co/rivium-storage-ios-sdk - Select version:
0.1.0 - Add
RiviumStoragelibrary to your target
Or in Package.swift:
dependencies: [
.package(url: "https://github.com/Rivium-co/rivium-storage-ios-sdk", from: "0.1.0"),
]pod 'RiviumStorage', '~> 0.1'Then run:
pod installimport 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)- 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
For full documentation, visit rivium.co/docs.
MIT License — see LICENSE for details.