Skip to content

Better Swift support #149

@MaddTheSane

Description

@MaddTheSane

As it stands, XADMaster uses a lot of exceptions, which Swift does not like (there’s no exception handling in Swift, and if an exception is caught by the Swift run-time, the program crashes).

Swift, instead, throws errors instead.

In order for Objective-C methods imported into Swift to throw errors, they must have an NSError** parameter and return either BOOL or a nullable pointer.

You can look at my fork for how I did it, but be warned: my code might meander all over the place. Also, a lot of my changes are Apple Platforms-specific, including generics metadata, nullability metadata, and Blocks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions