This call works well on Android (device and emulator), work on all browsers (chrome, firefox and safari), but return null in iOS device. What can be the issue? Note:my.api.com points to a self made jax-rs 2.0 api and there is no error. I have also added cordova whitelist plugin
I have a high value of timeout because i wanted to see if the request was timed out before the response was present
Thank you !!!
You might need to add some settings to the IOS app .plist. By default iOS (since iOS 9) can now only communicate via https due to Application Transport Security. In the future it will be mandatory for all apps in store.
I suggest a dumb idea, because I had that a lot while coding this week, async issue?
I never used ionic v1, but you can try to define the value of #item in template view to null or ‘’ in the controller, before the template try to access/change it?
page.ts
market: any = '';
// .. before the
constructor{
things..
}
What do you have as input from API if you do a map=>res(json) or stg like that? Looks like you get an object that is not “unwrapped”. And if you get an “unfolded/unwrapped” object, it will forever display “undefined” in template.
Yes. As it prints the error i copy the url and test in safari browser, it works well, i have the same project in an Android device, and it passes well, I have the good result. But in IOS it doesn’t work.
Nothing to do with a CORS issue specific to Safari? No HTTP error code like forbidden? (403) Is your app in production and validated on one app store not the other?
No, it prints the good result in the browser. I’ve read about ATS security applied in ios10 which can be the source of this behavior and I don’t know how to apply to my case as i have a public IP address with port.
Ah! I read something about that for ionic native and ios9/10 fix… this was on the forum several monthes ago, but which topic no idea sorry If I remember, it said yeah that since ios9/10 CORS has been reinforced, dig a bit maybe.