New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WEEX-200][iOS] deprecate wxcallback and wxmodulecallback #1000

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@acton393
Member

acton393 commented Jan 23, 2018

As iOS developers knows, we cannot distinguish the block by its params count, but it has been a time we use the default value of block parameter, I find out that the default value could be dirty data.

here is the callback type definition.

typedef void (^WXCallback)(_Nonnull id result)

typedef void (^WXKeepAliveCallback)(_Nonnull id result, BOOL keepAlive);

when the method called, weexSDK will set the callback according to the @encode result,

but these two type's encode result are all "?", see more encode result from Apple Documents https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html

Bug:200

[WEEX-200][iOS] deprecate wxcallback and wxmodulecallback
As iOS  developers knows, we cannot distinguish the block by its params count, but it has been a time we use the default value of block parameter, I find out  that the default value could be dirty data.

here is the callback type  definition.

typedef void (^WXCallback)(_Nonnull id result)

typedef void (^WXKeepAliveCallback)(_Nonnull id result, BOOL keepAlive);

when the method called, weexSDK will set the callback according to the @encode result,

but these two type's encode result are all "?", see more encode result from Apple Documents https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html

Bug:200
@weex-bot

This comment has been minimized.

weex-bot commented Jan 23, 2018

Messages
📖 has no android file changed.
📖 android test finished.

Generated by 🚫 dangerJS

@asfgit asfgit closed this in 36a3f26 Feb 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment