Update import format to XCode 14.2 compat
NaeemCheema opened this issue · comments
The import #import "RCTUtils.h" in /RNSound/RNSound.m is causing issues in XCode 14.2. It looks like the same issue as this expo issue: expo/expo#15622 (comment)
For us, the expo workaround expo/expo#15655 with expo_patch_react_imports isn't consistently working, so it would be great to change the import into #import <React/RCTUtils.h>.
Is that an option? Would you accept a PR for that?
This patch works for us:
diff --git a/node_modules/react-native-sound/RNSound/RNSound.m b/node_modules/react-native-sound/RNSound/RNSound.m
index df3784e..17e5894 100644
--- a/node_modules/react-native-sound/RNSound/RNSound.m
+++ b/node_modules/react-native-sound/RNSound/RNSound.m
@@ -1,10 +1,5 @@
#import "RNSound.h"
-
-#if __has_include("RCTUtils.h")
-#import "RCTUtils.h"
-#else
#import <React/RCTUtils.h>
-#endif
@implementation RNSound {
NSMutableDictionary *_playerPool;
Is your issue with...
- iOS
- Android
- Windows
Are you using...
- React Native CLI (e.g.
react-native run-android
) - Expo
- Other: (please specify)
Which versions are you using?
- React Native Sound:
- React Native:
- iOS:
- Android:
- Windows:
Does the problem occur on...
- Simulator
- Device
If your problem is happening on a device, which device?
- Device: