You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/05/18 21:59:33 UTC

[GitHub] [cordova-plugin-dialogs] TraktorBengan opened a new issue, #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs

TraktorBengan opened a new issue, #161:
URL: https://github.com/apache/cordova-plugin-dialogs/issues/161

   Hi!
   
   I'm having issues installing Cordova-plugin-dialogs to use for my project.
   This plugin: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html
   Installing works fine without issues but when I build it, I get 7 fault codes all related to the 'UIAlertView' is deprecated.
   I do not know how to fix this even though this has been replaced dby some UIAlertController?
   
   ![Skärmavbild 2022-05-18 kl  23 57 41](https://user-images.githubusercontent.com/105824618/169162657-4376526b-b002-4754-9df4-14649a233e5c.png)
   
   I have checked a tons of tickets regarding this, removed my ios platforms, started a new project fresh from start etc etc etc.
   I really have no clue of how to fix this issue.
   
   Please help me


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-dialogs] breautek commented on issue #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #161:
URL: https://github.com/apache/cordova-plugin-dialogs/issues/161#issuecomment-1142784705

   Error indicates that it is failing to parse the `config.xml` file. It's impossible for me to give any actual advice with no real information provided. Best I can do is ensure you have a well formed XML file.
   
   I'm closing this issue as it seems like the original issue has been sorted out. Yes, the codebase contains deprecated code, no, that doesn't necessarily indicate a bug. To summarize, the `deviceready` event needs to be fired before calling on any cordova plugin APIs.
   
   If you believe you have found a bug within the cordova codebase, please file a new issue with the issue form filled out.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-dialogs] breautek closed issue #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs

Posted by GitBox <gi...@apache.org>.
breautek closed issue #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs
URL: https://github.com/apache/cordova-plugin-dialogs/issues/161


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-dialogs] TraktorBengan commented on issue #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs

Posted by GitBox <gi...@apache.org>.
TraktorBengan commented on issue #161:
URL: https://github.com/apache/cordova-plugin-dialogs/issues/161#issuecomment-1142367955

   Hi!
   
   Finally back home, I've googled a bit and used your example of code but I even forgot that I had removed the plugin..
   Now when I try to install the plugin again, I get this error. Been trying to google any solutions but theirs don't work for me.
   
   Any suggestions?
   
   `Olles-Air:ios olbu$ cordova plugin add cordova-plugin-dialogs
   Installing "cordova-plugin-dialogs" for ios
   config file config.xml requested for changes not found at /Users/olbu/minbil/platforms/ios/Min Bil/config.xml, ignoring
   Failed to install 'cordova-plugin-dialogs': Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('Parsing /Users/olbu/minbil/platforms/ios/Min Bil/config.xml failed')
       at new NodeError (node:internal/errors:372:5)
       at CordovaEventEmitter.emit (node:events:516:17)
       at CordovaEventEmitter.emit (/usr/local/lib/node_modules/cordova/node_modules/cordova-common/src/events.js:69:22)
       at new ConfigParser (/Users/olbu/minbil/node_modules/cordova-common/src/ConfigParser/ConfigParser.js:38:20)
       at Api.getPlatformInfo (/Users/olbu/minbil/platforms/ios/cordova/Api.js:201:28)
       at Api.addPodSpecs (/Users/olbu/minbil/platforms/ios/cordova/Api.js:346:38)
       at /Users/olbu/minbil/platforms/ios/cordova/Api.js:278:29
       at _fulfilled (/Users/olbu/minbil/node_modules/q/q.js:854:54)
       at /Users/olbu/minbil/node_modules/q/q.js:883:30
       at Promise.promise.promiseDispatch (/Users/olbu/minbil/node_modules/q/q.js:816:13)
   Unhandled error. ('Parsing /Users/olbu/minbil/platforms/ios/Min Bil/config.xml failed')`
   
   Also grabbed a screenshot if easier to read.
   
   ![Skärmavbild 2022-05-31 kl  18 36 21](https://user-images.githubusercontent.com/105824618/171227387-10776c7a-6713-4b97-88fe-0d25e2dd9dab.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-dialogs] TraktorBengan commented on issue #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs

Posted by GitBox <gi...@apache.org>.
TraktorBengan commented on issue #161:
URL: https://github.com/apache/cordova-plugin-dialogs/issues/161#issuecomment-1141862992

   Wow, Thank you breautek!
   
   I really appreciate you spending your time helping me. I honestly have no clue if I use the device ready event. If I recall correctly, I have never used this, I most likely removed all code from when creating the app and never heard about this event either.
   
   Like I said, huge thank you. I will try this later today, have a wonderful day.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-dialogs] breautek commented on issue #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #161:
