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

ToastifySwift 1.0.3

ToastifySwift 1.0.3

Maintained by Rajan Desai.



  • By
  • RJIOSDEV

ToastifySwift

Elegant SwiftUI library for customizable Toast Notifications and Custom Alerts
Works across iOS, macOS, watchOS, tvOS — and ready for the future (VisionOS, etc.)


ToastifySwift

Elegant SwiftUI library for customizable Toast Notifications and Custom Alerts
Works across iOS, macOS, watchOS, tvOS — and ready for the future (VisionOS, etc.)


📸 Demo

ToastifySwift Demo


✨ Features

  • ✅ Show toasts with message, icon, color, and auto-dismiss timer
  • ✅ Custom alerts with two buttons (e.g., Yes/No, Continue/Cancel)
  • ✅ Fully customizable appearance (colors, duration, background)
  • ✅ Designed for reusability — use in any SwiftUI project
  • ✅ Cross-platform ready (iOS, macOS, watchOS, tvOS)

📦 Installation (Swift Package Manager)

Add this URL to Xcode: https://github.com/RJIOSDEV/ToastifySwift

Or in Package.swift:

.package(url: "https://github.com/RJIOSDEV/ToastifySwift", from: "1.0.0")

##

## 🧑‍💻 Usage

### Show a Toast

```swift
@StateObject var toastManager = ToastManager()

.toastify(using: toastManager)

toastManager.show(toast: ToastModel(
    message: "Saved successfully!",
    icon: "checkmark.circle.fill",
    backgroundColor: .green,
    duration: 2.5
))



---

## 📚 Documentation

### ToastManager

A shared `ObservableObject` that triggers toast messages globally.

```swift
@StateObject var toastManager = ToastManager()