Native Swift support
larryonoff opened this issue · 4 comments
Hello Matt,
Are you going to implement this library natively on Swift?
I use this library in Swift project and there're several common Swift to Objective-C inconveniences, e.g.
for object in element.childrenWithTag("td") {
let child = object as! ONOXMLElement
...
}
NSFastEnumeration cannot be used in for-in directly
- (id <NSFastEnumeration>)CSS:(NSString *)CSS;
most methods return ImplicitlyUnwrappedOptional
I can update the code base at least to use Objective-C Nullability.
Please comment.
Hi, @larryonoff
@mattt seems to be too busy to login github to look at these PRs and issues for the recent few months, and I have just ported Ono to Swift with some redesign following common swift convention, as well as some bug fixes. All tests in Ono passed.
https://github.com/cezheng/Fuzi
I will be actively maintaining the library so I'll be glad to have your feedback if you would give it a try ;)
@cezheng thanks!
Apologies for not responding sooner, @larryonoff. Just wanted to let you know that Ono now has nullability annotations that should make inter-op with Swift much nicer. If you see any other opportunities to improve things, please let me know!
@mattt thanks!