zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.78k stars 747 forks source link

React Native 0.71.0 incompatibility #834

Open jakequade opened 7 months ago

jakequade commented 7 months ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-sound@0.11.2 for the project I'm working on.

I'm upgrading a React Native project from 0.68.7 version to 0.71.0, and the RNSound.m does not build out of the box.

Here is the diff that solved my problem:

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;
RomualdPercereau commented 7 months ago

Could you please open a PR ?