URL: https://github.com/apache/cordova-plugin-dialogs/issues/161#issuecomment-1141452584

   Are you calling after the `deviceready` event?
   
   All cordova plugins cannot have their APIs called before the `deviceready` event has fired, e.g...
   
   ```javascript
   function alertDismissed() {
   // do something
   }
   
   document.addEventListener('deviceready', function () {
       navigator.notification.alert(
            'You are the winner!', // message
           alertDismissed, // callback
           'Game Over', // title
           'Done' // buttonName
   );
   });
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-dialogs] TraktorBengan commented on issue #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs

Posted by GitBox <gi...@apache.org>.
TraktorBengan commented on issue #161:
URL: https://github.com/apache/cordova-plugin-dialogs/issues/161#issuecomment-1141266918

   Bump, please help me


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-dialogs] TraktorBengan commented on issue #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs

Posted by GitBox <gi...@apache.org>.
TraktorBengan commented on issue #161:
URL: https://github.com/apache/cordova-plugin-dialogs/issues/161#issuecomment-1141451060

   I have followed this guide to install it etc: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html
   
   I am also trying to use this example below exactly in my code.
   
   `function alertDismissed() {
       // do something
   }
   
   navigator.notification.alert(
       'You are the winner!',  // message
       alertDismissed,         // callback
       'Game Over',            // title
       'Done'                  // buttonName
   );`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-dialogs] breautek commented on issue #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #161:
URL: https://github.com/apache/cordova-plugin-dialogs/issues/161#issuecomment-1141333864

   A deprecation just means that the code is no longer supported by the maintainer for the reason or another.
   
   Commonly Cordova has no choice but to use older deprecated methods in order to maintain support for older devices, so generally speaking, deprecation warnings can safely be ignored as long as it's not introducing runtime issues.
   
   In this particular case however, the replacement [UIAlertController](https://developer.apple.com/documentation/uikit/uialertcontroller) has been implemented in the SDK since iOS 8 so this code could be migrated to use the new alert classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-dialogs] TraktorBengan commented on issue #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs

Posted by GitBox <gi...@apache.org>.
TraktorBengan commented on issue #161:
URL: https://github.com/apache/cordova-plugin-dialogs/issues/161#issuecomment-1141436003

   Thank you breatuek!
   
   Do you know how I can continue?
   The plugin does not work even though you said it might. I do not have the knowledge to change to using the UIAlertController instead.
   
   Any tips or ideas?
   Thank you so much.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-dialogs] TraktorBengan commented on issue #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs

Posted by GitBox <gi...@apache.org>.
TraktorBengan commented on issue #161:
URL: https://github.com/apache/cordova-plugin-dialogs/issues/161#issuecomment-1141449382

   The plugin should allow me to create a promt or notification that pops up on the screen. In my case i want to press a button, then it should make a popup with some information and then press ok to continue. 
   
   The plug-in does not seem to work. You mentioned in a good scenario these errors could be ignored but I’m guessing the plug-in isn’t working due to the error message.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-dialogs] breautek commented on issue #161: 'UIAlertView' is deprecated when installing cordova-plugin-dialogs

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #161:
URL: https://github.com/apache/cordova-plugin-dialogs/issues/161#issuecomment-1141447292

   > The plugin does not work even though you said it might. 
   
   What about it doesn't work? We will need to know what you expect the plugin to do and what the plugin is actually doing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org