Canvas resize issue on iPad App inside div/iframe

Bugs will be moved here once resolved.

Post » Fri Jan 17, 2014 4:34 pm

Link to .capx file (required! If link is blocked remove the http and www parts):
https://dl.dropboxusercontent.com/u/28297064/Ordering%20of%20Planets%20-%20finalized%20new%20look-latest%20version.capx

Steps to reproduce:
1. For an App created on iPad (P.S: I have recorded my App running live on iPad with great difficulty. Please check the recorded video link here - https://dl.dropboxusercontent.com/u/28297064/Untitled.mov)

2.The exported HTML5 is called inside an iframe ( with link target="myframe" in the below code). This iframe is present inside the <div> tags containing header & footer. I have cut-pasted portion of the code below for you to see what I meant -

    <div data-role="page" id="next-main-wrapper" class="ui-page app" data-theme="a" >
        <div data-role="header" id="next-main-header" data-theme="d">
           <h1> Earth and Space </h1>
        </div>
        <div id="allNextContent" data-role="content">
             <iframe name="myframe" id="myframe" seamless="seamless">
             </iframe>
        </div>
        <div data-role="footer" data-theme="d">
                 <p>Copyright 2013 </p>
        </div>
    </div>
2.
3.

Observed result:
As can be seen from the video, it loads with the correct size but then somehow starts getting resized (rather over sized) beyond the screen limits! (I have recorded the screen of iPad, running my App live. Please check the recorded video here - https://dl.dropboxusercontent.com/u/28297064/Untitled.mov )

This behavior is observed only on iPad App only. In browsers it works fine! I have also tried removing canvas resize function inside index.html of the exported HTML5 but no change...I simply dont understand what is causing this!

Expected result:
Using letterbox scale option it should have fit exactly within the iframe but should not oversize.

Browsers affected:
This oversizing behavior is strangely observed only on iPad App somehow. In all other browsers it works fine! FYI...I invoke the same code in web apps as well and all of them work fine without issues.

Chrome: yes/no
Firefox: yes/no
Internet Explorer: yes/no

Operating system & service pack: iOS/iPad

Construct 2 version:158 stable release
    kmsravindra2014-01-17 16:36:33
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Fri Jan 17, 2014 4:50 pm

iOS has buggy iframe support. Try adding these attributes to the iframe tag:

scrolling="no" noresize="noresize"
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,694

Post » Sat Jan 18, 2014 6:07 am

Thanks Ashley. It worked brilliantly! This has been pestering me for a while with very little help on the internet. You made my day. Thanks a lot.

There is one more issue that I have been facing with the offline cache. When offline - And with my App containing 2 games that are called from a main menu - when I come out of first game to main menu and click another game ( assuming both games were cached when online), the second game would not load...the page still remains on the first one. Any solution to circumvent this? I have educational apps running on iTunes that suffer this offline issue which have been reported by the customers...Any help is highly appreciated. Though I have posted this in the regular forums couple of times, no one responded...Please help.kmsravindra2014-01-18 06:13:49
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Fri Jan 24, 2014 5:11 pm

@kmsravindra - closing this issue. If you have a different issue to the one reported in this thread, please post a new bug report following all the same guidelines again, we need all that information to be able to help.
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,694

Post » Tue Feb 18, 2014 6:48 am

Well, if you got the right hardware/software to delete apps on iPad, you can erase just about anything from any computer/device. The only surefire way to prevent such is to toss your phone into a blast furnace. However, the right equipment to delete data from phone is not so easy, and generally not available to most users.
If you go to Settings>General>Reset>Erase all content and settings
Once you do that it will put the phone into setup mode with iPhone Data Eraser and everything will be deleted from the phone and they won't be able to get your information back.
B
2
Posts: 1
Reputation: 152


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests