Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25032

iOS: Resolve asset-catalog hashes back to real names, fail build when detecting duplicates

    Details

      Description

      As discussed during engineering week, we should step away from generating custom asset-image hashes and instead use the real name. Here are some reasons I had:

      • Custom hashes make it extremly uggly to deal with custom storyboards that include images / icons. This is very common, since storyboards should show an empty UI state, that can have tab-icons in it. I've made one for a customer last year and it took me double the time dealing with hashes than implementing a full split-view storyboard
      • Custom hashes cannot be used in Hyperloop. There could be utility-methods for it, but that attacks performance again when working with a larger number of images to process
      • Custom hashes cannot be used in native module. Same struggle than above. For the Ti.AlternateIcon module, I needed to basically copy and paste half of our TiFilesystem API's into the module to generate the hashes.
      • The only contra-point is that a developer might have an image in different directories that has the same name. Besides the fact that no one should ever do that anyway, I don't think anyone actually does. At least I didn't do in 50+ Titanium apps.

      So what do we need to change?

      • Remove the hash-generator from our iOS build
      • Loop through the images to detect possible filename-duplicates. Throw error if any matches.
      • Remove the hash-bridge in our Titanium core
      • Add a note in the release-notes, so people having custom hashes right now can migrate

      That's it!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vijaysingh Vijay Singh
                Reporter:
                hknoechel Hans Knöchel
              • Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-10940
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code