views:

911

answers:

5

As I understand, Sencha Touch is just a javascript library that lets you create websites that respond to multitouch and other features you find in native iPhone apps. So... Your end result is accessed on Safari on the iPhone, and not as a native iPhone app. Is there a way to convert this to a native app?

A: 

While I don't know exactly how Sencha works, if you just want to be able to take advantage of the multitouch features of the iDevices in a native application, this is very well documented in Apple's portal, including sample code; and even third party resources which you can find by using google.

In iOS 3.2 and higher, Apple has made handling touch events easier with introducing gesture recognizers, and they're simply wonderful to use.

Have a look over these resources, http://developer.apple.com/iphone will get you started. There are links to videos, text resources, and sample code as I mention that will give you a solid foundation to do what you need to.

jer
App dev looks like a lot of fun, but my current skillset is more jQuery/HTML5. If it's possible to make my simple app using Sencha (without too many disadvantages), I'd start from there, I guess..
ina
+2  A: 

In principle yes. You could write some kind of a wrapper application. This application would have an ‘UIWebView‘ as the main view which is then used to browse the web. This would allow you to keep your HTML5-based app and wrap it in a native objective-c app.

If you want to write a "real" native app your would have to switch languages from HTML5, CSS and JS to Objective-C, which is really different.

GorillaPatch
Would there be any security disadvantages to just use a UIWebView wrapper pointing to a private Sencha Touch-based page? For example, would users be able to easily view source and hack off images like on a regular browser?
ina
well in this application one could hide the address of the homepage so that it cannot be looked at. However you have to download the page to your device. So unless you are getting the page over TLS/SSL it is possible to intercept the GET requests, find out the URL of your page and download and look at it on a desktop system.
GorillaPatch
ok - also, it seems like there's a range of apps accepted by iTunes - do you know cases of a sencha touch based app that's "wrapped" by UIWebView for example into a native app being accepted/rejected? (assuming wrappers wouldn't be grounds for rejection)
ina
no I do not have any experience if sencha touch based apps would be rejected. I think they are fine as it is just JavaScript, CSS and HTML.
GorillaPatch
A: 

Why would you want to convert? If you are writing successful apps with Sencha then stay with it. There are advantages to web based apps.

  • You can build them in a more accessible toolkit html/css/javascript.
  • You can deploy them more easily and quickly by setting them up on a web server.
  • You can update them on the fly etc.

If you produce a "native" app then you need to register with and pay for the Apple dev programme and the process for submitting an app is quite laborious and of course it might get rejected.

Apple themselves use the web based applications route, look up AdLib and PastryKit here on Stackoverflow. THese two libraries are Apples version of Sencha.

There are of course advantages to writing native apps. They have a very rich development set of tools and (in my opinion) will always function better then most web based apps and there is the marketing machine of the app store you can plug into.

But you can successfully go either way.

PurplePilot
On the econ and outreach side, having the app on iTunes might generate some extra cash and publicity.
ina
+2  A: 

Yes, you can convert a Sencha Touch app to native. You have to use PhoneGap to do so. We don't have a tutorial on this yet, but the phonegap guys have done this with at least one sencha app that they built. [I work for sencha]

Michael Mullany
speaking of tutorial - senchatouch documentation still coming soon?
ina
Yes, it's coming along but more slowly than we were aiming for
Michael Mullany
there are now several other to-native converters - is there a list for which ones Sencha works on?
ina
Phonegap works for iOS and Android. We'll be working with RIM's WebWorks converter when we add Blackberry support, and when Meego ships, Nokia is using Phonegap in that one as well.
Michael Mullany
+1  A: 

So here is a question for the Sencha guys here, is there other documentation for Sencha Touch available beyond the API reference and sample apps on your site?

We are currently trying to switch a prototype application from JQTouch to Sencha, but are finding it challenging to get going with Sencha Touch; while there is a lot of documentation it doesn't seem to be the right documentation.

A really simple solution would be to make the API reference online allow comments so as we and others figure out how to use Sencha touch we could provide comments (look at php.net's manual to see how this worked for them.)

celer
yes! sencha touch was suspiciously bereft of documentation, so i wonder about its effective usage stats..
ina
Hi celer, I made jQTouch and helped with Sencha Touch and I understand where you're coming from — it's quite a different approach than jQTouch. That said, in addition to the API and sample apps, there is also a walkthrough app included in the SDK. We are also currently exploring ways to add comments into our docs (great idea!) and we have a few extra blog posts, getting started articles, and demo apps on the way-
David Kaneda
keep in mind that one of the rare virtues of the Apple dev community is that Apple offers comprehensive well-written documentation for free on their website. you can't find this for Android and other dev environments. ... so, good documentation in any competing product is a must for us spoiled Apple developers
ina