1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    8
    Vote Rating
    0
    StefanGlaesser is on a distinguished road

      0  

    Default External CSS not deployed in iOS-Simulator or iPhone

    External CSS not deployed in iOS-Simulator or iPhone


    Hello,

    I've created a simple app which makes use of an external css-file. I've added it in the designer as ressource and when I run the app in browser, everything is fine. I can see all the changes I made in the css-file. But when I create a package for iPhone or iPhone-Simulator, the css seems to be unused. How can I fix this?

    Best regards,
    Stefan

  2. #2
    Sencha User goldorak's Avatar
    Join Date
    Dec 2012
    Location
    Belgium
    Posts
    9
    Vote Rating
    1
    goldorak is on a distinguished road

      0  

    Default


    I have the same problem.

    Linked my "custom.css" to the project and it works well, both in Design view inside Architect and as preview in Safari. But when I Publish and Package the css seems not applied to the content. In my publish directory custom.css is present and is referred to by app.html. I get no error messages/logs.

    Sven

  3. #3
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,851
    Vote Rating
    58
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Stefan,

    Assume your including the css locally? e.g. relative to the project directory
    resources/custom.css
    or
    style.css

    see how it's done in 'first mobile app' tutorial
    http://docs.sencha.com/architect/2/#...rst_mobile_app
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  4. #4
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    61
    Vote Rating
    0
    Shyru is on a distinguished road

      0  

    Exclamation


    I have the same problem. The link you gave Phil.Strong, does not really use sencha cmd. I downloaded the architect archive of the example, upgraded to ST 2.1, initialized Sencha Cmd in it with Architect and then manually ran "sencha app build" to build a depoyable version of the app. The citybars.css does not get referenced in the generated index.html nor does it get minified into app.css via compass.

    So how is supposed to work when using "sencha app build"? I thought that the custom css files get automatically minified into app.css in the build process? Are there any other ways or workarounds?

  5. #5
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,851
    Vote Rating
    58
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    When you run Sencha Cmd it creates an index.html file. This can be used by you to deploy your app but in general it's missing all of the important bits that Architect provides in app.html. You can literally replace the index.html with app.html (make a copy) and likely things will start working.

    From Architect's standpoint we haven't done much more than package/simulate wrt Sencha Cmd. Expect more integration related to deployment and production level packaging in Architect 2.3. 2.2 (the next release) will have many integration improvements related to packaging and simulating. It does not yet address the last mile and developers should continue to follow best practices from the Cmd team regarding that and running those from the cmd line.

    Having said that, I'm working now to improve the confusion that this created index.html creates and likely Architect will simply replace it with an improved copy of app.html. Working on this stuff now so it's in flux.

    Hope this helps!
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team