You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 eitherBOOL
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.
The text was updated successfully, but these errors were encountered: