A well-designed OS API doesn't need to do MitM and therefore would work with HSTS or cert pinning enabled.
Of course for obvious reasons, few commercial apps would actually use this API unless they have some other incentive.
Of course for obvious reasons, few commercial apps would actually use this API unless they have some other incentive.