bang590 / JSPatch

JSPatch bridge Objective-C and Javascript using the Objective-C runtime. You can call any Objective-C class and method in JavaScript by just including a small engine. JSPatch is generally used to hotfix iOS App.
MIT License
11.37k stars 2.24k forks source link

关于返回值问题 #827

Open hatjs880328s opened 6 years ago

hatjs880328s commented 6 years ago

bang你好, 查看你的代码发现使用了performSelector这个函数。 请问对于那种返回基本数据类型如:INT的是如何处理的呢? 因为我在使用swift时,当方法返回值为 int时, 使用method signature 判断出它的类型是 'q'-> long long 请问你遇到过这个问题吗?

hatjs880328s commented 6 years ago

https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html#//apple_ref/doc/uid/TP40008048-CH100-SW1 这篇文当我对照了一下,double是正确的nsobj也是正确的,就INT会返回给q