Closed natebgurutech closed 3 years ago
Hey, check the ns7 branch.
It should be working. I just haven't made time for final check and release yet.
Oh awesome, thank you for looking at that =)
Hi there, any progress on testing this? In the mean time, I'm attempting to try out the ns7
branch but I'm not very experienced in using git branches in NPM. I've tried the trick where you use the github username/project#branchname
when installing it and also I tried editing the package.json
file in a similar way and neither of them work, I think it's because the package.json file in this repo is not in the root, it's in the src folder?
I then cloned this repo to my machine and used:
"dependencies": {
. . .
"nativescript-cast": "file:../nativescript-cast/src",
. . .
}
It seems to find the files but webpack fails with this error:
C:\Work\nativescript-cast\src\cast-options-provider.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
I tried running some of the build command in the package.json file, like npm run plugin.prepare
but I can't seem to get it to build, it can't find the ./cast
in cast.common.ts
and it can't find "nativescript-cast" in index.ts import { CastButton } from "nativescript-cast";
I'm just not sure how to use this branch
I've published the new version, note the package is now scoped @codelab/nativescript-cast
.
@natebgurutech For future reference, if you're having troubling pointing to the /src directory, another way is to package the plugin by running /package/pack.sh
and then pointing your depdency to the tgz file.
e.g.
"@codelab/nativescript-cast": "codelab-nativescript-cast-0.4.0.tgz"
@lochstar Thank you so much for looking into this! You're awesome =)
The readme has instructions for
NativeScript 6 or higher
but I can't seem to get it to work in a clean NS7 Angular project. With NativeScript 7's release back in August it seems like this plugin should be working. I suspect that NS7 is not working yet as the readme instructs to do things that do not exist or are different now.Which platform(s) does your issue occur on?
Windows 10 - Android (probably the same issue on iOS)
tns --version
to fetch it) Latest fromnpm install -g nativescript
7.0.11Follow the steps provided in the readme:
Create a new project and try to run it with this plugin.
Set the application ID
The strings.xml file does not exist, so create it and set the app_id
(with our own app id, this is the one from the readme)
Register the activity needed to run the plugin:
Angular uses webpack so we need to register this plugin in the appComponents list:
Also webpack wasn't properly seeing the main file so a workaround found is to create a
src/package.json
(Skipping iOS setup for now because we're just trying to get it working on Android first)
Simply registering the component and running without even using the component in the HTML
We get this error: