Swift Package Index


AirPlay SwiftUI Views


  • The latest stable release is 1.0.1. Released 5 months ago.
  • The last commit to main was 5 months ago.

Swift Version Compatibility

  • 1.0.1 and main
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 1.0.1 and main
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

AirKit

AirPlay SwiftUI Views

Add to App

  • File / Swift Packages / Add Package Dependecy
  • Search for AirKit by hexagons
  • Add Up to Next Major from 1.0.0

Example

import SwiftUI
import AirKit

struct ContentView: View {
    var body: some View {
        Text("Hello AirPlay")
            .airPlay()
    }
}

You can also Air a View that is not on the main screen:

Air.play(AnyView(Image(systemName: "airplayvideo")))

To listen to the connection call:

Air.connection { connected in
    let isAirPaying: Bool = connected
}

Add to Package

.package(url: "https://github.com/hexagons/AirKit.git", from: "1.0.0")