Dear Apple Community,
I am facing quite a hard issue in my React Native app that I do not know how to overcome. I have an app, that connects to "ANY" Mautic.org instance - You can think of it as Wordpress for marketing automation. And as each WordPress instance has it's own URL, the same goes for the Mautic. So at the beginning I am asking user for a URL that my app si supposed to be connected:
//previous code
<TextInput
value={instanceLink}
onChangeText={(text) => setInstanceLink(text.trim().toLowerCase())}
placeholder="Please insert instance link"
style={styles.input}
/>
//Code continues
The instance link value is stored in Expo Secure Store and used through the whole app. This works perfectly fine during development. The app saves this instance link and calls API without any issues:
//previous code
export const testConnection = async (
url: string
): Promise<{
status: boolean;
message: string;
fullResponseLog: Response | undefined;
}> => {
try {
const response: Response = await fetch(url);
// Code Continues
However, when build for production and used in TestFlight or Google Play - I am getting "network request failed" (for Fetch) or "Network Error" (for Axios). It seems this "dynamic url" is blocked somehow by App Stores policy and I could not find a solution for this problem.
Any ideas?
Are such dynamic links actually blocked by some policy?