DCUniDefine.h 613 B

123456789101112131415161718192021222324
  1. //
  2. // DCUniDefine.h
  3. // UniCoreSDK
  4. //
  5. // Created by DCloud on 2020/9/30.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #define UNI_EXPORT_METHOD(method) UNI_EXPORT_METHOD_INTERNAL(method,wx_export_method_)
  9. #define UNI_EXPORT_METHOD_SYNC(method) UNI_EXPORT_METHOD_INTERNAL(method,wx_export_method_sync_)
  10. #define UNI_EXPORT_METHOD_INTERNAL(method, token) \
  11. + (NSString *)UNI_CONCAT_WRAPPER(token, __LINE__) { \
  12. return NSStringFromSelector(method); \
  13. }
  14. #define UNI_CONCAT_WRAPPER(a, b) UNI_CONCAT(a, b)
  15. #define UNI_CONCAT(a, b) a ## b
  16. typedef void (^UniModuleKeepAliveCallback)(id result, BOOL keepAlive);