chaimPaneth / react-native-jw-media-player

React-Native Android/iOS bridge for JWPlayer SDK (https://www.jwplayer.com/)
MIT License
197 stars 92 forks source link

❌ (node_modules/react-native-jw-media-player/ios/RNJWPlayer/RNJWPlayerView.swift:13:8) import GoogleCast | ^ no such module 'GoogleCast' #345

Open paulrinaldi opened 9 months ago

paulrinaldi commented 9 months ago

Environment: Apple M1 Pro Sonoma 14.3.1 (23D60) Package Manager Used: yarn Simulator running: Xcode's iPhone 6s Plus iOS 17.2

Versions: node -v outputs v21.6.1

app.json:

...
"plugins": [
      [
        "expo-build-properties",
        {
          "ios": {
            "deploymentTarget": "14.0"
          }
        }
      ]
    ]
...

Since when deployment target was 13.0-13.9, errored with need to target a higher version for compatible e.g.

Specs satisfying the `RNJWPlayer (from `../node_modules/react-native-jw-media-player`)` dependency were found, but they required a higher minimum deployment target.

package.json

    "expo": "~50.0.7",
    "expo-build-properties": "~0.11.1",
    "expo-status-bar": "~1.11.1",
    "react": "18.2.0",
    "react-native": "0.73.4",
    "react-native-jw-media-player": "^0.2.44"

Actual:

npx expo run:ios


› Compiling react-native Pods/React-graphics » RCTPlatformColorUtils.mm
❌  (node_modules/react-native-jw-media-player/ios/RNJWPlayer/RNJWPlayerView.swift:13:8)

11 | import MediaPlayer 12 | import React

13 | import GoogleCast | ^ no such module 'GoogleCast' 14 | import JWPlayerKit ... › Compiling react-native Pods/React-cxxreact » ReactMarker.cpp › 1 error(s), and 0 warning(s)

CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.



Expected:
>npx expo run:ios
Correctly building and running on iOS simulator
paulrinaldi commented 9 months ago

I think this is an issue on M1 macs (a non x86 processor).

paulrinaldi commented 9 months ago

Looks like I need to follow the instructions in the readme: https://github.com/chaimPaneth/react-native-jw-media-player?tab=readme-ov-file#ios-1 and go to https://docs.jwplayer.com/players/docs/ios-enable-casting-to-chromecast-devices#requirement and follow these instructions as well though it seems quite involved.

paulrinaldi commented 9 months ago

Has anyone been able to successfully build on iOS without performing the manual framework setup?

charlieperson commented 9 months ago

Hey Paul! Also having similar issues. Lmk if you find anything

chriszs commented 7 months ago

Looks like this may have been addressed in https://github.com/chaimPaneth/react-native-jw-media-player/commit/8d6c6754e420880092f66165c9e117af94d30ee4. I no longer encounter it.