Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24484] iOS: Bundle images are copied to asset catalog when using app-thinning, causing apps to crash

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-03-29T21:14:41.000+0000
Affected Version/sRelease 6.0.2
Fix Version/sRelease 6.1.0
ComponentsiOS
Labelsapp-thinning, bundle, ios, qe-6.1.0
ReporterHans Knöchel
AssigneeHans Knöchel
Created2017-03-14T09:59:41.000+0000
Updated2017-04-04T16:00:12.000+0000

Description

I received [some reports](https://github.com/hansemannn/ti.googlemaps/issues/83#issuecomment-286364868) from users of my Ti.GoogleMaps module that are experiencing issues when using the <use-app-thinning> property together with bundle files that contain images [like here](https://github.com/hansemannn/ti.googlemaps/tree/master/ios/Resources). [The logs](https://gist.github.com/hansemannn/23922307da5a362049a0aa3edce25dc5) indicate that the bundle images are both copied to the bundle inside the app (correct) and the asset catalog (incorrect). The build should skip bundle images for the asset catalog I guess. Native apps would skip it as well, since the images are managed by the bundle. The fix should be done somewhere in copyResources, maybe with a regex like bundleFileRegExp = /.+\.bundle($|\n)/ that will only add the bundle to the resources, but not the images to the asset catalog.

Comments

  1. Hans Knöchel 2017-03-14

    PR: https://github.com/appcelerator/titanium_mobile/pull/8886 Test-case: * Create a new alloy-app from * Ensure that <use-app-thinning> is enabled (true) * Download the latest ti.googlemaps module from [here](https://github.com/hansemannn/ti.googlemaps/releases/tag/v3.3.1) * Include it in your app (<module>ti.googlemaps</module) * Run the app Expected behavior: * No crash! * The generated assets-catalog does not include the sha-hashes of the images inside the module bundles Note: If you want to see the map tiles, you also need a valid API-key, but that should not be required to see this fix.
  2. Josh Longton 2017-04-04

    Verified as fixed, the application does not crash and the bundle images are not added to the assets catalog. Tested on: {noformat} macOS Sierra 10.12.4 iPhone 6 (10.2.1). iPhone 5 (9.3.5) iOS simulator (10.2, 10.0) Ti SDK: 6.1.0.v20170401095755 ti.googlemaps: 3.3.1 Appc CLI: 6.1.0 Appc NPM: 4.2.9-1 Node v4.6.0 {noformat} *Closing Ticket.*

JSON Source