bradmartin / nativescript-advanced-webview

NativeScript plugin for Chrome CustomTabs on Android and SafariViewController on iOS.
Other
60 stars 28 forks source link

object dump on init (nativescript angular) #47

Closed JamesRoome closed 4 years ago

JamesRoome commented 4 years ago

Created a new project using tns create HelloWorld, selected angular project.

Added the plugin using tns plugin add nativescript-advanced-webview

Updated main.ts so it looks like:

    import { platformNativeScriptDynamic } from "nativescript-angular/platform";
    import { AppModule } from "./app/app.module";
    import { init } from 'nativescript-advanced-webview';

    init();
    platformNativeScriptDynamic().bootstrapModule(AppModule);

On launch get:

    JS: ==== object dump start ====
    JS: extend()
    JS: PACKAGE_NAME: "com.android.chrome"
    JS: REQUEST_CODE: "1868"
    JS: INSTANCE: co.fitcom.fancywebview.AdvancedWebViewStatics@1803b14
    JS: null()
    JS: class: class co.fitcom.fancywebview.AdvancedWebViewStatics
    JS: ==== object dump end ====
    JS: ==== object dump start ====
    JS: AdvancedWebView()
    JS: AdvancedWebViewListener()
    JS: AdvancedWebViewStatics()
    JS: CustomTabsCallbackListener()
    JS: CustomTabsServiceConnectionCallBack()
    JS: BuildConfig()
    JS: CustomTabFallback()
    JS: R()
    JS: WebViewActivity()
    JS: WebViewActivityConstants()
    JS: WebViewFallback()
    JS: ==== object dump end ====

package.json

{
  "nativescript": {
    "id": "org.nativescript.HelloWorld",
    "tns-ios": {
      "version": "6.1.0"
    },
    "tns-android": {
      "version": "6.1.2"
    }
  },
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@angular/animations": "~8.2.0",
    "@angular/common": "~8.2.0",
    "@angular/compiler": "~8.2.0",
    "@angular/core": "~8.2.0",
    "@angular/forms": "~8.2.0",
    "@angular/platform-browser": "~8.2.0",
    "@angular/platform-browser-dynamic": "~8.2.0",
    "@angular/router": "~8.2.0",
    "nativescript-advanced-webview": "^4.0.1",
    "nativescript-angular": "~8.2.0",
    "nativescript-theme-core": "~1.0.6",
    "reflect-metadata": "~0.1.12",
    "rxjs": "^6.4.0",
    "tns-core-modules": "~6.1.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~8.2.0",
    "@ngtools/webpack": "~8.2.0",
    "nativescript-dev-webpack": "~1.2.0",
    "typescript": "~3.5.3"
  },
  "gitHead": "1964ea9e8ca1a0518e0d6370781eedcf6c23db42",
  "readme": "NativeScript Application"
}