What's the problem?
The Doc is outdated on both the website and the github page. it does not cover A) how autolinking will handle linking on its own on RN Ver >= 0.60 and B) references a (in my experience after two days of debugging) pretty bad package for swiftifying the project while the steps required are much easier (see this thread on stack overflow and this issue).
To Reproduce
yarn add react-native-track-player
yarn add react-native-swift
npx react-native swiftify
npx react-native link
Environment (please complete the following information):
Run react-native info in your project and share the content.
System:
OS: macOS 11.2.3
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 624.82 MB / 16.00 GB
Shell: 5.8 - /usr/local/bin/zsh
Binaries:
Node: 12.18.2 - /usr/local/bin/node
Yarn: 1.22.5 - /usr/local/bin/yarn
npm: 6.14.5 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2, 29.0.3
System Images: android-28 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
Android NDK: 22.0.7026061
IDEs:
Android Studio: 4.1.3 4.1.3
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_242 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
What react-native-track-player version are you using? 1.2.7
Are you testing on a real device or in the simulator? Which OS version are you running?
Both. iOS 14.4 on a simulator and an iPhone 11
For further clarification, react-native-swift doesn't setup the swift file correctly and it causes pod install to crash with a [Xcodeproj] Consistency issue: no parent for object RNPlaceholder.swift: SourcesBuildPhase, SourcesBuildPhase, SourcesBuildPhase, SourcesBuildPhase error
Same experience, very frusrating