I have updated Xcode Version 10.2 (10E125) and testing on devices (not only simulator)
I get this message when I execute the app:
objc[3297]: Swift class extensions and categories on Swift classes are not allowed to have +load methods
-I'm using extensions of swift classes but I don't think that is the problem
Using Cocoapods and Firebase dependencies.
I searched in my project any functions that could contain "load" functions, none found.
Please some help
Just to add a solution for React Native projects.
This issue occurred because one of our custom react native modules was using the
RCT_EXPORT_MODULE()
macro which calls the init
function and we were also including swift code. Since react-native version 0.59.3, there's a new macro RCT_EXPORT_MODULE_NO_LOAD(js_name, objc_name)
which avoids the call to init
. Replacing RCT_EXPORT_MODULE()
with RCT_EXPORT_MODULE_NO_LOAD(js_name, objc_name)
and updating to react native version 0.59.3 fixed the issue.