CORS issue in Phone and Safari

I am using Ionic2 to create my first app. Used WordPress REST API for data. Everything seems to be working fine in android and Chrome. However everytime I install the app in iPhone or in Safari, It returns me following error:

“denied by Cross-Origin Resource Sharing policy: Origin http://localhost:8100 is not allowed by Access-Control-Allow-Origin.”

I have tried to add “” but still it keeps sending me error. Please help.