enchev / nativescript-dialog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReferenceError: Can't find variable: SDCAlertController

AdamDenoon opened this issue · comments

Current version (0.1.0) works on Android.

On iOS, I'm getting ReferenceError: Can't find variable: SDCAlertController

My code:

            var dialog = require("nativescript-dialog");

            var nativeView;
            if(platform.device.os === platform.platformNames.ios){
                nativeView = UIActivityIndicatorView.alloc().initWithActivityIndicatorStyle(UIActivityIndicatorViewStyle.UIActivityIndicatorViewStyleGray);
              nativeView.startAnimating();
            } else if(platform.device.os === platform.platformNames.android){
                nativeView = new android.widget.ProgressBar(application.android.currentContext);
              nativeView.setIndeterminate(true);
            }

            dialog.show({
              title: "Loading...",
              message: "Please wait!",
              cancelButtonText: "Cancel",
              nativeView: nativeView}
            ).then(function(r){ console.log("Result: " + r); },
            function(e){console.log("Error: " + e)});

I fixed this issue by updating tns/nativescript.

commented

I have verified this project is no longer maintained by the original author. I have created my own plugin for login screen using this one as an base. I am willing to look into making another version to be more like this one with buttons if there is enough feedback/desire/need

See my plugin here https://github.com/LorenDorez/nativescript-loading-screen