-
-
Notifications
You must be signed in to change notification settings - Fork 970
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
[iOS] The Swift pod react-native-track-player
depends upon React
, which do not define modules.
#503
Comments
Also, I followed linking library manually, but it doesn't work. I tried to create |
[Resovled] Okay. the problem was that I was using EXPO. In order to use this library, I had to eject from EXPO. Because EXPO doesn't support audio for background, so I had to eject my project form EXPO. If those of you who have the same experience as me, I would recommend you go with react-native cli. Even you start with expo-cli with bare workflow, it causes an error for using this library. Hope this help. THanks |
Yes, Expo is not fully supported on both Android and iOS at the moment. |
Any plans to support it? :-) |
On Android, one of the key requirements for this package is the Headless JS feature, which straight up crashes on Expo. Unless Expo starts supporting it, there are no plans for it. |
If you are not using Expo, Using pods and get this error, adding |
I am getting the same error while using
|
I have also tried that using react-native version
|
@Guichaguri @FrankGoortani @dcvz @mhabegger any idea how to deal with that? |
@waqas19921 I assume you create the RN project from scratch with npx ? What version of pod do you have?
|
@mhabegger no i have created project using |
@waqas19921
Also regarding |
@mhabegger Thanks that worked after updating pods version and following two steps more
|
@waqas19921 thanks! Just to make it clear:
|
I've applied those changes but have now an error on a different 3rd partie (react-native-image-crop-picker) that was building ok before those changes but cannot compile with the modular_headers thing. I've reacted to their issue here: ivpusic/react-native-image-crop-picker#1132 The error I am getting is So we are in a catch 22 situation where we need to choose between this library and the other one. Do you have a less instrusive solution to our issue than |
Good solution. Besides the version of swift, I want to set "exclude_files" in Podfile. Do you how to do it? //Podfile: (try to set "exclude_files" in Podfile) |
How does this work? I have to modify the packages podspec or what? Also I've not worked on iOS/cocoapods before, but what's the effect of adding the |
Yes, you should update file node_modules/react-native-track-player/react-native-track-player.podspec each time after update node_modules. That solution works for me |
@RollnCode , @waqas19921 You can make it easy using https://www.npmjs.com/package/patch-package |
Adding :modular_headers => true to React-Core works for debug mode, but when I go to export and publish for AppStore I get all sorts of Pods errors, and therefore this is not a viable solution. |
just add use_modular_headers! in Podfile it will fix the issue |
Hi,
I followed the instruction on [https://react-native-kit.github.io/react-native-track-player/api/]
After execution
react-native link
, I got a message that successfully linked.But, while running on iOS emulator, there is an error message that "native module cannot be null".
So, I go to
ios
folder and ranpod install
. But, I got an error messageUsing boost-for-react-native (1.63.0)
Using glog (0.3.5)
Installing react-native-track-player (1.1.3)
Using yoga (0.58.6.React)
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod
react-native-track-player
depends uponReact
, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may setuse_modular_headers!
globally in your Podfile, or specify:modular_headers => true
for particular dependencies.After that, I coulnd't running emaultor and build fails.
Any tips?
package.json
react-native info
The text was updated successfully, but these errors were encountered: