Im trying to install this library in a new 0.60.0 react native project but i cant, im getting errors with react-native-swift (because is outdated) and if i dont install this library im getting a lot of errors:
^
/Users/fer/Documents/musapp/ios/Pods/Headers/Public/react_native_track_player/react-native-track-player-umbrella.h:25:9: note: in file included from /Users/fer/Documents/musapp/ios/Pods/Headers/Public/react_native_track_player/react-native-track-player-umbrella.h:25:
^
/Users/fer/Documents/musapp/node_modules/react-native-track-player/ios/RNTrackPlayer/Vendor/AudioPlayer/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h:9:9: note: in file included from /Users/fer/Documents/musapp/node_modules/react-native-track-player/ios/RNTrackPlayer/Vendor/AudioPlayer/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h:9:
^
/Users/fer/Documents/musapp/node_modules/react-native-track-player/ios/RNTrackPlayer/Vendor/AudioPlayer/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h:1:9: error: 'XCTest/XCTest.h' file not found
^
@fcaride Getting the same error trace you've copied above. Did you manage to fix this, and how?
If this is still a bug, would suggest renaming this issue to mark it as a React Native 0.60 compatibility issue.
No, i couldnt solve it yet 鈽癸笍
It seems that intermediate rc Versions of the player were set to build the examples and tests from react-native-track-player as well. Utimately failing on those.
Can you try
npm i react-native-track-player@next
which will install the latest rc10 which should then build properly
Do i still need react-native-swift for the project? How would be the instructions for installing it on a new react project. React in the 0.60 version changed the react-native link command and does other things under the hood.
Thanks for the response
Sorry for the late reply.
Can you try the following, this worked for me:
npm i [email protected]cd ios && pod repo update && pod installreact-native link is not necessary with RN 0.60.0 anymore. If you linked the libraries previously either remove all non RN pods or use react-native cli to create a new project and copy the Podfile over. Or start over with a clean 0.60.0 project.
Inside the Podfile the line
use_native_modules!
imports all pods from the node_modules.
@huntie @fcaride still an issue or were you able to solve it with one of the latest RCs ?
Yes i could fix it! with the last release just doing a npm install works (without react-native-swift)
Thanks
Perfect @fcaride !
@dcvz you can close this one.
@mhabegger I followed your steps but I am getting 25 compiler issues
Swift Compiler Error Group
node_modules/react-native-track-player/ios/RNTrackPlayer/Vendor/AudioPlayer/SwiftAudio/Classes/AudioSessionController/AudioSessionController.swift:104:70: 'interruptionNotification' has been renamed to 'NSNotification.Name.AVAudioSessionInterruption'
'interruptionNotification' has been renamed to 'NSNotification.Name.AVAudioSessionInterruption'
Type 'AVAudioSession' does not conform to protocol 'AudioSession'
react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:157:57: Type 'AVAudioSession.Category' (aka 'NSString') has no member 'playback'
@maamounapprise you should probably specify SWIFT_VERSION, please see #673
I can't use [email protected] because of a lack of documentation and also too many disruptive changes!
Is there any 1.x.x version that fix this error?
Thanks
So I'm really not sure which version of react-native track player is stable. The current version when we use yarn add react-native-track-player is 1.2.2, but the example repo of this library is using branch dev, I already tried to use 2.0.0rc but it's unstable and there are a lot of issues remaining in that version, so what should I do now, so desperate
Most helpful comment
So I'm really not sure which version of react-native track player is stable. The current version when we use yarn add react-native-track-player is 1.2.2, but the example repo of this library is using branch
dev, I already tried to use 2.0.0rc but it's unstable and there are a lot of issues remaining in that version, so what should I do now, so desperate