[TIMOB-1041] Universal binary support
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:55:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M06 |
Components | iOS |
Labels | application, binary, developer, feature, ios, ipad, iphone, release-1.6.0, rplist, titanium, universal |
Reporter | Kevin Whinnery |
Assignee | Kevin Whinnery |
Created | 2011-04-15T02:42:09.000+0000 |
Updated | 2011-04-17T01:55:02.000+0000 |
Description
It would be good to support iPhone/iPad projects in the same Titanium project so that developers could build universal binaries. It's an oft requested feature from folks to the community, so I thought I would put in a ticket so folks could track its progress.
This should definitely go into the "ToDo", instead of just being part of a "WishList".
What I'm worried about is if there are two similar applications, one of which has iPad support as well, the customer is unfortunately less likely to choose the Ti one.
This should really be a part of 1.5.0
Bit surprised it wasn't done like this to begin with - how is ipad different from other mobile devices?
Some hints on how 'universal apps' work: http://oleb.net/blog/2010/04/universal-app-is-not-a-universal-binary/"> http://oleb.net/blog/2010/04/universal-app-is-not-a-universal-binary/
Unlike the 'universal binary' system for PPC+Intel or armv6+armv7, this actually runs the exact same code on both systems. It's more like checking what version of OS X you're running on and tailoring your library calls to either use or avoid new features, rather than building separate binaries for each system.
A few general notes:
TARGETED_DEVICE_FAMILY should be set to the 'iPhone/iPad' option (3?) any alternate code paths between iPhone and iPad need to be selectable at runtime. The link above has examples of how to check this. * Since a single .app bundle and binary will be run on both systems, any needed resources for both need to be included; that means things like the application icon and default.png splash screen need to be separately settable for iPhone and iPad, but coexisting in the same project and the same output build.
I shipped the latest version of my app with the build hack you guys provided, and apart from table view backgrounds it's been running fine, and has resulted in a lot of happy iPad users.
@Damien which Build Hack are you referring to?? Any pointers?
Its not really a hack, its adding a device family (iPad) to the builder.py file. If you go to HD/Library/Application Support/Titanium/mobilesdk/osx/the_build_you_are_using/iphone/builder.py line 682 and TARGETED_DEVICE_FAMILY=1 to TARGETED_DEVICE_FAMILY=1,2 and that will work.
Either way, this is an Titanium Developer, not the runtime issue. (Setting up the info.plist right). Bouncing back to Ralf.
A pro client is interested in this feature.
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/65581">http://developer.appcelerator.com/helpdesk/view/65581
+1
currently working with the hack solution provided, but would be really great to have this streamlined.
thanks!
ETA is end of week. Lots of builder changes to go along with this.
Great that this is being worked on. For now, using the hack solution, is there a way to define an iPad version of the Default.png image that you see when the app opens up?
It's covered in the Apple docs. Put the images in the iphone folder rather than the resources directory.
(from [61fbf1550144115ed21cdaf69c37d24d85d1afbb]) [#1041 state:fixed-in-qa] Addition of universal binary support to build scripts. https://github.com/appcelerator/titanium_mobile/commit/61fbf1550144115ed21cdaf69c37d24d85d1afbb"> https://github.com/appcelerator/titanium_mobile/commit/61fbf1550144...
Good job Jeff, now can you give a brief explanation on how to make an app universal? :)
Jeff didn't write this feature, I did.
Wait for TiDev 1.3.0.
Ah okay, my excuses Stephen, great job. Any ETA for TiDev 1.3.0?
We're going to try and make it drop around the same time as 1.6.0. You can take advantage of the new universal support by manually using the builder.py script if you want but that's an exercise left to the reader.
Same as:
https://appcelerator.lighthouseapp.com/projects/32238/tickets/2916-support-universal-apps-and-31x-at-the-same-time"> https://appcelerator.lighthouseapp.com/projects/32238/tickets/2916-...
Steps to take:
Working as expected.
Ti SDK 1.6 (Jan 26 2011 16:47 rb481fe0b)
Ti Dev. 1.3
iPhone and iPad simulators 4.2
When using the hack, on the Iphone the splashscreen flashes twice. It first loads Default.png then Default-Portrait.png targeted to the iPad.
Is there a workaround or will that be fixed in the new release?
hi.. how can i compile Titanium Developer beta 1.3 from sources? (https://github.com/appcelerator/titanium_developer">https://github.com/appcelerator/titanium_developer ) ?
opening that project with Titanium Developer 1.2.1 and creating a package, it gives error (like "the app was created by a different user")..
any idea? or even better: any .dmg to download anywhere?
thanks