Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28480

How to create an app with the react-native-generator for a locally running api and connect to it in the emulator?

$
0
0

first I have to say I'm new to api-platform.com.

I followed the getting started documentation and downloaded, unziped and started api platform with docker and created my own entities. There were no problems. Afterwards I wanted to create an smartphone app with the react-native-generator. I got an error message due to TLS certificate. With set NODE_TLS_REJECT_UNAUTHORIZED=0 I could create the app anyway. When I execute the app in the Android emulator I always get the message "Network request failed" even if I can call the api in the Android Chrome browser with the same url from entrypoint.js.

Now to my questions:

  1. is it still possible to access the api with http?
  2. how to correctly create a react-native app with the generator for the locally running api?
  3. do i have to deploy the api in production first so i can create and run the app or how do i have to do this?

Note: On the host (where docker and the emulator are running) I don't have access to the api with http://localhost:8080/api or http://localhost:8000/api at all. As I saw in the source code, there was a change in the configuration that redirects everything to https.

Thanks and Regards


Viewing all articles
Browse latest Browse all 28480

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>