Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12668

support arbitrary creation of resources in the Asset Catalog

    XMLWordPrintableJSON

Details

    Description

      A handful of plugins* recommend the use of an image/asset out of the Asset Catalog. It would be great if we could create those just by setting tags in config.xml, similar to <icon> and <splash> that then generate the resource in Xcode.

      My specific use case is to add a "back" image to be used by 'cordova-plugin-themeablebrowser'. I can do this manually by:

      • opening xCode
      • Click on Project -> Resources -> Image.xcassets
      • Click '+' in the bottom task bar -> New Image Set
      • Rename the new Set 'back'
      • Manually drag and drop 3 images into xcode

      To be clear - I'm not asking that cordova produce different sized images as I believe that's out of scope. I just need it to build the new resource in xcode referencing certain files on disk with tags like:

      <platform name='ios'>
        <resource name='back' src='my_resources/back@1x.png' target='1x' />
        <resource name='back' src='my_resources/back@2x.png' target='2x' />
        <resource name='back' src='my_resources/back@3x.png' target='3x' />
      </platform>
      

      *Bonus!*
      It'd be extra great, since I'm sure some folks want this, if cordova could add sound files to be used by firebase/push plugins that can leverage those if they exist, but I'm not sure how those get set up in xcode such that phonegap-plugin-push can use them.

      Attachments

        Activity

          People

            Unassigned Unassigned
            josh.m.sharpe@gmail.com Josh Sharpe
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: