aspose file tools*
The moose likes iOS and the fly likes Wrap existing J2ee web application as ios web app Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » iOS
Bookmark "Wrap existing J2ee web application as ios web app" Watch "Wrap existing J2ee web application as ios web app" New topic
Author

Wrap existing J2ee web application as ios web app

Brajendra Mathema
Ranch Hand

Joined: Jun 02, 2009
Posts: 39
Hi there,

As in case of android , where we can wrap a j2ee based web application(developed in JSF) within android WebView and publish as an android app, can anything like this done for the ios .

I want to use the same web application in the android tablet as well as the iPad as an web app.

In case of iPad, I've tried using apple meta tag to give ios web app like appearance but the application restarts whenever I switch between the application.

Any information regarding this would be very helpful.

Thankyou
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Sorry but I'm not following you, do you mean something like UIWebView?
Brajendra Mathema
Ranch Hand

Joined: Jun 02, 2009
Posts: 39
Hi ,Hussein

Thanks for the reply.

I wanted to know , can I do anything like this in ios as we can do in android to wrap an external web application.

In android the following code loads the Google site within the web view:

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadUrl("http://www.google.com");
}

Is there any way I can do similar in ios ? I need an advice on this.

Thanks



Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61206
    
  66

You might want to check out PhoneGap.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Brajendra Mathema
Ranch Hand

Joined: Jun 02, 2009
Posts: 39
hi Bear Bibeault,

Thankyou for the reply.

I have tried going through Phonegap and what I have understood is that using phonegap we can only use HTML , CSS and JavaScript and to communicate with serverside we need ajax (please correct me if my understanding is wrong).

To work with phonegap I'll have to rewrite the HTML, CSS and JAVASCRIPT to talk to my backend environment.

However I was thinking if there is any way to use the existing web application built with JSF framework to directly access in ios as we can do it in the android environment.



Thankyou
Brajendra Mathema
Ranch Hand

Joined: Jun 02, 2009
Posts: 39
hi Bear Bibeault,

I went through the Phonegap again & found the following info:

Q. Can I just create an iPhone PhoneGap-based app that just loads my website?
A. You can, but as for Apple approving it, that's another matter, and they most likely won't. As a rule of thumb, if there is no Internet connection, you must at least load the UI (your views) without the corresponding data, and put an error notice to that effect. Therefore your app must have these views included in it. For a guideline, set your iPhone to Airplane Mode in the Settings, then load either the Maps, Weather, Youtube, ITunes or Facebook apps, and see what they do (have a "shell"). Apple is probably concerned about them approving your app based on your app description and functionality as promised by you, and then you turning around and changing it completely after approval to something undesirable.

Thanks for providing the information.



Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wrap existing J2ee web application as ios web app