1. #11
    Sencha User
    Join Date
    Oct 2010
    Location
    St. Louis, Missouri
    Posts
    42
    Vote Rating
    5
    caballero is on a distinguished road

      0  

    Default


    Don't know if this would help, but you can get rid of the status bar and take the margin off of the viewport.

    Small changes to the css can have surprising repercussions.

  2. #12
    Touch Premium Member JL's Avatar
    Join Date
    May 2007
    Posts
    89
    Vote Rating
    0
    JL is on a distinguished road

      0  

    Default


    In response / addition to the previous comment, you can also use the StatusBar cordova plugin instead of the css margin, it allows you to setup the app so the status bar does not overlap the application, making it act like iOS6. There is one change you need to make in the CDVStatusBar.m code however that the developers are currently looking into.

    Code:
    I am seeing this behavior as well with no viewport meta tag at all. I resolved it (temporarily) by changing the else condition in CDVStatusBar.m’s setStatusBarOverlaysWebview method to re-initialize bounds to the webView’s bounds before manipulating it:
    
    // re-initialize bounds to the webView’s bounds
    bounds = self.webView.bounds;
    
    CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
    bounds.origin.y = statusBarFrame.size.height;
    bounds.size.height -= statusBarFrame.size.height;
    
    self.webView.frame = bounds;
    [self.webView.superview addSubview:_statusBarBackgroundView];

  3. #13
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    83
    Vote Rating
    4
    cydaps is on a distinguished road

      0  

    Default


    Quote Originally Posted by JL View Post
    In response / addition to the previous comment, you can also use the StatusBar cordova plugin instead of the css margin, it allows you to setup the app so the status bar does not overlap the application, making it act like iOS6. There is one change you need to make in the CDVStatusBar.m code however that the developers are currently looking into.

    Code:
    I am seeing this behavior as well with no viewport meta tag at all. I resolved it (temporarily) by changing the else condition in CDVStatusBar.m’s setStatusBarOverlaysWebview method to re-initialize bounds to the webView’s bounds before manipulating it:
    
    // re-initialize bounds to the webView’s bounds
    bounds = self.webView.bounds;
    
    CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
    bounds.origin.y = statusBarFrame.size.height;
    bounds.size.height -= statusBarFrame.size.height;
    
    self.webView.frame = bounds;
    [self.webView.superview addSubview:_statusBarBackgroundView];

    Thanks for this, I'm perhaps being somewhat thick, but I can't find the CDVStatusBar.m file, I've expanded everything I can in XCode5 and I'm seeing under the Cordova project all kinds of CDV*.m files, but not the CDVStatusBar.m file... It's a standard Cordova 3 project, I've added device, notifications and vibrate and that's it. Do I perhaps need to add another plugin?

    Sorry, this is probably really basic novice errors, but any help hugely appreciated!

    Thanks

  4. #14
    Sencha User
    Join Date
    Oct 2010
    Location
    St. Louis, Missouri
    Posts
    42
    Vote Rating
    5
    caballero is on a distinguished road

      0  

    Default


    did you add the StatusBar cordova plugin?

  5. #15
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    83
    Vote Rating
    4
    cydaps is on a distinguished road

      0  

    Default


    Quote Originally Posted by caballero View Post
    did you add the StatusBar cordova plugin?
    Ah!! That may be the issue. I didn't see any need for it as it didn't seem to relate to anything we needed, so I'll go away and add that now!!! DOH!!!!

  6. #16
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    83
    Vote Rating
    4
    cydaps is on a distinguished road

      0  

    Default


    Please don't hate me for this, but where on earth is the StatusBar plugin? It doesn't seem to be on the docs.phonegap.com/en/3.0.0/ but I've found one that appears to be for Cordova 2.9 that's on https://github.com/apache/cordova-la...gins/statusbar but there's never any instructions as to how to install these things. I'm not an XCode user, I just have to build using sencha app build native for iPhone and Android and can run XCode to launch in the simulators so I'm a bit lost with the whole thing.

    Sorry, it's so difficult if you're not an expert at all this stuff... I just can't afford to break anything as we've got 2 days before go-live and all this has come out of the blue with the display issues in iOS7 it seems...

    Thanks again!

  7. #17
    Touch Premium Member JL's Avatar
    Join Date
    May 2007
    Posts
    89
    Vote Rating
    0
    JL is on a distinguished road

      0  

    Default


    It's one you need to add. See this blog post: http://cordova.apache.org/news/2013/...s-release.html

    You can download it here: http://plugins.cordova.io/#/org.apac...dova.statusbar

    or you can install it using their CLI (command line interface).

    Included in the plugin package should be a README with instructions on how to use it.

    You have these options for the config.xml:

    Code:
    <feature name="StatusBar">
        <param name="ios-package" onload="true" value="CDVStatusBar" />
    </feature>
    <preference name="StatusBarOverlaysWebView" value="false" />
    <preference name="StatusBarBackgroundColor" value="#000000" />
    Don't forget to modify the source code as I posted earlier.

    Hoping these updates fix the problems, good luck.

  8. #18
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    83
    Vote Rating
    4
    cydaps is on a distinguished road

      0  

    Default


    Hey JL!

    Thanks so much for your patience, I've got the Cordova StatusBar plugin installed using CLI (so easy when you know where to look!!). It's certainly helped solve the problem we had of overlapping status bar and I've been able to remove the CSS code that I added to resolve this from within the Ext.Viewport

    Sadly this didn't fix the issue with the modal window and iOS7.... I wonder if there's a way to force the old keyboard from iOS6 to be used instead. I've seen this with a few apps (they seem to be native apps) so perhaps that would help. I'm not sure why it's happening, just seems to shunt up and across to the left this 20+px and then never realigns again unless I close the modal and open it again and all's fine... Very odd.

    Thank you for trying to help me JL and Caballero!

  9. #19
    Touch Premium Member JL's Avatar
    Join Date
    May 2007
    Posts
    89
    Vote Rating
    0
    JL is on a distinguished road

      0  

    Default


    No problem. The only thing I can recommend is to build your app against the iOS 6.x SDK instead of iOS7. That is what we've had to do, we are just now building against iOS7 and going through that process. You do this by setting the appropriate "Base SDK" under Build Settings in your Xcode project settings. You'll probably need to install the older SDK, here's some help on that: http://stackoverflow.com/questions/1...sdk-on-xcode-5

  10. #20
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    83
    Vote Rating
    4
    cydaps is on a distinguished road

      0  

    Default


    Quote Originally Posted by JL View Post
    No problem. The only thing I can recommend is to build your app against the iOS 6.x SDK instead of iOS7. That is what we've had to do, we are just now building against iOS7 and going through that process. You do this by setting the appropriate "Base SDK" under Build Settings in your Xcode project settings. You'll probably need to install the older SDK, here's some help on that: http://stackoverflow.com/questions/1...sdk-on-xcode-5
    Thanks, wow this is all such a learning curve! I did have XCode 4.6.3 installed and then upgraded to OS X Mavericks and that seems to have killed off all my old SDKs... ARGH! I'm just trying to download and unearth an older SDK now. So frustrating Apple make it so difficult to use and older SLK with XCode. Thanks for pointing out so much for me. I'm sure I'll get there soon! Again, thanks so much for your ongoing support!

    Problem... we're looking at getting this into the App Store and I've just read something about the app store won't approve older SDKs. I think we're going to have to sit it out until Sencha finds a solution.
    Last edited by cydaps; 6 Nov 2013 at 9:49 AM. Reason: Adding update regarding SDK and app store..