IonAppId getting set to 0 in AppFlow builds

I tried to open a ticket but it always fails… so here I go.

We moved to Capacitor recently and as part of that process we added trapeze to our build process so that we set the correct build variables when the app gets built in AppFlow:

vars:
    CI_APP_ID:
       default: "(omitted)"

Then later in the file:

platforms:
    ios:
        targets:
            App:
                plist:
                    - replace: true
                      entries:
                        - IonAppId: $CI_APP_ID

The rest of the variables: IonChannelName, and IonUpdateMethod get properly set but IonAppId gets set to <real>0.0</real> no matter what we do/change.

We run it during appflow:build:

"appflow:build": "if test \"$CI_PLATFORM\" != \"web\"; then npx trapeze run config.yaml -y --$CI_PLATFORM; fi; npm run build",

While this runs after:

npx cap sync

Could this be re-setting the value somehow as part of the Cordova operations?

OK I did a build and had it forgo the Native Config:

The output is now different:

    <key>IonAppId</key>
    <real>+infinity</real>

Looks like a bug in Trapeze?

Ah, OK. Turns out it was an issue with Trapeze: PList converting string values to integer · Issue #117 · ionic-team/trapeze · GitHub

Adding the correct type fixed the issue:

CleanShot 2023-09-06 at 12.49.27@2x

Guess the fact that parseFloat($appId) just happened to equal Infinity was the issue.