Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Swift support #149

Open
MaddTheSane opened this issue Dec 11, 2022 · 0 comments
Open

Better Swift support #149

MaddTheSane opened this issue Dec 11, 2022 · 0 comments
Labels
enhancement New feature or request proposal

Comments

@MaddTheSane
Copy link

MaddTheSane commented Dec 11, 2022

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.

@kradenkov kradenkov added enhancement New feature or request proposal labels Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal
Projects
None yet
Development

No branches or pull requests

2 participants