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
322 stars 39 forks source link

feat: generate for pwa apple-app-site-association #65

Open reslear opened 2 years ago

reslear commented 2 years ago

hi @mlynch i'm suggest add feature for generate pwa /.well-known/apple-app-site-association example:

vars:
  BUNDLE_ID:
    default: io.ionic.wowzaStarter
  PACKAGE_NAME:
    default: io.ionic.wowzaStarter
  TEAM_ID:
    default: MMR96SV2R9

platforms:
  ios:
    targets:
      App:
        entitlements:
          - com.apple.developer.associated-domains:
            - applinks:app.$(DOMAIN)
  pwa:
    apple-app-site-association:
        path: ./public/.well-known/apple-app-site-association
        content:    
            applinks:
                apps: []
                details:
                    - appID: $(TEAM_ID).$(BUNDLE_ID)
                paths:
                    - '*'

output public/.well-known/apple-app-site-association :

{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "MMR96SV2R9.io.ionic.wowzaStarter",
        "paths": [
          "*"
        ]
      }
    ]
  }
}

or is it better to suggest this feature to https://github.com/ionic-team/capacitor-assets ?

mlynch commented 2 years ago

This seems very reasonable. I'd probably lump this under the json support I shipped recently but this reminds me we need a pwa platform