This repo is a demo for how to avoid CORS restrictions imposed on hybrid apps by ios. I chose to use the YELP api since it is one of the few public API with CORS restrictions
The app avoids CORS restrictions by using cordova-plugin-advanced-http and linking a fetch implemetation of the plugin to Apollo graphql client.
- Install the Ionic CLI if you dont it installed.
npm install -g @ionic/cli npm install- Get a Yelp API key
- Create a
.envfile in the root of the project and add the yelp API key asREACT_APP_YELP_API_KEY=youryelpapikey
ionic cap syncionic cap open iosThis will open the project in xcode- Select your target simulator and hit the play button to run
