I have just generated a release APK of my React Native app and installed it in my device but it seems not being able to communicate with my API. If I run it through CLI using [react-native run-android] everything works fine but when it comes to the generated APK I can't even authenticate in the app.
I don't know if it has something to do with Secure Sockets Layer or even cors. I'll be pleased if you guys could help me out with it.
That's my app config:
import express from 'express';
import cors from 'cors';
import routes from './routes';
import './database';
class App {
constructor() {
this.server = express();
this.middlewares();
this.routes();
}
middlewares() {
this.server.use(cors());
this.server.use(express.json());
}
routes() {
this.server.use(routes);
}
}
export default new App().server;
Context Information: APK installed in Galaxy S10 (android 10)