Summary
iOS simulator builds targeting x86_64 fail on Xcode 26 when compiling NativeApiJsiInvocation.h in the NativeScript FFI layer.
Error
NativeApiJsiInvocation.h:485:5: error: no matching function for call to 'ffi_call'
NativeApiJsiInvocation.h:480:5: error: cannot initialize a variable of type 'void *' with an rvalue of type 'void (*)()'
Observed with iPhoneSimulator26.4.sdk (EAS / CI and local Xcode 26 builds).
Cause
In the __x86_64__ branch of callObjCSelector, the Objective-C message send function is stored in a void* variable before being passed to ffi_call:
void* target = dispatchSuperClass != Nil
? (isStret ? FFI_FN(objc_msgSendSuper_stret) : FFI_FN(objc_msgSendSuper))
: (isStret ? FFI_FN(objc_msgSend_stret) : FFI_FN(objc_msgSend));
ffi_call(&signature->cif, target, returnStorage.data(), values.data());
FFI_FN() expands to ((void (*)(void))f), but ffi_call expects its second argument to be void (*)(void), not void*. Older Clang accepted the implicit conversion; Xcode 26’s Clang rejects it.
The non-x86_64 branch already passes FFI_FN(...) directly and compiles fine.
Proposed fix
Change the variable type to match ffi_call’s signature:
- void* target = dispatchSuperClass != Nil
+ void (*target)(void) = dispatchSuperClass != Nil
File: NativeScript/ffi/shared/jsi/NativeApiJsiInvocation.h (around line 480).
Environment
- Xcode 26 / iPhoneSimulator26.4.sdk
- Architecture: x86_64 (Intel simulator)
- Package:
@nativescript/react-native (published from this repo)
Summary
iOS simulator builds targeting x86_64 fail on Xcode 26 when compiling
NativeApiJsiInvocation.hin the NativeScript FFI layer.Error
Observed with
iPhoneSimulator26.4.sdk(EAS / CI and local Xcode 26 builds).Cause
In the
__x86_64__branch ofcallObjCSelector, the Objective-C message send function is stored in avoid*variable before being passed toffi_call:FFI_FN()expands to((void (*)(void))f), butffi_callexpects its second argument to bevoid (*)(void), notvoid*. Older Clang accepted the implicit conversion; Xcode 26’s Clang rejects it.The non-x86_64 branch already passes
FFI_FN(...)directly and compiles fine.Proposed fix
Change the variable type to match
ffi_call’s signature:File:
NativeScript/ffi/shared/jsi/NativeApiJsiInvocation.h(around line 480).Environment
@nativescript/react-native(published from this repo)