Skip to content

Commit 92a5de9

Browse files
committed
fix(ios): resolve compile error when using dynamically linked frameworks
Fixes #27
1 parent 61ace68 commit 92a5de9

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

ios/PdfUtilModule.mm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#import "PdfUtilModule.h"
2+
3+
#if __has_include(<react_native_pdf_light/react_native_pdf_light-Swift.h>)
4+
#import <react_native_pdf_light/react_native_pdf_light-Swift.h>
5+
#else
26
#import "react_native_pdf_light-Swift.h"
7+
#endif
38

49
@implementation PdfUtilModule {
510
PdfUtilModuleImpl *impl;

ios/PdfView.mm

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#import "PdfView.h"
2-
#import "react_native_pdf_light-Swift.h"
32

3+
#if __has_include(<react_native_pdf_light/react_native_pdf_light-Swift.h>)
4+
#import <react_native_pdf_light/react_native_pdf_light-Swift.h>
5+
#import <react_native_pdf_light/react/renderer/components/PdfViewSpec/ComponentDescriptors.h>
6+
#else
7+
#import "react_native_pdf_light-Swift.h"
48
#import <react/renderer/components/PdfViewSpec/ComponentDescriptors.h>
9+
#endif
10+
511
#import <react/renderer/components/PdfViewSpec/EventEmitters.h>
612
#import <react/renderer/components/PdfViewSpec/Props.h>
713
#import <react/renderer/components/PdfViewSpec/RCTComponentViewHelpers.h>

0 commit comments

Comments
 (0)