Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

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

Closed
wants to merge 1 commit into from

Conversation

acton393
Copy link
Member

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

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
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants