Resolution in iPhone

miguetrek

New Member
Joined
Aug 23, 2017
Location
Spain
Hello,
I'm new in monkey/cerberus and I've been testing for a few days, but my app not get the correct resolution in IOS. I have created a basic program (code shown), built with "IOS Game" target, opened the project in xcode and run for iphone5 emulator. The resolution shown is low and incorrect, and the text does not appear in the upper corner (screenshot).
Is it a bug or am I doing something wrong?

code:
Code:
Import mojo

Class MyApp Extends App

Method OnRender()
DrawText DeviceWidth+"x"+DeviceHeight,0,0
End

End

Function Main()
New MyApp
End
screenshot:
iPhone5.png
 

Martin

Active Member
Joined
Jun 19, 2017
Location
Germany
You have to add a correctly sized launch images within xcode. I know this sounds strange but that way you get the correct size.
 

miguetrek

New Member
Joined
Aug 23, 2017
Location
Spain
Thanks Martin! I have added a blank launch image of size 640x1136 and now goes right.
I have been a couple of years without developing for mobile and i had forgotten the strangeness of xcode/ios :)
 

APC

New Member
Joined
Aug 8, 2017
Hello Mike,'
Do you guys have the Launch Screen for iPhone 11 Xs Max (2688 × 1242 pixels) and iPhone Xr ( 1792 × 828 pixels)?

The Defaulf image that is generated by Cerberus is 640x1136 pixels, this is the maximum resolution I get from my iPhone Xs Max.
 

APC

New Member
Joined
Aug 8, 2017
I added two additional default images 1792 × 828 pixels for iPhone Xr and 2688 × 1242 pixels for iPhone Xs Max , but when I run on the simulator for iPhone Xs Max, the DeviceWidth() and DeviceHeight are retuning 1704 x 960 on the iPhone Xs Max on the Simulator and on my iPhone Xs Max this id not the correct resolutions.
What can I do to get the correct resolution from the Device? I am Using Cerberus v2020-05-09
 

APC

New Member
Joined
Aug 8, 2017
Phil7 Thanks for your response, I know that and I have all screen resolutions on my assets catalog, this game I am updating was also released before when it was Monkey X.’The questions is why the screen resolution Is incorrect ? Also the issue happens in the Simulator.
 

APC

New Member
Joined
Aug 8, 2017
Hello Mark, were you able to confirm if Cerberus is returning the correct resolution from the Device? You can confirm my issue using the Apple Emulator.
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
I was able to display it in the native resolution of 750x1334 in the iphone SE simulator by adding a "Launch Screen.storyboard" file like described on this site.
Otherwise I also couldn't get a higher resolution than 640x1136 by changing the launch image. So I deleted it and added the mentioned file in xcode. The only thing I had to do was to disable "Safe Area Layout Guide" with the file inspector in the storyboard file.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Location
Germany
@Phil7 You got an OSX machine??? o_O Cool.

I just tested the SE 2nd edition in the simulator. I found this site


which displays the SE with 640x1136. That works of course. You stated that the SE has a resolution of 750x1334? Thanks for the hints, I guess I need to look for more correct info. Will look further.
 

APC

New Member
Joined
Aug 8, 2017
@APC I have uploaded the changes suggested by Phil7 to Github. Works fine here. If you need further help, please let us know.
Hello @MikeHart and @Phil7, thank you so much for fixing it, switching to storyboard launch screen is the way to got with iOS. I tested and the resolution issue is resolved! I downloaded the Cerberus_v2020-09-12 but it did no have the Cerberus application so just copied the iOS target files over to my version Cerberus_v2020-05-09. ad a suggestion on the Storyboard screen you could add the Cerberus Logo .
Now I will keep testing with other device sizes.
 
Last edited:
Top Bottom