[iOS] Can't build with react-native 0.67.4
aprilmintacpineda opened this issue · comments
I'm trying to build with react-native 0.67.4 bare react-app on iOS but it always fails with the following errors:
node_modules/react-native-sound/RNSound/RNSound.m:236:44: Implicit declaration of function 'RCTJSErrorFromNSError' is invalid in C99
node_modules/react-native-sound/RNSound/RNSound.m:236:44: Declaration of 'RCTJSErrorFromNSError' must be imported from module 'React.RCTUtils' before it is required
node_modules/react-native-sound/RNSound/RNSound.m:236:44: Conflicting types for 'RCTJSErrorFromNSError'
It works fine with android though.
XCode: Version 13.3 (13E113)
Build fails when building for ios.
It should not fail building.
N/A
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: 0.11.2
- React Native: 0.67.4
- iOS: 12
- Android:
- Windows:
Does the problem occur on...
- Simulator
- Device
If your problem is happening on a device, which device?
- Device: N/A
Possible workaround:
Applying the following patch, works:
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;