Search code examples
iosextjssencha-touchsencha-touch-2portability

Port existing sencha touch web app to ios native app


I used sencha touch to build a realtime chat application that runs on web. Users opens a url and they get access to full Android/IOS supported web desktop. Now I am thinking to port this as native IOS app.

  1. What are the challenges porting this webapp?
  2. Do I need to change the codebase?
  3. The sencha cmd provides a way to build a sencha touch application as native app. Will it suffice or we need code modification?

Solution

  • Are you looking to port to iOS native code or just natively wrap your basecode into iOS? You mention your app opens a full Android/iOS supported web desktop. Does this mean your app works ok within safari (ie webkit)? Also are you using the latest version of Sencha Touch 2? If it is fully functioning in a webkit browser you should have no problem natively wrapping your sencha app for iOS using Sencha Touch itself. You always have the option of wrapping your Sencha App in Phonegap if you need additional support for cross platform or features that is not supported currently within Sencha Touch.

    There really only one way to know for sure if it will work and thats do it and see if it works, if not make the necessary changes until it does ;-) Goodluck

    Extra info added after comment reply:

    Yes it is possible to natively wrap and include these features. Although it would be possible to do in Sencha alone, I would recommend wrapping sencha in phonegap for extra features and future expansion of app...

    With sencha for Push notification (only supports iOS currently) use Ext.device.Push: http://docs.sencha.com/touch/2.3.0/#!/api/Ext.device.Push

    With sencha/phonegap for Address book you can reference this tutorial: http://www.sencha.com/learn/a-sencha-touch-mvc-application-with-phonegap/

    Phonegap has many more features and supports android push aswell, so I recommend reading up on phonegap, set this up then move your sencha app into it to get the best of both worlds.

    Phonegap contacts: http://docs.phonegap.com/en/3.1.0/cordova_contacts_contacts.md.html#Contacts

    Phonegap: push notification plugin: https://github.com/phonegap-build/PushPlugin

    Great Tutorial on setting up PushPlugin: http://devgirl.org/2013/01/24/push-notifications-plugin-support-added-to-phonegap-build/

    Use Phonegap 3 CLI: http://docs.phonegap.com/en/3.1.0/index.html

    Running an app in the background should be a setting for your app for example in your .plist file.