Version tested:
  • Sencha Cmd 3.0.0.250
  • Sencha Touch 2.1.0 GPL
Description:

Entries in the "appCache" section of the app.json file in a Senche Touch project are meant to be included in file cache.appcache that is generated when doing a production build. This does not work correctly if characters like spaces are part of the given entries.

Steps to reproduce the problem:


Add a path with special characters to the appCache section in your app.json file, create a production build, and try to use that build offline. Example entry in app.json:
Code:
    "appCache": {
        "cache": [
            "lib/CryptoJS v3.0.2/rollups/sha256.js"
        ]
The result that was expected:
Code:
CACHE MANIFEST
# 014d2f8abd9c21670242d020b55b93de08b284a8
lib/CryptoJS%20v3.0.2/rollups/sha256.js

The result that occurs instead:
Code:
CACHE MANIFEST
# 014d2f8abd9c21670242d020b55b93de08b284a8
lib/CryptoJS v3.0.2/rollups/sha256.js
Possible fix:

Paths should be URI encoded when putting them into the appcache file. For Sencha Touch this may be achieved by changing function writeAppCache, line 704 in <Path to Sencha Cmd Installation>\Sencha\Cmd\3.0.0.250\plugins\touch\current\app-build.js

from
Code:
    builder.append(cache.uri + "\n");
to
Code:
    builder.append(encodeURI(cache.uri) + "\n");