process(_:localization:)

    Applies a platform-specific rules to the resource at the given path.

    Resource.swift:79
    SwiftPM
    5.3+
    static func process(_ path: String, localization: Localization? = nil) -> Resource

    Parameters

    path

    The path for a resource.

    localization

    The explicit localization type for the resource.

    Returns

    A Resource instance.

    Use the process rule to process resources at the given path according to the platform Swift Package Manager builds the target for. For example, Swift Package Manager may optimize image files for platforms that support such optimizations. If no optimization is available for a file type, Swift Package Manager copies the file.

    If the given path represents a directory, Swift Package Manager applies the process rule recursively to each file in the directory.

    If possible, use this rule instead of copy(_:).

    See also

    Other members in extension

    Type members