iterate-ch / rococoa

Rococoa allows you to call Objective-C code through Java classes and interfaces that you define.
GNU Lesser General Public License v3.0
74 stars 18 forks source link

Support for Apple silicon #20

Closed dkocher closed 3 years ago

dkocher commented 3 years ago

Dependent on https://github.com/java-native-access/jna/pull/1238

ccidral commented 3 years ago

@dkocher Just curious, were you able to build and use rococoa under Apple silicon? I see that java-native-access/jna#1238 has been closed.

dkocher commented 3 years ago

There are several things to be sorted out

To fix dynamic-dispatching issues in your code, define a type-safe function pointer instead of calling objc_msgSend directly. Refer to Enable Strict Type Enforcement for Dynamic Method Dispatching

dkocher commented 3 years ago
  • Fix several test failures in Rococoa possibly caused by not type safe calling objc_msgSend.

To fix dynamic-dispatching issues in your code, define a type-safe function pointer instead of calling objc_msgSend directly. Refer to Enable Strict Type Enforcement for Dynamic Method Dispatching

Not sure if this is actually an issue with JNA using libffi.

dkocher commented 3 years ago

We are making progress.

dkocher commented 3 years ago

Additional helpful documentation in Managing Functions and Function Pointers .