I am experiencing a package linking issue only on iOS. The invariant violation error occurs when attempting to stream a video that utilizes the below package.
@jwplayer/jwplayer-react-native": "^1.0.3"
When running 'pod install' with CocoaPods the likely problematic pods are:
'JWPlayerKit''RNJWPlayer'
My minimum iOS version is 14.
Relevant Code:
return (<Background><View style={styles.videoContainer}><JWPlayer style={styles.player} config={config} ref={(p) => (jwplayer.current = p)} onPlay={async () => {}} onPause={async () => {saveProgress()}} onComplete={async () => {saveProgress()}} onFullScreen={PresentFullScreen} onFullScreenExit={DismissFullScreen} onTime={(event) => { const { position, duration } = event.nativeEvent; setVideoPosition(position); }} onPlaybackRateChanged={(event) => {}} onAudioTracks={(event) => {}} onLockScreenMetadata={(event) => {updateLockScreenMetadata(event)}} /></View></Background> );}
Things I have already attempted:
- Creating a test environment with only the necessary packages to stream videos using '@jwplayer/jwplayer-react-native'.
- Deleting my Pods folder and Podfile.lock and reinstalling.
- Specifying lower versions of 'JWPlayerKit' in my Podfile to be installed. Particularly version 4.19.2 and 4.21.0
Thank you for any help!