wilix-team / iohook

Node.js global keyboard and mouse listener.
https://wilix-team.github.io/iohook
MIT License
1.2k stars 291 forks source link

fix: depreacated use of objc_msgSend #212

Closed code-yeongyu closed 4 years ago

code-yeongyu commented 4 years ago

Description

Change the way of calling function objc_msgSend().

Motivation and Context

Unstrict usage of objc_sendMsg is deprecated since Xcode 6. Of course, it is able to be fixed if the user builds the option 'Enable strict checking of objc_msgSend Calls' at the Xcode from yes to no. However, this project is not an Xcode project, so there's no way to turn that option off. So this pull request improves the way to call function objc_msgSend().

How Has This Been Tested?

If you try to build it on the original source, you'll see that the compiler prints the error and stop compiling, saying "Too many arguments". But if you try it with my source, you'll see that no error occurs, with 100% of compile.

Screenshots (if appropriate):

Types of changes

Checklist:

Djiit commented 4 years ago

Hey, thanks for your work!