How to access native iOS file system using Sencha touch 2 alone - ios

I am working on an Sencha Touch application.
There is a use case in this application where I need to modify text file and save it again on iOS device.
As I've deal with almost 300-400 MB of data, so I can't use local storage here(Please correct me if I am wrong).
Here, I don't want to use Phonegap or any other framework to access native file system.
Could you please tell me, how I can access native filesystem using Sencha touch alone.

Since Sencha is a platform for building HTML5 apps (thus, websites) you cannot access the native iOS file system, unless you use Sencha SDK Tools and native packaging (but you don't seem to want to use that).

Related

Integrate Worklight project in existing IOS project

I have to integrate a Worklight project into my existing IOS project (Objective-C)
I have googled but i have not found a clear "guide" on how to perform this integration.
Could you drive me in the right way of integrating this project? The idea is to have a button in my IOS project that open a WebView that loads the pages (HTML5 and javascript with AngularJS and Jquery) contained into the Worklight project.
Thank you so much
There is no guide for this approach, as I don't think it is sustainable.
In Worklight you currently have two approaches:
A native application to which you add the Worklight Native iOS SDK, allowing you to implement security features, invoke adapters and use various other features
A Hybrid application to which you can add native functionality (via Cordova or otherwise), and use the entire set of features provided by Worklight
It is important to note that a Hybrid application is a native application. It is a fully actual real native app. It is a native shell that calls a webview (provided by Cordova) into which the Worklight JS framework and the application web resources are loaded, and thus you see your web app. A Hybrid application allows you to mix & match web and native in one.
So what I am saying is that you can't take an existing iOS app and transplant it into another existing iOS app.
It sounds to me like what you are essentially trying to do, is what a Hybrid app is. A native app that displays web content...
So:
This is not an approach Worklight officially supports. By doing this, you are on your own
You could maybe take the guts of a Hybrid app's iOS environment (myapp\iphone\native) - its classes and resources and add them into your existing app and load the main class which theoretically, or at least the wanted effect, will load the Cordova webview. But I give this low chances of success...

Implications for developing iOS app on real device only?

I would like to use some lib file (.a) in my app.
I got the files from a 3rd party, to use an IP camera they developed.
As i understand there is no way to open this files, so i will use them as is.
The problem is the files requires real device architecture, so i can't run (or build) them
on the iOS Simulator.
What will be the Implications for developing iOS app on real device only ?
(Besides a slower build and run time and discomfort..)
Also, is there a way to change this requirement so it could run on the simulator ?
Thank you
You should write your own mock library, that exposes the exact same API the vendor provides, and test against that in your simulator. The functionality your mock library provides can be as boring or as exciting as you desire.

iOS App: webView or PhoneGap?

We are developing a HTML5 mobile app with Sencha Touch.
Now we want to package the App, and found that we have two methods:
The first one is to use PhoneGap to generate a native app based on our html5 code.
The second one is to create a Single WebView app in Xcode, and request the url which will host our HTML5 code.
I found the second method relatively easier. So are there any advantages in using PhoneGap to generate the native app?
We usually use phonegap/cordova when we need some native function from the device, for example a barcode scanner.
Of course you can create your own barcode project, however why reinvent the wheel. Since phonegap/cordova 3.0 the effort needed for creating a app is kinda low. Just follow the guide and your all set.
http://docs.phonegap.com/en/3.4.0/guide_platforms_ios_index.md.html#iOS%20Platform%20Guide
in short:
Advantages of Phonegap/Cordova
Ready for different platforms, little effort to create android app
Native functionality already implemented (plugins)

Unclear Difference between Phonegap and Apache cordova

After reading this article still i am not clear with Phonegap and Cordova. Some where said that Cordova is an engine which power up the Phonegap (like webkit in browser) My assumption is
Phonegap -- Adobe product --> used for taking remote build Apache , Its not open source
Cordova -- ASF product --> support only native machine build. (For
an example if developer using Windows PC. To take build for IOS, he needs to setup Cordova environment in MAC too), but free of cost when moves to production.
Other than this anyother major concepts left. Best answer for this post will improve better understanding on this basic concepts.
http://docs.sencha.com/touch/2.3.1/#!/guide/cordova what about this one still i am in confused state
PhoneGap is Cordova with some additional tools such as PhoneGap Build (which takes your HTML and packages it into the native installables (APK/IPA/XAP/etc.). Look at docs.phonegap.com and http://cordova.apache.org/docs/en/3.3.0/index.html you'll see they are exactly the same.
Cordova is a bridge between JavaScript and the native hardware. This means you can write a web app which runs on all platforms and uses Cordova to call native hardware calls through an abstract interface (i.e. the Cordova JavaScript library). E.g. I might need to take a photo, save it to the device's storage and then upload it (admittedly, HTML5 supports this out of the box anyway) - but with Cordova I can do this using the same JavaScript code - so much less coding effort.
The difference between a web app you access browsing the web, and a Cordova web app, is the Cordova web app is package into native binaries to imitate a native app (which is accessed through the device's app store and installed/updated like a native app).

Difference of Native packaging between Sencha touch2 and PhoneGap

What is the difference of native packaging between Sencha touch2 and PhoneGap?
Many people use PhoneGap to natively package app based on Sencha touch, but I find that Sencha touch 2 has a new feature of native packaging.
So which type of native package is better in Performance, scalability, functionality, maturity, etc. ?
How do you choose?
PhoneGap is a middle-platform which is able to access some native APIs on many platforms and its interface language is Javascript. This means that PhoneGap is able to work with many cross-platform mobile web frameworks, such as: Sencha Touch, Titanium, jQuery Mobile, etc.
Sencha Touch 2 also provides a few native APIs (currently available on iOS, Android) through its SDK.
If you are not going to use any native APIs, then they don't have any major differences on performance and functionality as the only work done is just to wrap your Javascript code into a webview native component on corresponding device.
Lastly, the 2 main differences are:
PhoneGap provides much more APIs than Sencha Touch SDK.
PhoneGap supports 7 platforms, while Sencha Touch SDK only 2.
I had the same questions, I agree it's a real mess at first glance. Here is a very good article that "clears up confusion" quite well.
To quote the gist of the article:
Sencha Touch (and jQuery Mobile) are mobile web frameworks. You can use these technologies to create web-based, mobile apps. They don’t have access to any native API’s.
You can use Sencha Touch and jQuery Mobile inside both PhoneGap and Titanium. If you decide your html/js is cool as a native app too, you can use either PhoneGap or Titanium to wrap a browser around your app and put it in the app store or marketplace. This is where, I think, the confusion comes. Putting your Sencha Touch or jQuery Mobile apps in a native wrapper doesn’t make it a native app. It makes it appear as if it is a native app. You might get some extra functionality from PhoneGap or Titanium API’s, but it’s still not necessarily a ‘native’ app. It’s a web app running locally on the device. It’s a great way to use web technologies inside a native-like area.
The difference is that Sencha Touch allows you to build native iOS-Applications even on Windows, whereas PhoneGap 'only' bundles your HTML files into an XCode project, which further needs to be compiled on OSX for distribution/packaging.

Resources