import TrackPlayer from 'react-native-track-player' throwing the error Native module cannot be null
Im building a react-native ios app and this is the error that I'm getting. I linked the module and it is still giving me this error.
Try removing the module and linking it again.
Still giving me the error.
@plgrazon Which platform?
@plgrazon Which platform?
iOS sir.
I'm having the same problem...
I'm getting the same problem even with a fresh react-native init and a single import line...
Same issue here! Did you guys figure out a solution for this yet?
No solutions yet :(
Same here. Any solution or workaround? @plgrazon
This is going too off topic. I'll keep it locked until the issue is fixed.
I've just published a new version - 1.1.0, could you try again? The example is working fine and so is another project which is using this package.
@dcvz I still get the same error.
Could ya'll try doing step 1 from the troubleshooting of the install section here?
The part titled: library not found for -lswiftCoreAudio for architecture x86_64
Sorry, but want the thread to be easy to follow and a solution to the actual problem found.
@dcvz Adding the swift file resolved the issue for me. Thanks!
I've just published a new version - 1.1.0, could you try again? The example is working fine and so is another project which is using this package.
still same error (Native module cannot be null, iOS only)
adding the swift file fixed for me as well.
Could ya'll try doing step 1 from the troubleshooting of the install section here?
The part titled:
library not found for -lswiftCoreAudio for architecture x86_64
@cactis did you see this message?
I've updated the Wiki with an easier way to enable Swift support. I've also made the wiki clearer so newcomers will not run into this issue anymore :)
I'll be closing this issue now 馃槂
Please specify the required Swift version. Xcode doesn't show helpful error messages.
@dcvz would you still have that information you are linking to somewhere? It appears the wiki information has been removed and I cannot see what the 'Swift File' is that is fixing it.
Wiki was moved to here:
https://react-native-kit.github.io/react-native-track-player/install/
Wiki was moved to here:
https://react-native-kit.github.io/react-native-track-player/install/
haha thank you, I just found the reference here and it worked! Thanks!
Most helpful comment
@dcvz Adding the swift file resolved the issue for me. Thanks!