Can a hosted application leverage the PhoneGap API? - iphone

I am building a hosted mobile application so I can write once and deploy to many mobile platforms. My plan is to write a native application with a single screen that is a browser that navigates to my hosted application. Of course this is so our application is in the App Store, Android Market, etc.
Is it possible to use the PhoneGap JavaScript so my hosted applications can use local APIs? For example, I would like to be able to upload pictures taken from the camera.

Short answer: no.
More information: PhoneGap: It's possible to use only the phonegap.js and it's functions only in a Website (doesn't want an App only a Webpage)?

Short answer
No. You need to add pctures upload logic in each framework

In addition to what has been answer it will also depend on your application store offering. If you're intending to offer the app in the iPhone App Store, these kind of apps aren't permitted. In the guidelines it states that apps that basically launch a browser or UIWebView will be rejected.
Additionally, you could always create the app as a "home screen" app, that runs without the chrome, etc on the iPhone. Hope this helps.

Related

iPhone: Access Camera and Album from Web app

I want to develop a web app using html5, js. One of the feature is to launch device Camera and record video, take a picture and access photo album. Is it possible to access via web app if i develop? I saw in the forums that, it is saying not possible in some places and it is possible in some places. I would like to know, is it really possible to access directly camera and album etc. ?
Please suggest!
Thank you!
It's not possible to access phone camera using Web app, as the "Web APP" typically runs in the browser of device.
Though there are some frameworks (like Phonegap) allows you to embedd your web app into native container. With this approach and added libraries from such framework you can access some of those native API's and Device Hardware.
One Possible solution is,
Create one app and distribute it using app store
using your webapp, you can connect to above app using url-scheme
http://code.google.com/p/iphone-photo-picker/
go to above link, where you can find complete code for it.

Will IOS HTML5 offline app be listed in appstore?

I am new to IOS development (currently, I'm developing websites in ASP.NET) and I found out that one can create an IOS app using just html 5 and javascript.
Well that is great news for me since I don't have the time to learn Obj-C and xCode way of writing apps.
I have heard some opposing statements, though, on whether I will be able to submit my app into the app store.
Will I be able to submit such app in the app store?
If not, is there a way to 'wrap it up' somehow, so it could be submitted?
Thanks!
No, only native app will be listed in the App store. To submit apps to the appstore you will always need a paid Apple Developers account.
Native in this case meaning real apps that can be installed.
You can build an app in HTML and Javascript in tools like Phonegap and Titanium. These tools will create a native app which loads the local HTML and try to make it feel like a native app.
You will need to use a wrapper, like AppMobi (where I work). This lets you write your app in html, javascript and CSS only.
You need to wrap your application in a UIWebView container. As far as I know, there's no way to package an HTML5 only app for the App Store. I have four apps in there that are HTML5/Javascript apps, wrapped in a UIWebView. There are also third-party frameworks available for this.

Phonegap: Can iPhone web app access/check for wifi connections

I have tried looking for some answers but could not get anything concrete from the other questions in here.
I am looking for an answer to these two questions:
Using PhoneGap, if I create an iPhone web app, can I use it as
plain web app (i.e. without using iTunes to deploy it)? Just via a
web url?
Using PhoneGap, can an iPhone web app check for wifi
connectivity? i.e. If wifi/3g is available, if wifi is available,
can it scan for ssids.
Thanks for any help in advance.
You can create host the web app on your own server (or local). Then it is accessible via web url. If you want to use it as a normal app (there are differences - phonegap uses few native plugins for better experience), then you must have a developer license from apple and then deploy it to your device. Otherwise you can only use the simulator. You can also use Safari + USB to debug your app using the browser.
It is possible but limited. Only certain functionalities are available. Check out the following plugin for cordova (phonegap):
cordova-plugin-wifi
Good luck!

Loading remote application would it lead to App Store rejection?

I have an application using JQtouch and would like it to be on the App Store.
Will my application get rejected from the App Store if all the functionality is done remotely (loading in UIWebView) and I provide no offline functionality?
Thanks.
From the Apple App Approval Guidelines:
12.3: Apps that are simply web clippings, content aggregators, or a collection of links, may be rejected.
Basically if your app does not add anything to the experience of viewing the website, then you may get rejected.
I have had apps approved in the app store that were just a web view pointed on a JQTouch application. However, I loaded the .html from a local file included in the app. I believe the no "web clippings" clause of section 12.3 in the App Approval guidelines is only meant for clippings of full web sites. Embedding a mobile web application in a local app will likely get accepted.
I don't think this should be a problem. Apple reviewers are probably the most fickle people on the planet, but I can think of several apps that are UIWebView based, and which provide little or no offline functionality.

iPhone Web Appication deployment and distribution process

--I haven't develop any iPhone Web Application ever...so i am little bit confuse about that.
--I want to build a Web Application for iPhone which will be made using(CSS+JavaScript).
--I read some where that no approval is required for iPhone Web Application.
is it correct ?
--And if i have made my iPhone Web Application (using CSS+JavaScript)and uploaded at my server.
--and if i want to open it in UIWebView using iPhone SDK simply...
--is this Application is valid for iPhone Web Application portal https://adcweb.apple.com/iphone/index.php or not ?
--how can end users get the Application on their iPhone after submiting to the portal...
--can any one explain me the whole process of iPhone Web Application deployment and distribution process ?
Thanks in advance...
iPhone (and others) have support for "stand alone" web apps. These are web apps that are designed to work offline. These applications are hosted on the web, but along with the application is a manifest file that describes all of the resources that the application will need. These resources are all downloaded to the device.
On the iPhone, to "install" one of these applications, you need to simply bookmark it. When you bookmark the app, the phone asks if you want an icon for it in the standard app area, vs just a bookmark in the browser.
Once bookmarked, the user can simply tap on the icon like any other application. This will launch safari for your application, and it starts using its local resource. There's no reason a standalone application that never touches the internet can't be written. The Safari Reference Library has a lot of information on this.
If you'r building a web application, we talk about something, that does not need to be installed on the iPhone, because it runs inside the browser. So yes, you don't have to go through the approval process, it's just a website optimized for the iPhone. The submission you linked to in your question is to get listed at apple with your web application (I'm not sure about the guidelines for that), it,s not a submission for the app store. You don't have to (and you should not) make use of the SDK by using UIWebView, because that would mean to build an native application which needs approval, has to be installed etc. If your goal is or can reached by building a web application, all the user needs is safari.
You do not need approval for a web application. The iPhone can view any web page through its browser (as long as there's no flash), so just implement your application as you normally would, but design for the smaller screen. The submission form is just for listing in portals (I don't know which portals).
If you want to make a native iPhone application that talks to the server, then you need to sign up for a developer account and develop the application in Objective-C (with the help of UIWebViews, which are essentially embedded browser windows). That will require approval.
What about a web application that needs to be installed. By that I mean an application that consists of a web page (with embedded CSS and Javascript) that uses HTML5's localStorage to work offline. You still need to be able to access the page itself if you lost the connection, i.e. the page needs to be stored locally, because once you are offline, you can't access it from a server outside...