-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
Description
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.