Consider the private C function _UICreateScreenUIImage , which returns a UIImage snapshot of the current device screen:

OBJC_EXTERN UIImage *_UICreateScreenUIImage(void) NS_RETURNS_RETAINED;

I can put this in a bridging header and access it in Swift like so:

MyApp-Bridging-Header.h

@import UIKit; UIImage *_UICreateScreenUIImage(void) NS_RETURNS_RETAINED;

MyClass.swift

let image = _UICreateScreenUIImage() print(image) // <UIImage: 0x7fc4ba6081c0>, {375, 667}

Is there a way I can access _UICreateScreenUIImage in pure Swift without using a bridging header?

An initial thought was to create an extension on UIImage , but the extension is expecting me to declare the body of the function in the extension:

extension UIImage { public func _UICreateScreenUIImage(_: Void) -> UIImage // "Expected '{' in body of function declaration" }

This implementation is flawed anyways, as _UICreateScreenUIImage isn't a method on UIImage .

Is exposing and accessing this method possible in pure Swift?