Skip to content

[macOS] Private API usage #425

@rajivshah3

Description

@rajivshah3

The commit introducing clipboard access uses private APIs for its macOS implementation. This can result in App Review rejection for apps submitted to the Mac App Store. We should try to find another way to do this without using private APIs.

webview/webview.h

Lines 631 to 638 in 9444582

objc_msgSend(objc_msgSend(config, "preferences"_sel),
"setValue:forKey:"_sel,
objc_msgSend("NSNumber"_cls, "numberWithBool:"_sel, 1),
"javaScriptCanAccessClipboard"_str);
objc_msgSend(objc_msgSend(config, "preferences"_sel),
"setValue:forKey:"_sel,
objc_msgSend("NSNumber"_cls, "numberWithBool:"_sel, 1),
"DOMPasteAllowed"_str);

https://github.com/WebKit/webkit/blob/950143da027e80924b4bb86defa8a3f21fd3fb1e/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h#L226

Metadata

Metadata

Assignees

No one assigned

    Labels

    os: macosInvolves macOS operating systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions