1. #1
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Answers
    6
    Vote Rating
    7
    Kikketer is on a distinguished road

      0  

    Default Answered: app.json CSS property not refreshing

    Answered: app.json CSS property not refreshing


    I've upgraded my application from 2.2 to 2.3 just today, and wanted to test out the new iOS7 theme. It seems the app.json file for my project has no effect on the theme of the app when using the "?platform=XYZ" parameter.

    My app.json looks like this:
    Code:
        "css": [
            {
              "path": "resources/css/ios7.css",
              "platform": ["ios"],
              "update": "delta",
              "Theme": "Apple"
            },
            {
              "path": "resources/css/wp.css",
              "platform": ["ie10"],
              "update": "delta",
              "Theme": "Windows"
            },
            {
              "path": "resources/css/base.css",
              "platform": ["base"],
              "update": "delta"
            },
            {
                "path": "resources/css/app.css",
                "platform": ["chrome", "safari", "android", "firefox", "ie10"],
                "update": "delta"
            }
        ],
    The config looks fine (but this isn't working, ios is returning default sencha theme), the "ios7.css" was generated from the scss files using:
    Code:
    @import 'sencha-touch/cupertino';
    @import 'sencha-touch/cupertino/all';
    When I use "?platform=ios", I still get the default sencha-touch theme. I've cleared my cache and history, and watched the network traffic, it's still in fact pulling the app.css and not the ios7.css. I've even checked what the app.json file looks like when requesting it through the server, and it is showing the latest changes.

    When I modify the app.json even further:
    Code:
            {
              "path": "resources/css/wp.css",
              "platform": ["ios"],
              "update": "delta",
              "Theme": "Apple"
            },
            ....
    The "wp.css" is not pulled again, it simply pulls the default sencha-touch theme (app.css).

    Is this a defect with 2.3? Is it because of the upgrade? Has something changed with the app.json in 2.3?
    Last edited by Kikketer; 1 Oct 2013 at 11:29 AM. Reason: cleared up a little strange wording

  2. After lots of messing around I found that the Sencha CMD was able to do what I needed:
    Code:
    sencha app refresh
    So yes, I was missing a minor step. I honestly don't remember having to do this previously.

  3. #2
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Answers
    6
    Vote Rating
    7
    Kikketer is on a distinguished road

      0  

    Default


    So I started a new project, thinking it was the upgrade. Nope...
    I was able to mess around with the .scss file of a fresh new app to change the "default" to "cupertino" and it worked!

    The instant I tried to change the .css file in the app.json, it didn't update the app:
    Code:
        "css": [
            {
                "path": "resources/css/ios7.css",
                "update": "delta"
            }
        ],
    ios7.css was generated with this ios7.scss (which worked when it was in app.scss):
    Code:
    @import 'sencha-touch/cupertino';
    @import 'sencha-touch/cupertino/all';
    It feels like I need to do something with sencha cmd to make the app.json update the code... am I simply missing a step?

  4. #3
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Answers
    6
    Vote Rating
    7
    Kikketer is on a distinguished road

      0  

    Default


    After lots of messing around I found that the Sencha CMD was able to do what I needed:
    Code:
    sencha app refresh
    So yes, I was missing a minor step. I honestly don't remember having to do this previously.

  5. #4
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,879
    Answers
    326
    Vote Rating
    128
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default


    Thanks for sharing your solution. As a rule a thumb sencha app refresh is needed to update your apps metadata any time you edit your app.json.
    Get more personalized support via a support subscription.

    Want to learn Sencha Touch 2? Check out
    Sencha training
    Sencha Touch in Action

    Need more help with your app? Hire Sencha Services services@sencha.com

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  6. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    86
    Vote Rating
    4
    karazy is on a distinguished road

      0  

    Default


    Thx. I had the same problem. This was not necessary before.

  7. #6
    Sencha User
    Join Date
    Apr 2013
    Location
    New York
    Posts
    16
    Answers
    1
    Vote Rating
    0
    scriptonian is on a distinguished road

      0  

    Default


    Thank you... this refresh command worked for me too. was driving me nuts !

Thread Participants: 3

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi