Mobile.BuildTools icon indicating copy to clipboard operation
Mobile.BuildTools copied to clipboard

Environment variables are not replaced in resulting Info.plist

Open ondrejnovotny opened this issue 4 years ago • 3 comments

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

  • OS: [Windows 10|
  • IDE: [VS2019|
  • BuildTools Version: [2.x.x]
  • IDE Version: [16.11.3]
  • Build Target Framework: [netstandard2.0|Xamarin.iOS|

ondrejnovotny avatar Sep 17 '21 14:09 ondrejnovotny

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.

ondrejnovotny avatar Sep 27 '21 17:09 ondrejnovotny

@ondrejnovotny have u managed to find a solution?

themronion avatar Dec 03 '21 10:12 themronion

@ondrejnovotny have u managed to find a solution?

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

ondrejnovotny avatar Dec 03 '21 10:12 ondrejnovotny