To use Compiler Directives configure directives for each Build Configuration in Xamarin / Visual Studio
White Label Api Access Compiler Directives

Then add a ApiAccountSettings file to the PCL Project


You can now use the two constants when connecting to the API

  • Username
  • Password


This is our second favourite option. The difficulty in refactoring, or reliably adding new constants is our biggest issue with it