I have a Xamarin Forms application and I've been using AppCenter to build and distribute my app.
This app connects to an external API, that has QA / Dev environments. To change the API URL, I've created a pre-build script on AppCenter and put it in the root of each project (iOS / Android). In the AppCenter, it identifies the pre-build script, but it seems to not be executed (I couldn't see in the Output logs any of the Echo messages of the script).
The script is quite similar to this, but my "AppConstant" class is inside a Helper folder in the Shared Project and I'm getting the path of this class like this: APP_CONSTANT_FILE=$APPCENTER_SOURCE_DIRECTORY/Root/Root/Root/Helpers/Endpoints.cs
and I have added at the top of the script an echo "Running pre-build bash script..."
to at least display something to make sure the script was executed, but nothing =/
The reason for adding Root/Root/Root is because of this comment and I have created the Environment Variable on AppCenter too.
I couldn't see any issues so far, could anybody give me a hand on that?
I could find out why the script was not being executed. It was because of the Encoding of the shell script file.
I had created the file in a Windows computer and I read that App Center runs the script in a UNIX environment (I could see some strange characters in the Output Log), so I created from scratch the file in a Mac computer and App Center started to execute.