Smartface doesn't support platform specific properties settings on constructor yet. The platform specific property can be set after the instance is created. You should use like below example.
const AlertView = require('sf-core/ui/alertview');var myAlertView = new AlertView({title: "Alert Title",message: "Alert Message"});​myAlertView.android.cancellable = false;
Smartface doesn't support getting or setting the platform specific property as objects.
const AlertView = require('sf-core/ui/alertview');var myAlertView = new AlertView({title: "Alert Title",message: "Alert Message"});​// This usage is not supported. It returns an empty object.alert(JSON.stringify(myAlertView.android));​// This usage is not supported.myAlertView.android = {cancellable: false}
Smartface follows an easy coding convention for platform specific properties and types to make them more predictable. Coding convention rules are defined below.
Platform specific properties of an object are inside a platform object named "android" or "ios". Platform specific types are inside a platform namespace named "Android" or "iOS". Following example demonstrates how these rules are applied in Smartface.
const AlertView = require('sf-core/ui/alertview');​var myAlertView = new AlertView({title: "Alert Title",message: "Alert Message"});​// Note how platform specific property "cancellable" is kept in objectmyAlertView.android.cancellable = false;​// Note how platform specific type "ButtonType" is kept in namespacemyAlertView.addButton({type: AlertView.Android.ButtonType.NEGATIVE,text: "Cancel"});​myAlertView.show();