Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1041] Universal binary support

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:55:02.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M06
ComponentsiOS
Labelsapplication, binary, developer, feature, ios, ipad, iphone, release-1.6.0, rplist, titanium, universal
ReporterKevin Whinnery
AssigneeKevin Whinnery
Created2011-04-15T02:42:09.000+0000
Updated2011-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.

Comments

  1. Pedro B. 2011-04-15

    This should definitely go into the "ToDo", instead of just being part of a "WishList".

  2. Damien Elmes 2011-04-15

    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.

  3. Sindre Sorhus 2011-04-15

    This should really be a part of 1.5.0

  4. Cameron 2011-04-15

    Bit surprised it wasn't done like this to begin with - how is ipad different from other mobile devices?

  5. Brion Vibber 2011-04-15

    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.

  6. Damien Elmes 2011-04-15

    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.

  7. PanMan 2011-04-15

    @Damien which Build Hack are you referring to?? Any pointers?

  8. ctredway 2011-04-15

    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.

  9. Blain Hamon 2011-04-15

    Either way, this is an Titanium Developer, not the runtime issue. (Setting up the info.plist right). Bouncing back to Ralf.

  10. Dawson Toth 2011-04-15

    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

  11. Jacques Crocker 2011-04-15

    +1

    currently working with the hack solution provided, but would be really great to have this streamlined.

    thanks!

  12. Stephen Tramer 2011-04-15

    ETA is end of week. Lots of builder changes to go along with this.

  13. Doney 2011-04-15

    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?

  14. Damien Elmes 2011-04-15

    It's covered in the Apple docs. Put the images in the iphone folder rather than the resources directory.

  15. Jeff Haynie 2011-04-15

    (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...

  16. Doney 2011-04-15

    Good job Jeff, now can you give a brief explanation on how to make an app universal? :)

  17. Stephen Tramer 2011-04-15

    Jeff didn't write this feature, I did.

    Wait for TiDev 1.3.0.

  18. Doney 2011-04-15

    Ah okay, my excuses Stephen, great job. Any ETA for TiDev 1.3.0?

  19. Stephen Tramer 2011-04-15

    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.

  20. Pedro Enrique 2011-04-15

    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:

        1. Open Titanium Developer V. 1.3 (still in beta as of 01/26/2010)
        2. Create new project and select "Universal iOS"
        3. On "Test and Package" select iPhone and click "Launch"
        4. App launches in iPhone Simulator as an iPhone app.
        5. Click Stop
        6. Select iPad and click Launch
        7. App launches as in iPad Simulator as an iPad app.
        

    Working as expected.

    Ti SDK 1.6 (Jan 26 2011 16:47 rb481fe0b)
    Ti Dev. 1.3
    iPhone and iPad simulators 4.2

  21. Brice Lechatellier 2011-04-15

    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?

  22. Stefano Cecere (at krur) 2011-04-15

    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

JSON Source