Skip to content

Lacking details for how to use App Settings #272

@MShekow

Description

@MShekow

Description

The manual for App settings (this one) contains obvious errors and also lacks instructions on how to actually use app settings. You have internalized your library so much that you no longer realize what other people (who encounter Mobile.BuildTools for the first time) don't yet know ;).

From reading the (incomplete) docs, this is what I've tried to use App settings (without success - no Helper class is generated, and I cannot use it from my code):

  1. Create a appsettings.json file in the root of my shared netstandard project (I'm assuming this location, because the sentence here just stops... "The Mobile.BuildTools is smart, we look for the appsettings.json in the p" ... what is a "p"? ;)
  2. Create a buildtools.json file in the same project's root (again, assuming...) with some content. The manual sometimes uses "appSettings" and sometimes "projectSecrets" as root key, I'm not sure which one I should use.
  3. Add Mobile.BuildTools and Mobile.BuildTools.Configuration nuget packages to my shared project

For testing, my buildtools.json file has this as content (where I am not sure if the AwesomeApp part is an arbitrary string, or if it relates to something in my code base):

{
  "$schema": "https://mobilebuildtools.com/schemas/v2/buildtools.schema.json",
  "appSettings": {
    "AwesomeApp": [
      {
        "properties": [
          {
            "name": "AppCenterAppId",
            "type": "String"
          }
        ]
      }
    ]
  }
}

I reckon I need to create additional files to tell MSBuild to actually generate something.

Disclaimer: I'm rather new to the C# and Xamarin world.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions