0

Tengo un código en la página de inicio de una app para iOS, desarrollada con phonegap/cordova, que después de unas comprobaciones de valores en el localstorage, ejecuta la carga de otra página html con el código

$.mobile.changePage("./configuracion.html?_1="+ (new Date()).getMilliseconds());

En la apk para android que genero funciona sin problema, pero para la versión iOS, se queda en la primera página y no redirecciona, no ejecuta el changePage. Tampoco devuelve error, y los console.log que ponga, los imprime correctamente, incluso uno que sitúe después de esa línea.

Ese mismo código en apps con versiones antiguas de iOS estuvo funcionando bien.

Log de simulador iOS:

2021-03-12 10:07:53.000939+0100 Cuidem EV[3199:112299] Apache Cordova native platform version 6.2.0 is starting.
2021-03-12 10:07:53.001056+0100 xxxEV[3199:112299] Multi-tasking -Device: YES, App: YES
2021-03-12 10:07:53.009285+0100 xxxEV[3199:112299] Could not load the "LaunchStoryboard" image referenced from a nib in the bundle with identifier "com.xxx.xxx"  
2021-03-12 10:07:53.136729+0100 xxxEV[3199:112299] The preference key "AllowNewWindows" is not defined and will default to "FALSE"  
2021-03-12 10:07:53.137554+0100 xxxEV[3199:112299] The preference key "MediaPlaybackAllowsAirPlay" is not defined and will default to "TRUE"  
2021-03-12 10:07:53.141743+0100 xxxEV[3199:112299] The preference key "AllowBackForwardNavigationGestures" is not defined and will default to "FALSE"  
2021-03-12 10:07:53.141827+0100 xxxEV[3199:112299] The preference key "Allow3DTouchLinkPreview" is not defined and will default to "TRUE"  
2021-03-12 10:07:53.141907+0100 xxxEV[3199:112299] CDVWebViewEngine will reload WKWebView if required on resume 
2021-03-12 10:07:53.141976+0100 xxxEV[3199:112299] Using WKWebView  
2021-03-12 10:07:53.142455+0100 xxxEV[3199:112299] [CDVTimer][console] 0.202060ms  
2021-03-12 10:07:53.142606+0100 xxxEV[3199:112299] [CDVTimer][handleopenurl] 0.050068ms  
2021-03-12 10:07:53.143358+0100 xxxEV[3199:112299] Unlimited access to network resources  
2021-03-12 10:07:53.143516+0100 xxxEV[3199:112299] [CDVTimer][intentandnavigationfilter] 0.795007ms  
2021-03-12 10:07:53.143638+0100 xxxEV[3199:112299] [CDVTimer][gesturehandler] 0.028014ms  
2021-03-12 10:07:53.144098+0100 xxxEV[3199:112299] [CDVTimer][inappbrowser] 0.380993ms  
2021-03-12 10:07:53.144170+0100 xxxEV[3199:112299] [CDVTimer][TotalPluginStartup] 1.983047ms 
2021-03-12 10:07:53.213807+0100 xxxEV[3199:112299] WF: === Starting WebFilter logging for process Cuidem EV  
2021-03-12 10:07:53.213911+0100 xxxEV[3199:112299] WF: _userSettingsForUser : (null)  
2021-03-12 10:07:53.213991+0100 xxxEV[3199:112299] WF: _WebFilterIsActive returning: NO  
2021-03-12 10:07:53.367485+0100 xxxEV[3199:112299] IAB.close() called but it was already closed. 
2021-03-12 10:07:53.641744+0100 xxxEV[3199:112299] BuildInfo packageName    : "com.xxx.xxx"  
2021-03-12 10:07:53.641849+0100 xxxEV[3199:112299] BuildInfo basePackageName: "com.xxx.xxx"  
2021-03-12 10:07:53.641907+0100 xxxEV[3199:112299] BuildInfo displayName    : "xxxEV"  
2021-03-12 10:07:53.641978+0100 xxxEV[3199:112299] BuildInfo name           : "xxxEV"  
2021-03-12 10:07:53.642053+0100 xxxEV[3199:112299] BuildInfo version        : "1.0"  
2021-03-12 10:07:53.642121+0100 xxxEV[3199:112299] BuildInfo versionCode    : "1.0"  
2021-03-12 10:07:53.642183+0100 xxxEV[3199:112299] BuildInfo debug          : YES  
2021-03-12 10:07:53.642245+0100 xxxEV[3199:112299] BuildInfo buildType      : ""  
2021-03-12 10:07:53.642309+0100 xxxEV[3199:112299] BuildInfo flavor    : ""  
2021-03-12 10:07:53.654126+0100 xxxEV[3199:112299] chequeoinicial 2  
2021-03-12 10:07:53.654305+0100 xxxEV[3199:112299] A2  
2021-03-12 10:07:53.654432+0100 xxxEV[3199:112299] A3  
2021-03-12 10:07:53.654565+0100 xxxEV[3199:112299] lenguaje es  
2021-03-12 10:07:53.654671+0100 xxxEV[3199:112299] A10  
2021-03-12 10:07:53.654777+0100 xxxEV[3199:112299] A11  
2021-03-12 10:07:53.654905+0100 xxxEV[3199:112299] b  
2021-03-12 10:07:53.655046+0100 xxxEV[3199:112299] A13-1

cordova plugin ls

cordova-plugin-buildinfo 1.1.0 "BuildInfo"
cordova-plugin-camera 5.0.1 "Camera"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-dialogs 2.0.2 "Notification"
cordova-plugin-geolocation 4.1.0 "Geolocation"
cordova-plugin-inappbrowser 5.0.0 "InAppBrowser"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-splashscreen 6.0.0 "Splashscreen"
cordova-plugin-vibration 3.1.1 "Vibration"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova.plugins.diagnostic 3.6.2 "Diagnostic"

Installed platforms: android 9.0.0 ios 6.2.0

xCODE Version 12.4 (12D4e)

¿Qué puede ocasinar que no ejecute el cambio de página?

1 respuesta 1

0

He solucionado este problema añadiendo en el config.xml las siguientes líneas:

<preference name="scheme" value="app" />
<preference name="hostname" value="localhost" />

Según la web oficial de cordova, desde el 20 de abril es necesario incluirlo.

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.