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

Environment variables are not replaced in resulting Info.plist #287

Open ondrejnovotny opened 3 years ago

ondrejnovotny commented 3 years ago

Description

Environment variables are not replaced in Info.plist I bet it is related to #284

Reproduction Steps

  1. Create new Xamarin.Forms app
  2. Install Mobile.BuildTools (leave default buildtools.json)
  3. Define

"environment": { "defaults": { "AppId": "com.something.not.working" } },

  1. Set to Debug, Simulator
  2. Build

Expected Behavior

Variable $AppId$ is replaced with "com.something.not.working" in "\obj\iPhoneSimulator\Debug\mbt" folder

Actual Behavior

Variable is not replaced

Environment

ondrejnovotny commented 3 years ago

Hi, I tried the build on DevOps and I am getting:

Info.plist : error : Project bundle identifier '$AppId$' does not match specified provisioning profile ...

Is this related to this issue? I have $AppId$ in plist as well as in AndroidManifest (Android build works).

In build log I see

HandleTokenizedInfoPlist: Replacing token 'AppDisplayName'. Replacing token 'AppId'.

The configuration is same as described in this issue. Does someone have a working build task in DevOps for iOS? If there is a workaround, please advise.

Thank you for help.

themronion commented 2 years ago

@ondrejnovotny have u managed to find a solution?

ondrejnovotny commented 2 years ago

@ondrejnovotny have u managed to find a solution?

No, I ended up replacing all the manifestes in pre-build events.