ionic-team / trapeze

The mobile project configuration toolbox. Manage native iOS, Android, Ionic/Capacitor, React Native, and Flutter apps through a simple YAML format.
https://trapeze.dev
Other
328 stars 40 forks source link

Plist & Entitlements have different replace syntax in YAML file #193

Closed selcuk-sahin closed 1 year ago

selcuk-sahin commented 1 year ago

Problem:

on the plist entry, we are using - before replace, but on the entitlements we don't use it. It would be easier to grasp if both follow the same syntax, since both edits plist files.

        plist:
          - replace: true 
            entries:
            - CFBundleDisplayName: $APP_NAME
          - FacebookAppID: $FACEBOOK_APP_ID

        entitlements:
          replace: true 
          entries:
          - com.apple.developer.associated-domains: ["applinks:$WEBSITE_HOST_NAME", "applinks:$DYNAMIC_LINK_HOST_NAME"]
          - com.apple.security.application-groups: ["group.$BUNDLE_ID.onesignal"]
mlynch commented 1 year ago

Thanks for the suggestion. It's probably not going to happen because of the way these operations expect to be used. plist can modify arbitrary plist files, so it makes more sense to have them be an array of plist operations. entitlements is meant to be used once, for the entitlements for the specified target, and the file it operates on is computed internally. Yes, both are plist files, but the way they operate is different.