Platform Strategy & Architecture
« Build Data Services in Minutes with Postman and HivepodMobile App Monetization »

Easy iPhone5's 4" Screen Resolution Support With Canappi

  09/13/12 23:01, by jdubray, Categories: android

Canappi is well positioned to help you create dual-resolution, dual factor, dual platforms apps. We already supported dual screen resolution for the iPhone / iPad Universal Binary model. We just released today an update to our Eclipse plugin and code generator that fully supports programmatically iPhone 5 screen resolutions. We extended our coordinate system to model a shift that is applied to the current coordinates when the app is running on an iPhone 5.

text name (10,60,100,30 + 0,10,0,2) { ... }

This means that the name textfield will be displayed at (x=10,y=60) on iPhone 4 (with a width of 100 and height of 30).  On the iPhone 5 it will be displayed at x=12, y=70 with the same width and a height 32.

With that approach you can even bring "off screen" controls within the view bounds when the view is displayed on an iPhone 5:

text name (-200,60,100,30 + 220,10,0,2) { ... }

So this is what you do with a single MDSL file, yes, dual resolution, dual form factor and dual platform.




Retina Display

(iPhone 4)


(iPhone 5)



Retina Display


iOS yes yes yes* yes yes
Android  yes**   N/A  yes (up to 1280x720)  to be released soon  N/A

*to activate your project to work in an 4" size, you need to add a PNG file to your project named: Default-568h@2x.png. Here is a blank one you can use for testing. This file will automatically used as the 4" version splashscreen. It's hard to believe that Apple could be that clumsy, but so far this is the only way I have seen to get the app use the full 4" resolution.

**On Android we use DIP and we have experienced a really good support of various screen resolutions, from 320x480 to 1280x720, using a positioning space of 320x480, in other words, in DIP mode, Android adapts the positions and sizes of the controls defined using a coordinate system of 320x480 to fit well the current resolution of the screen. This would not be true of graphic files and it is recommended to provide resources that match the phone resolutions from 320x480 to 1280x720.

What all this means is that all of our customers can rapidly migrate their applications to support all these resolutions within a single MSDL file that contains:

  • two independent layouts (one per form factor phone /table).
  • the shifts to be applied for larger screen resolutions. 

This is what the MDSL file would look like:

//A single definition file to support 8 different runtime options

layout myTabletLayout {

text name (10,60,100,30) { ... }


layout myPhoneLayout {

text name (10,60,100,30 + 0,10,0,2) { ... }

tablet myTabletLayout ;


This is a tremendous validation of our approach and programming model.

We'll be releasing support for ARC and some key function of iOS 6 with our release 1.4 early October.

No feedback yet




My views on SOA

I work at

Recent projects

the old ebpml

powered by b2evolution

©2017 by Jean-Jacques Dubray

Contact | Help | b2evolution skin by Asevo | blog software | web hosting top 10