Repository navigation
Releases: laconicman/swift-pjsip-gen
Releases · laconicman/swift-pjsip-gen
Release list
0.2.0
The first release that works with a current swift-pjsip, and the first whose output reflects the binary it is generated for.
Fixed
- Guarded members are resolved, not dropped (#1). C macro guards around enum cases and struct fields used to become Swift
#ifs, which are always false for a C macro, so every guarded member vanished silently, among thempj_math_stat.fmean_, the mean of every jitter and RTT statistic. Guards are now evaluated against theconfig_site.hshipped with the headers; a guard that cannot be evaluated fails the run. - Headers are found for swift-pjsip 0.2.1 and later (#2, #7). Since 0.2.1 the xcframework is a release asset, so the plugin's paths inside the checkout found nothing. SwiftPM builds now ask for the
PJSIPbinary target's artifact; Xcode project targets also look underSourcePackages/artifacts/. 0.1.x still works. - A run that finds nothing fails (#3, #8). A
searchRootsentry that does not exist, arootTypesentry no header declares, or an emptyrootTypesis now an error naming the entries, in the CLI and in the plugin, instead of an empty run that exits 0. - Generated struct descriptions compile on their own (#4, #10). The fixed-array helper ships in each generated file that needs it, under a name that cannot collide with a consumer's own
tupleToArray.
Changed
- The package no longer depends on swift-pjsip (#5, #9). The consumer's own swift-pjsip decides the headers.
discoverTypes(config:pjprojectRoot:)nowthrows(DiscoveryError). Source-breaking for direct users ofPJSIPSwiftGenCore.- Configs that matched nothing used to "succeed"; they now fail. Point
searchRootsat[""]for the xcframework's flatHeaders/. - A
tupleToArray(_:count:as:)you wrote for the generated code is no longer needed; it does not collide with the shipped helper, so removing it is optional. - The plugin's fingerprint changes with the version, so Xcode asks to trust it again.
Known issues
- The generated description of
pj_ssl_sock_cbdoes not compile: its multi-line function-pointer members are mis-parsed.pjsua_acc_configreaches it, so add"pj_ssl_sock_cb"toskipTypes(as the README example already does forpjsip_hdr, which has a similar problem).
Use
.package(url: "https://github.com/laconicman/swift-pjsip-gen", from: "0.2.0"),Under xcodebuild, pass -skipPackagePluginValidation.