Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update import format to XCode 14.2 compat #821

Open
5 of 8 tasks
NaeemCheema opened this issue Mar 14, 2023 · 0 comments
Open
5 of 8 tasks

Update import format to XCode 14.2 compat #821

NaeemCheema opened this issue Mar 14, 2023 · 0 comments
Labels

Comments

@NaeemCheema
Copy link

NaeemCheema commented Mar 14, 2023

🪲 Description

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?

🪲 What is the observed behavior?

🪲 What is the expected behavior?

🪲 Please post your code:

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;

💡 Does the problem have a test case?

💡 Possible solution

💡 Is there a workaround?

💡 If the bug is confirmed, would you be willing to create a pull request?

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:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
@NaeemCheema and others