[Need Compiler Expert] Is there a way to workaround 'Symbol not found' crash on iOS 15 (sim) for APIS available since iOS 13?

I was unaware of the "public but hidden" notation, is that official? Is it alright to use "public but hidden" symbols in my app without a fear that Apple changes / removes them? I was under impression that Apple could do it along with coordinately changing their binaries accordingly at the same time but everyone else apps would stop working, is this not the case?


We were discussing ReferenceConvertible in the other thread and even if that is a pubic API the concencus of the discussion was that we should not use it, to the extent that the following warning was added to the documentation a few days ago as a result of that discussion:

The difference between that and "public but hidden" things like "_ScrollView", "_PagingView" is that they don't even have a documentation page where such warning could appear...


If it is somehow possible to patch dlsym and call the original, then this would work (pseudocode):

func dlsym(_ handle: UnsafeRawPointer, _ name: UnsafePointer<UInt8>) -> UnsafeRawPointer {
    if name == "s7Swift...CGSizeVAOSQ12CoreGraphicsyHCg_GAOtFTq" {
        name = "s7Swift...CGSizeVGAOtF"
    }
    return originalDlSym(handle, name)
}

No idea however how to achieve that. Google suggests it's possible via "Code Injection with Dyld Interposing" but I never tried it myself.