iongion commented on a change in pull request #113:
URL: https://github.com/apache/cordova-osx/pull/113#discussion_r707016764
##########
File path: CordovaLib/CordovaLib/Classes/CDVBridge.m
##########
@@ -74,7 +74,8 @@ - (void) exec:(NSString*) callbackId withService:(NSString*)
service andAction:(
SEL normalSelector = NSSelectorFromString(methodName);
if ([obj respondsToSelector:normalSelector]) {
// [obj performSelector:normalSelector withObject:command];
- objc_msgSend(obj, normalSelector, command);
+ void (*msgSend)(id, SEL, CDVInvokedUrlCommand*) = (void (*)(id, SEL,
CDVInvokedUrlCommand*)) objc_msgSend;
Review comment:
For me, this has the same issues
```
platforms/osx/CordovaLib/CordovaLib/Classes/CDVBridge.m:78:22: error: too
many arguments to function
call, expected 0, have 3
objc_msgSend(obj, normalSelector, command);
~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'ObjectiveC' imported from
/Users/me/Workspace/unishell/platforms/osx/CordovaLib/CordovaLib/Classes/CDVBridge.m:22:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/objc/message.h:63:1:
note:
'objc_msgSend' declared here
objc_msgSend(void /* id self, SEL op, ... */ )
^
1 error generated.
warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no run
destination to provide an active architecture; building for all applicable
architectures (in target 'HelloCordova' from project 'HelloCordova')
** BUILD FAILED **
```
What worked was patching it like this
```
// objc_msgSend(obj, normalSelector, command);
((void (*)(id, SEL, id))objc_msgSend)(obj, normalSelector, command);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]