SwiftPlaygroundAPI

public protocol SwiftPlaygroundAPI

Describes the API for Swift Playground

  • Renders a Swift Package content into Swift Playground compatible to iPad.

    Declaration

    Swift

    static func render(
        packageContent: String,
        name: String,
        output: URL,
        excludes: [PlaygroundExcludeItem]
    ) -> EnvIO<ProgressReport, nef.Error, URL>

    Parameters

    packageContent

    Swift Package content.

    name

    Name for the output Swift Playground.

    output

    Folder where to write the Swift Playground.

    excludes

    List of items to exclude for building the Swift Playground.

    Return Value

    An EnvIO to perform IO operations that produce errors of type nef.Error and values with the Swift Playground output of type URL, having access to an immutable environment of type ProgressReport.

  • Renders a Swift Package content into Swift Playground compatible to iPad.

    Declaration

    Swift

    static func render(
        packageContent: String,
        name: String,
        output: URL
    ) -> EnvIO<ProgressReport, nef.Error, URL>

    Parameters

    packageContent

    Swift Package content.

    name

    Name for the output Swift Playground.

    output

    Folder where to write the Swift Playground.

    Return Value

    An EnvIO to perform IO operations that produce errors of type nef.Error and values with the Swift Playground output of type URL, having access to an immutable environment of type ProgressReport.

  • Renders a Swift Package content into Swift Playground compatible to iPad.

    Declaration

    Swift

    static func render(
        package: URL,
        name: String,
        output: URL
    ) -> EnvIO<ProgressReport, nef.Error, URL>

    Parameters

    package

    Swift Package file.

    name

    Name for the output Swift Playground.

    output

    Folder where to write the Swift Playground.

    Return Value

    An EnvIO to perform IO operations that produce errors of type nef.Error and values with the Swift Playground output of type URL, having access to an immutable environment of type ProgressReport.