CC + HTML5, trouble in iOS iphone11

Hi, we have found a new trouble with CocosCreator and export in HTML5 web-mobile on iPhone11.
With iphone6 or 7 there isn’t the trouble.

This is the trouble:

Image from iOS (1)

is not in fullscreen :confused:

There is a solution? :crossed_fingers:

Thanks for support!!

Stefano

CC version? iOS version?

I would assume that the problem is the difference between safe area resolution and full screen resolution, that in older phones are the same, but in this it has the notch so it’s different.

CC: 2.4.4
iOS: last

any suggest to fix di trouble? :frowning:
Thanks for help!

@C_Stefano Can you provide a demo for us to verify?

Yes, this is the project tested.
this is created with CC2.4.3. (our game with 2.4.4 but the result is same)

Thanks for support!

Stefano

project: TestHTML.zip (1.5 MB)
url: https://smallthingstudios.com/~html5/web-mobile/index.html

image

This is the result of my run

What browser are you running it on?

Safari

Image from iOS (2)

this is in portrait, but in landscape is:

Image from iOS (3)

image

You can set this adaptation mode dynamically

nothing, same trouble… :confused:
Image from iOS (4)
url: Cocos Creator | hello_world
iOS: 14.4

Hi, anybody have the same trouble? is there a solution? :frowning:
Thanks!

Stefano

we have the same problem with ‘hello world’ about CC3.x :frowning:

Image from iOS (6)

Yes, I have the same problem in CC3 as well…
When the device switches automatically from portrait to landscape
it gets messed up… Checked this on iPhone as well as on Huawei Tablet. Even with empty project or hello world, same like @C_Stefano.

This is why I wanted to port this code:

…from 2x to 3x, but it seems that
this isn’t possible anymore…

and with CC2.x :frowning: :sob:

Hi @knox, do you have other suggest? :slight_smile:
Many thanks for help!

you can modify this file(the file path is :
\resources\engine\cocos2d\core\platform\CCView.js)
image
add this code;
After adding the code, remember to recompile the engine. Refer to the following documents:
https://docs.cocos.com/creator/manual/en/advanced-topics/engine-customization.html?h=引擎

Hi @Koei sorry a lot for delay… now we have recompile the engine and we see wrong in OSX browser… maybe we need add a cc.sys.isMobile in the new if?

Thanks!

Schermata 2021-03-09 alle 12.32.28 Schermata 2021-03-09 alle 12.32.58

image
Sorry, modify the location of the code and try it, as shown in the figure.
If you still have problems, you can provide a project, and I will help you troubleshoot specific problems here.
(the file path is :
\resources\engine\cocos2d\core\platform\CCView.js)

the trouble on iPhone11 is reproducible with “hello world” and sorry (maybe I am wrong), but in your screenshot what differences there is from IF and Else? :sweat_smile:

Thanks for support!

// Ste

1 Like

hi, I apologize first. The previous plan omitted to obtain the length and width before judging the length and width. The most recent one is to set the length and width first, and then compare.