我的本地反应项目中包含一个本地ios sdk。我正在通过反应本机包装器进行ios sdk的集成。为此,我做了一个反应本地包装。这样我就可以调用react native的方法,并通过react native代码中的回调获得结果。 But in my wrapper's RNTapPayment.m file I am not able to import sdk. Xcode gives error.
但是sdk可以导入到react-native主ios文件夹的AppDelegate.m文件中。
在我的本机包装中:
//RNTapPayment.m
#import "RNTapPayment.h"
#import <React/RCTLog.h>
#import <React/RCTConvert.h>
@import goSellSDK; // my sdk
// Error in above line: Module 'goSellSDK' not found
@implementation RNTapPayment
- (dispatch_queue_t)methodQueue
{
return dispatch_get_main_queue();
}
RCT_EXPORT_MODULE(TapPayment)
RCT_EXPORT_METHOD(openTapPaymentUI:(NSDictionary *)details callback:(RCTResponseSenderBlock)callback)
{
NSString *SecretAPIkey = [RCTConvert
NSString:details[@"SecretAPIkey"]];
NSString *AppID = [RCTConvert NSString:details[@"AppID"]];
RCTLogInfo(@"Pretending to create an event %@ and %@", AppID, SecretAPIkey);
callback(@[[NSNull null], AppID]);
}
@end
错误:找不到模块'goSellSDK'