mattgallagher / CwlPreconditionTesting

A Mach exception handler that allows Swift precondition failures to be caught and tested.
ISC License
175 stars 46 forks source link

Build Warning With Xcode 14 - 'mach_port_destroy' was deprecated in iOS 15.0 #29

Closed LowAmmo closed 1 year ago

LowAmmo commented 1 year ago

Just a deprecation working.

Seeing it in CwlCatchBadInstruction, line 174 -

    defer {
        // 7. Cleanup the mach port
        mach_port_destroy(mach_task_self_, context.currentExceptionPort)
    }

The warning for Xcode - "'mach_port_destroy' was deprecated in iOS 15.0: Inherently unsafe API: instead manage rights with mach_port_destruct(), mach_port_deallocate() or mach_port_mod_refs()"

mattgallagher commented 1 year ago

This should now be addressed in the 2.1.2 version. Let me know if you have any further issues.