iOS alert notification for navigator

How can I fix the issue with my alerts not working on my iOS project? I am using Ionic and AngularJS to develop my app.

The problem I am facing is that when the alert pops up, the title shows as "index.html". This is how I call the alert:

alert("aaa");

I have read that Cordova allows for changing the title by using navigator.notification.alert. However, the alert does not show up when I call it.

This is how I am calling the alert:

.controller('MyCtrl',function(){
$scope.myfunction = function(){


    var success = function(data){
     //do something
};

var failure = function(message){
   navigator.notification.alert(
                                         "This is my Alert text!",
                                         callBackFunctionB, // Specify a function to be called
                                         'Alert Title',
                                         "OK"
                                         );
};

function callBackFunctionB(){
            console.log('ok');
}

}

});

I have added the plugin and included the key in infoplist following the instructions in PhoneGap documentation. Can anyone provide assistance?

Answer №1

After uninstalling and reinstalling the plugin, I was able to successfully get it working.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Mobile application designed using HTML which allows for storing data offline without needing an

Looking to develop a mobile application using HTML5 that can function on both iOS devices (such as iPhones and iPads) and Android phones and tablets. The focus of the app will be on organizing grocery items, including various categories and images for eac ...

Firebase Hosting integrated with Cloud Functions

Struggling with deploying my functions and hosting. While I have managed to get them working separately on different branches, integrating both hosting and cloud functions is proving to be a challenge. It seems like my cloud function is not deploying succ ...

We apologize for the inconvenience, but please address the upstream dependency conflict before proceeding. You may also choose to use the --force or --legacy-peer

npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="532b3e2a2c3bf48d454345584b4348454242404443472c525e7d1d010f13270">[email prote ...

Crockford's method of replacing values with nested objects

/** Custom Supplant Method **/ String.prototype.customSupplant = function(obj) { return this.replace (/{([^{}]*)}/g, function (match, propPath) { var props = propPath.split('.'); var result = obj; f ...

"Crafting a Personalized TabControl Directive in AngularJS: Step-By-

Currently, I am using Zurb Foundation 4 as my CSS/Grid Framework which includes a Tab Control feature. However, when this tab control is placed on a page loaded via ng-view, it malfunctions. To address this issue, I decided to create my own directive sinc ...

The angular js routing and translate template is malfunctioning and not functioning as expected

Just delving into the world of Angular and finding it quite fascinating! I'm currently designing a template for a promotional page but running into an issue - half of my script seems to have stopped working... If you'd like to take a look, here ...

Implementing a rate limit on the login API that is specific to individual IP addresses rather than being

I have successfully implemented the [email protected] module, but I am facing an issue where it is blocking the API globally instead of for a specific API that is receiving hits. This is my current code: const limiter = new RateLimit({ windo ...

jquery is showing up in the browserify bundle.js file, however, it is not functioning properly

Currently, I am trying to follow a brief tutorial on how to use Browserify. Despite following the instructions precisely, jQuery seems to not be working properly when bundled. Specifically, the button element in my app.js code is not appended to the body. ...

React - Uncaught Error: e.preventDefault is not a function due to Type Error

Encountering an issue with Axios post and react-hook-form: Unhandled Rejection (TypeError): e.preventDefault is not a function The error arises after adding onSubmit={handleSubmit(handleSubmitAxios)} to my <form>. Seeking to utilize react-hook-form ...

NgZone is no longer functioning properly

Seemingly out of the blue, my NgZone functionality has ceased to work. I'm currently in the process of developing an application using Ionic, Angular, and Firebase. An error is being thrown: Unhandled Promise rejection: Missing Command Error ; Zon ...

Linking functions as needed

I apologize for the not-so-great title of this question. Basically, I have a library that generates users with predetermined capabilities. Currently, it involves creating a new user instance and calling asynchronous methods like: var User = require(...).U ...

Retrieve the data object in VueJS

(Regarding a currency conversion tool) In order to accurately convert currencies, I am looking to access an object structured like this: rates: AUD: 1.708562 SGD: 1.546211 When retrieving these rates from an API, they are not always in the desired o ...

tslint issues detected within a line of code in a function

I am a novice when it comes to tslint and typescript. Attempting to resolve the error: Unnecessary local variable - stackThird. Can someone guide me on how to rectify this issue? Despite research, I have not been successful in finding a solution. The err ...

Explore the flexibility of npm by installing and utilizing various versions of a specific package

Is it possible to install and utilize different versions of packages in npm? Installation can be done as follows: npm install -g <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1d6d7c7e767c7a78737c70785d2f3325">[email p ...

The issue with Array.prototype.join in Internet Explorer 8

In my current working scenario, I encountered an issue with the following code snippet. It performs well in the latest versions of Internet Explorer (IE), but the join function fails to work correctly in IE 8 Version. <!DOCTYPE html> <html xmlns= ...

What is the procedure for a parent component to transmit HTML to a child component within Angular?

How can a parent component pass multiple ng-templates to a child component? For example, the parent component includes multiple ng-templates: <app-childcomponent> <ng-template>Item A</ng-template> <ng-template>Item B</n ...

Ensuring code signing is mandatory for the 'Application' product type in the iOS 11.3 SDK when building with VSTS

https://i.sstatic.net/dWpI2.png I attempted to create a build using VSTS, but it failed due to the code signing requirement. Even after switching to manual signing and providing the following details: - Signing identity = $(APPLE_CERTIFICATE_SIGNING_IDEN ...

Is it possible to retrieve data from a database using jQuery and store it in separate variables?

I am able to print out one field from a table, but I want to display all fields in separate tables. How can I achieve this? Below is my save/load code: // Save/Load data. $('').ready(function() { if($.cookie('code')) { $.aj ...

Having trouble activating the submit function using an external JavaScript file

Having trouble getting the form to submit properly. I have placed the form inside a <div id="access"></div> by setting its innerHTML using an included js file in the header of the page. Here's how it looks: <div id="access"> < ...

Enhancing AngularJS: Tailored iterations and data manipulations for more advanced grouping beyond basic ng-repeat limitations

Although I found the answer to this issue on Angular.js more complex conditional loops satisfactory and accepted it, I feel there is more to discuss. Let me provide further details that were not included in my initial inquiry. My goal is to transform the ...