lochstar / nativescript-cast

NativeScript Chromecast Plugin.
Apache License 2.0
16 stars 4 forks source link

Cast button does not appear on iOS #43

Closed sebj54 closed 2 years ago

sebj54 commented 2 years ago

When you run iOS demo or your own project with this plugin as a dependency, the cast button does not appear.

Here is the code I used in my app:

<action-bar title="My demo app">
    <action-item ios.position="right">
        <stack-layout 
            orientation="horizontal" 
            backgroundColor="red"
        >
            <cast-button
                @cast="handleCastEvent"
                color="#ffffff"
                backgroundColor="green"
            />
        </stack-layout>
    </action-item>
</action-bar>

And here is what happens in the app (see the red background-color where the cast button should appear):

image

In the demo, here is what happens:

image

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

OS: macOS 12.0.1
CPU: (4) x64 Intel(R) Core(TM) i3-8100B CPU @ 3.60GHz
Shell: /bin/zsh
node: 14.18.1
npm: 8.1.0
nativescript: 8.1.4

#### android
java: 1.8.0_292
ndk: Not Found
apis: 30
build_tools: 30.0.3
system_images: Not Found

#### ios
xcode: 13.1/13A1030d
cocoapods: 1.10.1
python: 2.7.18
python3: 3.9.6
ruby: 2.7.2
platforms: 
  - DriverKit 21.0.1
  - iOS 15.0
  - macOS 12.0
  - tvOS 15.0
  - watchOS 8.0

Dependencies

"dependencies": {
  "@codelab/nativescript-cast": "~0.4.1",
  "@nativescript/core": "~8.1.1",
  "@nativescript/theme": "~3.0.1",
  "@nstudio/nativescript-exoplayer": "^5.0.7",
  "dotenv": "^8.6.0",
  "nativescript-ui-listview": "^10.0.1",
  "nativescript-vue": "~2.9.0",
  "vuex": "^3.6.2"
},
"devDependencies": {
  "@nativescript/android": "8.1.1",
  "@nativescript/eslint-plugin": "^0.0.4",
  "@nativescript/ios": "8.1.0",
  "@nativescript/webpack": "~5.0.0",
  "@typescript-eslint/parser": "^5.2.0",
  "eslint": "^7.22.0",
  "eslint-config-standard": "^16.0.3",
  "eslint-plugin-import": "^2.25.2",
  "eslint-plugin-node": "^11.1.0",
  "eslint-plugin-promise": "^5.1.1",
  "eslint-plugin-vue": "^8.0.3",
  "nativescript-vue-template-compiler": "~2.9.0"
}

Please, tell us how to recreate the issue in as much detail as possible.

Run demo app

cd demo
ns debug ios

Do you have any idea on how I can debug this issue?

lochstar commented 2 years ago

I'm guessing this is for iOS 15 only? Apple seem to always add a new requirement for each version, although I don't see any iOS 15 specifics listed here: https://developers.google.com/cast/docs/ios_sender/

sebj54 commented 2 years ago

I don't know if it's iOS 15 specific. I'll try soon to compile on a iOS 14 device if it can add extra info to this issue.

There were errors preventing the first compilation (see https://github.com/lochstar/nativescript-cast/pull/42), I guess they are specific to iOS 15.

By the way, I never saw this dialog:

image

Maybe I can add logs somewhere to see if there is any error? As I don't know iOS that much, do you know where I can start?

sebj54 commented 2 years ago

I just figured out why I did not see this modal… I was not connected to a wifi network 🤦