#import "SecurePDFViewerManager.h" #import #import #if __has_include("secure_pdf_viewer-Swift.h") #import "secure_pdf_viewer-Swift.h" #else #import #endif #if RCT_NEW_ARCH_ENABLED #import #import #import #import #import #import #endif @implementation SecurePDFViewerManager RCT_EXPORT_MODULE(SecurePdfViewer) RCT_EXPORT_VIEW_PROPERTY(source, NSString) RCT_EXPORT_VIEW_PROPERTY(password, NSString) RCT_EXPORT_VIEW_PROPERTY(allowLinks, BOOL) RCT_EXPORT_VIEW_PROPERTY(onLinkPressed, RCTDirectEventBlock) RCT_EXPORT_VIEW_PROPERTY(onLinkPressedDisabled, RCTDirectEventBlock) RCT_EXPORT_VIEW_PROPERTY(onLoad, RCTDirectEventBlock) RCT_EXPORT_VIEW_PROPERTY(onPasswordRequired, RCTDirectEventBlock) RCT_EXPORT_VIEW_PROPERTY(onPasswordFailed, RCTDirectEventBlock) RCT_EXPORT_VIEW_PROPERTY(onPasswordFailureLimitReached, RCTDirectEventBlock) RCT_EXPORT_VIEW_PROPERTY(onLoadError, RCTDirectEventBlock) RCT_EXPORT_VIEW_PROPERTY(onTap, RCTDirectEventBlock) - (UIView *)view { #if RCT_NEW_ARCH_ENABLED // For new architecture, return a placeholder since the real component // is registered via RCTSecurePDFViewerComponentView return [UIView new]; #else // For old architecture, return the Swift view directly return [[SecurePdfViewerComponentView alloc] initWithFrame:CGRectZero]; #endif } @end