NSParagraphStyle headerLevel on iOS

I am working with NSAttributedStrings and need to be able to detect header levels from enumerated ranges. I found that NSParagraphStyle will print out the header level, when logging. Header levels are also maintained when you start with html input, edit as an attributed string, then convert back to html. However, there is no property for the headerLevel, despite documentation having it (upon closer inspection, I noticed that documentation says it's only available in macOS). Why is this hidden on iOS?

This works:

paragraphStyle.value(forKey: "headerLevel")

But will that count as using private Apple APIs and get barred from App Store submissions?
NSParagraphStyle headerLevel on iOS
 
 
Q