diff --git a/packages/react-native-fast-io/ios/BridgingHeader.h b/packages/react-native-fast-io/ios/BridgingHeader.h new file mode 100644 index 0000000..c72830a --- /dev/null +++ b/packages/react-native-fast-io/ios/BridgingHeader.h @@ -0,0 +1 @@ +#import diff --git a/packages/react-native-fast-io/ios/FastIOPrivate/module.modulemap b/packages/react-native-fast-io/ios/FastIOPrivate/module.modulemap index aa35e24..12cec8a 100644 --- a/packages/react-native-fast-io/ios/FastIOPrivate/module.modulemap +++ b/packages/react-native-fast-io/ios/FastIOPrivate/module.modulemap @@ -1,5 +1,5 @@ module FastIOPrivate { - header "../RCTUtilsWrapper.h" + header "../BridgingHeader.h" header "../../cpp/Constants.h" export * } diff --git a/packages/react-native-fast-io/ios/HybridFileSystem.swift b/packages/react-native-fast-io/ios/HybridFileSystem.swift index 26a3826..b65b8fa 100644 --- a/packages/react-native-fast-io/ios/HybridFileSystem.swift +++ b/packages/react-native-fast-io/ios/HybridFileSystem.swift @@ -78,7 +78,7 @@ class HybridFileSystem : NSObject, UIDocumentPickerDelegate, HybridFileSystemSpe documentPicker.directoryURL = URL(fileURLWithPath: startIn, isDirectory: true) } - guard let vc = RCTUtilsWrapper.getPresentedViewController() else { + guard let vc = RCTPresentedViewController() else { promise.reject(withError: RuntimeError.error(withMessage: "Cannot present file picker")) return } diff --git a/packages/react-native-fast-io/ios/RCTUtilsWrapper.h b/packages/react-native-fast-io/ios/RCTUtilsWrapper.h deleted file mode 100644 index b612ded..0000000 --- a/packages/react-native-fast-io/ios/RCTUtilsWrapper.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface RCTUtilsWrapper : NSObject -+ (UIViewController *)getPresentedViewController; -@end diff --git a/packages/react-native-fast-io/ios/RCTUtilsWrapper.m b/packages/react-native-fast-io/ios/RCTUtilsWrapper.m deleted file mode 100644 index 2f2b402..0000000 --- a/packages/react-native-fast-io/ios/RCTUtilsWrapper.m +++ /dev/null @@ -1,15 +0,0 @@ -// -// RCTUtilsWrapper.m -// FastIO -// -// Created by Mike Grabowski on 10/11/2024. -// - -#import "RCTUtilsWrapper.h" -#import - -@implementation RCTUtilsWrapper -+ (UIViewController *)getPresentedViewController { - return RCTPresentedViewController(); -} -@end