Reputation: 59
This is the alert am displaying in cordova application
alert("welcome to all");
When i run the application in ios 7, it displays
index.html
welcome to all
To remove the index.html
i have used cordova plugin cordova-plugin-dialogs
document.addEventListener("deviceready",alert,false);
function alert(){
navigator.notification.alert("welcome to all");
}
but it's not working for me
Please let us know few details, to display the native alert in ios cordova application.
Note:
Here, Am not calling any native functionalities, completely the app developed in HTML,JavaScript only. Just we maintained all the content in platforms/ios/www folder
. When i have started to run the app on iPhone 6 device or simulator it's showing the alert as per the https://www.dropbox.com/s/st5jpq4r0hq0fqk/alert.png?dl=0
Recently when i executed the app, The message i have received
The old format of this exec call has been removed (deprecated since 2.1). Change to: cordova.exec(null, null, "", "",[null,"Notification","alert",["HI am doing testing in alert","Good Job1","Okay1"]]);
Upvotes: 2
Views: 562
Reputation: 59
To resolve the title name loading in alert,
We can also use another method by using custom plugins in javascript, so no need to use cordova plugins
.
In my application i have used, SweetAlert
plugin in javascript.
SweetAlert
plugin you can download from this link
http://t4t5.github.io/sweetalert/
It's very easy to integrate the plugin in our application.
After integration, just we can pass a message with this format
swal("Displaying new message using SweetAlert plugin");
Upvotes: 3