apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 987 forks source link

Cordova is not working on iPad iOS 13 and 14 #1138

Closed mattprado21 closed 2 years ago

mattprado21 commented 2 years ago

Bug Report

Cordova is not working on iPad iOS 13+. I tested the build files on different iOS versions both iPad and iPhone. All are working properly except iPad 13+.

Problem

I have been building my application using monaca localkit with the following versions iOS Platform: 6.20 Xcode: 12.2 Cordova: 10(latest)

What is expected to happen?

To be able to use cordova plugins inside the applications.

What does actually happen?

I'm currently using cordova plugins for saving file (cordova-plugin-file) but I'm having an error on getting file directory because cordova is not working and undefined.

Command or Code

In order to determine that its actually cordova that has the issue. I have this on my App.vue, onDeviceReady()

if (typeof cordova !== 'undefined') {
     this.$ons.notification.prompt("Cordova is working!");
} else {
      this.$ons.notification.prompt("Cordova is not working!");
}

Prompt "Cordova is not working" only displays on iPad iOS 13 and 14

Environment, Platform, Device

iPad iOS 13 to 14

Version information

iOS Platform: 6.20 Xcode: 12.2 Cordova: 10(latest) Monaca Localkit

Checklist

emccorson commented 2 years ago

Since you are using Monaca, the problem may be the version of monaca-component-cordova-loader, which is the JS component that loads Cordova into your app.

I experienced the same problem when using v1.0.0 and solved it by upgrading to v1.0.4.

I'm not sure how to do this in Localkit, but in Monaca Cloud IDE, you can upgrade the component by going to Configure -> JS/CSS Component Settings and clicking 'Remove' at 'Cordova (PhoneGap) Loader'. Then click 'Add' to add it again and select v1.0.4.

mattprado21 commented 2 years ago

Thank you so much @emccorson ! It really solved my problem!