dansiegel / Mobile.BuildTools

The Mobile.BuildTools makes it easier to develop code bases in a clean, consistent, secure, and configurable way. Determine at Build which environment your app needs to run on, and what Client Secrets it should have. Plus many more amazing features!
http://mobilebuildtools.com
MIT License
228 stars 29 forks source link

Issue with docs and setting App config and Manifest up #168

Closed jtorvald closed 3 years ago

jtorvald commented 3 years ago

Hi! Let me start by saying: thanks for this project. It seems that it will help me with my app environment and builds. Although the documentation looks extensive I'm missing some steps here and there. Maybe it's clear to everybody but me, but I though I write an issue and maybe someone can give me some pointers. Maybe I'm expecting something that it does not support. A link to the Gettings started/index.md from docs from the README would already help a lot. Or just add the docs TOC in the README.

Secrets

  1. I thought you could have 1 settings.json in the root of the solution, but this only seems to work within the project
  2. It also seems to user a namespace relative to the apps default namespace. Leaving namespace empty doesn't give me the expected result?
  3. Is it possible to have secrets per build config? secrets.debug.json secrets.release.json for example?

App Config What is needed to get this going? Do both of the nuget packages need to be installed in all projects (Xamarin Forms, iOS, Android)? I want app config in Xamarin forms, but when I add the packages there I don't get the Mobile.Configuration namespace available.

Manifest The documentation states that in development you can add a manifest.json to the project, but for me that does not seem to work. On both project or solution level.

buildttools.json: "manifests": { "token": "$", "variablePrefix": "Manifest_", "missingTokensAsErrors": true, "disable": false },

In manifest.json in iOS project: { "BundleName" : "Test", }

Info.plist: $BundleIdentifier$ Error: Info.plist: Error: Project bundle identifier '$BundleIdentifier$' does not match specified provisioning profile

dansiegel commented 3 years ago

are you using v1 or v2?

jtorvald commented 3 years ago

@dansiegel sorry, wanted to mention but I forgot: v2

dansiegel commented 3 years ago

on the Manifest... this feature is still being worked on... I believe it's partially working for Android right now in the CI feed, iOS I'll probably get to in the next week or so.

in the current preview on NuGet.org there are some bugs with the config getting generated in the wrong directory if you have more complex directory structures... again that's been fixed in the CI feed.

For app.config you need both packages installed. The Mobile.BuildTools contains the build steps that are required, and the Mobile.BuildTools.Configuration contains the actual library reference you need. As I recall there was an issue when I released the preview that caused the Mobile.BuildTools.Configuration package to get added incorrectly, you may need to update the csproj to remove any properties besides Include and Version on the PacakgeReference for it.

Hope that answers your questions...

jtorvald commented 3 years ago

@dansiegel thanks for the quick reply. I will patiently wait for a new version then for the other stuff and try the configuration again. Keep up the good work!