$ http.get does not work on IOs with IONIC

0

Simple as the title suggests:

I have a development made in IONIC 1 where it executes correctly "$ http.get", works perfect for Android, but not for IOs, it just does not throw any errors just does not execute "$ http.get".

The code portion is:

$http.get("http://www.paginaquedireccionafuncionabien")
    .success(function (response) {
        $scope.libroPrimero = response.records; 
    }, function(err) {
       console.error('ERR', err);
});

For Android this execution works well, but not for IOs, without throwing any errors, it seems that it would not execute it directly.

In the config.xml, among other statements, I have:

 <access origin="*"/>

This is my config.xml file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget android-versionCode="3" id="ID" 
version="0.0.3" xmlns="http://www.w3.org/ns/widgets" 
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>CPP Mendoza</name>
<description>
    descripcion
</description>
<author email="mail" href="paginaweb">
  nombreautor
</author>
<content src="index.html"/>
<access origin="*"/>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="SplashScreenDelay" value="5000"/>
<preference name="FadeSplashScreenDuration" value="1500"/>
<preference name="android-minSdkVersion" value="16"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashScreen" value="screen"/>
<preference name="ShowSplashScreenSpinner" value="true"/>
<preference name="orientation" value="portrait"/>
<feature name="StatusBar">
  <param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
<platform name="android">
<icon src="resources\android\icon\drawable-ldpi-icon.png" density="ldpi"/>
<icon src="resources\android\icon\drawable-mdpi-icon.png" density="mdpi"/>
<icon src="resources\android\icon\drawable-hdpi-icon.png" density="hdpi"/>
<icon src="resources\android\icon\drawable-xhdpi-icon.png" density="xhdpi"/>
<icon src="resources\android\icon\drawable-xxhdpi-icon.png" 
density="xxhdpi"/>
<icon src="resources\android\icon\drawable-xxxhdpi-icon.png" 
density="xxxhdpi"/>
<splash src="resources\android\splash\drawable-port-ldpi-screen.png" 
density="port-ldpi"/>
<splash src="resources\android\splash\drawable-port-mdpi-screen.png" 
density="port-mdpi"/>
<splash src="resources\android\splash\drawable-port-hdpi-screen.png" 
density="port-hdpi"/>
<splash src="resources\android\splash\drawable-port-xhdpi-screen.png" 
density="port-xhdpi"/>
<splash src="resources\android\splash\drawable-port-xxhdpi-screen.png" 
density="port-xxhdpi"/>
<splash src="resources\android\splash\drawable-port-xxxhdpi-screen.png" 
density="port-xxxhdpi"/>
</platform>
<platform name="ios">
<allow-intent href="*" />
<icon src="resources\ios\icon\icon.png" width="57" height="57"/>
<icon src="resources\ios\icon\[email protected]" width="114" height="114"/>
<icon src="resources\ios\icon\icon-40.png" width="40" height="40"/>
<icon src="resources\ios\icon\[email protected]" width="80" height="80"/>
<icon src="resources\ios\icon\[email protected]" width="120" height="120"/>
<icon src="resources\ios\icon\icon-50.png" width="50" height="50"/>
<icon src="resources\ios\icon\[email protected]" width="100" height="100"/>
<icon src="resources\ios\icon\icon-60.png" width="60" height="60"/>
<icon src="resources\ios\icon\[email protected]" width="120" height="120"/>
<icon src="resources\ios\icon\[email protected]" width="180" height="180"/>
<icon src="resources\ios\icon\icon-72.png" width="72" height="72"/>
<icon src="resources\ios\icon\[email protected]" width="144" height="144"/>
<icon src="resources\ios\icon\icon-76.png" width="76" height="76"/>
<icon src="resources\ios\icon\[email protected]" width="152" height="152"/>
<icon src="resources\ios\icon\[email protected]" width="167" height="167"/>
<icon src="resources\ios\icon\icon-small.png" width="29" height="29"/>
<icon src="resources\ios\icon\[email protected]" width="58" height="58"/>
<icon src="resources\ios\icon\[email protected]" width="87" height="87"/>
<splash src="resources\ios\splash\Default-568h@2x~iphone.png" width="640" 
height="1136"/>
<splash src="resources\ios\splash\Default-667h.png" width="750" 
height="1334"/>
<splash src="resources\ios\splash\Default-736h.png" width="1242" 
height="2208"/>
<splash src="resources\ios\splash\Default-Portrait@2x~ipad.png" width="1536" 
height="2048"/>
<splash src="resources\ios\splash\Default-Portrait~ipad.png" width="768" 
height="1024"/>
<splash src="resources\ios\splash\Default@2x~iphone.png" width="640" 
height="960"/>
<splash src="resources\ios\splash\Default~iphone.png" width="320" 
height="480"/>
</platform>
<platform name="wp8">
<icon src="resources\wp8\icon\ApplicationIcon.png" width="99" height="99"/>
<icon src="resources\wp8\icon\Background.png" width="159" height="159"/>
<splash src="resources\wp8\splash\SplashScreenImage.png" width="768" 
height="1280"/>
</platform>
<icon src="resources\android\icon\drawable-xhdpi-icon.png"/>
<plugin name="cordova-plugin-device" spec="~1.1.2"/>
<plugin name="cordova-plugin-inappbrowser" spec="~1.7.1"/>
<plugin name="cordova-plugin-network-information" spec="~1.3.2"/>
<plugin name="cordova-plugin-splashscreen" spec="~3.2.2"/>
<plugin name="cordova-plugin-statusbar" spec="~2.1.3"/>
<plugin name="cordova-plugin-whitelist" spec="~1.2.2"/>
<plugin name="cordova-plugin-x-socialsharing" spec="~5.1.8"/>
<plugin name="es6-promise-plugin" spec="~4.1.0"/>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
</widget>

Do you know how I can do for IOs to take me the "$ http.get"?

Thanks

    
asked by Alan Nexus 23.08.2017 в 03:24
source

1 answer

1

For the get to work you have to allow the navigation using the directive

<allow-navigation href="*" />

in the config.xml.

    
answered by 23.08.2017 в 10:54