dansiegel / dansiegel/Mobile.BuildTools

Lacking details for how to use App Settings

Open
#272 25 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C#
Stars
224
Forks
28
PR merge metrics
No merged PRs in 30d

Description

# Description

The manual for App settings ([this one](https://mobilebuildtools.com/config/appsettings/)) 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](https://mobilebuildtools.com/config/appsettings/#using-the-appsettingsjson) 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](https://mobilebuildtools.com/config/appsettings/configuration/) 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.