Repository navigation
OCGumbo 1.1.0 adds first-class Swift support and complete Swift Package Manager packaging while preserving the Objective-C public API, apart from the bug fixes below.
Swift and packaging
- New
OCGumboSwiftoverlay with Collection conformance, typed query helpers, attribute subscripts and convenient parsing APIs. - Swift-friendly names, nullability annotations and lightweight generics for the Objective-C API.
- SwiftPM products for
OCGumboandOCGumboSwift(iOS 12+, macOS 10.13+, Swift tools 5.7+). - Gumbo sources and their Apache 2.0 license are now tracked directly instead of as a submodule, so remote SwiftPM dependencies include all parser sources automatically.
- CocoaPods 1.1.0 metadata, HeaderDoc documentation and clang-format configuration.
Crash and query fixes
getAttributeNode:returnsnilfor a missing attribute instead of crashing.parent()andparents()avoid a macOS Foundation selector collision by returning realOCQueryObjectarrays.parent()checks the direct parent;parents()searches only ancestors, nearest first, without including siblings or descendants. Shared ancestors remain deduplicated.
Tests and CI
- Restored the removed crash regression tests and added Objective-C and Swift coverage for missing attributes, ancestor filtering, deduplication, ordering and chained queries.
- All 55 tests (41 Objective-C and 14 Swift) pass locally, including from a clean source snapshot without submodules.
- GitHub Actions builds and tests the package on macOS using a plain checkout.
Full changelog: 1.0.1...v1.1.0