Skip to content

Tool that makes easier reporting warnings and errors to Xcode

License

Notifications You must be signed in to change notification settings

jhonatn/XcodeIssueReporting

Repository files navigation

XcodeIssueReporting

Issue sample. Shows an error on Xcode with the text "This is a test"

Tool that makes easier reporting warnings and errors to Xcode. This is specially useful whenever working with Swift Package Plugins or any tool that is run as part of the compilation of an Xcode project

Installation

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

Once you have your Swift package set up, adding XcodeIssueReporting as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/baguio/XcodeIssueReporting")
]

Example

XcodeIssue.report(.error(
    "This is a test"
))

You can also specify where the issue appears in code, like the code file, line and column. This way, when you select the issue on the Xcode navigator, it will display the file and the code location.

XcodeIssue.report(.warning(
    "This is another test"
    at: .sourceCodeFile(
        "/Users/JohnDoe/Developer/SampleProject/Sources/SampleProject/main.swift", 
        line: 3, 
        column: 5
    )
))

About

Tool that makes easier reporting warnings and errors to Xcode

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages