HTTP Get Request Error returning '{'isTrusted':true}'

Hi,
I have a question on HTTP Get Request. I use Google Places API to get a nearby search request using HTTP Service. It works perfectly for Android on the device, while running on IOS real device it results in error, when i try to log the JSON , it displays {“isTrusted:true”}. It also works well with the IOS emulator. Not sure on what i do is wrong in this.
Is it something to do with CORS error??

code for HTTP Request:

var results = this.http.get('https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=10.122,28.362&radius=500&type=restuarant&key=´Your_Key´');
      results.subscribe(
      data => 
      {  
        this.foundResults = data.json();
        console.log("json:",this.foundResults);     
      },
      err => {
          console.log('Json Stringify error:',JSON.stringify(err.json()));
      });  

On the console, i see the below comment.

Looking forward to hear more comments on this.
Regards
Suresh

1 Like

“error opening ws message” seems to indicate something to do with a WebSockets connection!? Does that ring a bell? Doesn’t seem to match your code you posted…

were you able to solve this? Encountering the same error on real iOS device, but everything works on simulator.

Try to clearly uninstall the app on your iOS device. Then rerun the app on you device and make sure the system ask you to confirm the app can use your cell/wifi data.

You can also check the privacy config in the iOS settings.

Did you remote debug the problem on the device already? Follow these instructions here to debug the problem in Safari dev tools: https://ionic.zone/debug/remote-debug-your-app#ios Look at the console and network tabs for errors.

remove the webkit plugin for ios only … it will start working