Extending RCTConvert to provide custom function types

Is it possible to extend and RCTConvert to prove customer arguments for a function.

Example:
I want to have a function with NSSet * argument type

@objc func getItems(ids: NSSet, result: RCTResponseSenderBlock) {

}

RCT_EXTERN_METHOD(getItems:(NSSet *)items result:(RCTResponseSenderBlock)result)

But this code fails with an error:

Unknown argument type ‘NSSet’ in method -[HealthKitAPI requestPermission:write:result:]. Extend RCTConvert to support this type.


Source: ios

Leave a Reply