Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-07-2011, 06:46 AM   #1 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 11
Elihu5991 is on a distinguished road
Default How to embed site in iPhone App?

My friend and I are working on a project to develop an app which is actually a site that is ported by the app. The site is built but isn't quite porting. Would you know how I can directly port the site from the server?

Thanks in advance.
Elihu5991 is offline   Reply With Quote
Old 09-07-2011, 06:51 AM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

What do you mean "ported by the app"?

If your app is just a UIWebView that just opens a website, that won't get approved for the App Store.
baja_yu is offline   Reply With Quote
Old 09-07-2011, 07:03 AM   #3 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 11
Elihu5991 is on a distinguished road
Default incorrect terminology, reiteration and not approved?

The point of the app is to display a website on a server. Everything necessary for the app is in the site. The app is designed for the ipad. I apologise for incorrect terminology; correct me if I have used the wrong again.

Can you please further explain what you mean by Apple not approving?

What is UIWebView? I do have some idea.
Quote:
Originally Posted by baja_yu View Post
What do you mean "ported by the app"?

If your app is just a UIWebView that just opens a website, that won't get approved for the App Store.

Last edited by Elihu5991; 09-07-2011 at 07:04 AM. Reason: forgot to mention my question for UIWebView
Elihu5991 is offline   Reply With Quote
Old 09-07-2011, 07:19 AM   #4 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Well, your not making an classic app then, a web app maybe. Your website is your app then.
baja_yu is offline   Reply With Quote
Old 09-08-2011, 05:06 PM   #5 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 11
Elihu5991 is on a distinguished road
Default Classic app vs web app?

Its meant to be ported to an iphone app. Yes, its like a web app, but its completely designed for the iPad (and will work on iPhone/iPode too). So how may I do it?

Quote:
Originally Posted by baja_yu View Post
Well, your not making an classic app then, a web app maybe. Your website is your app then.
Elihu5991 is offline   Reply With Quote
Old 09-08-2011, 05:49 PM   #6 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 241
MattW is on a distinguished road
Default

Quote:
Originally Posted by Elihu5991 View Post
Its meant to be ported to an iphone app. Yes, its like a web app, but its completely designed for the iPad (and will work on iPhone/iPode too). So how may I do it?
I think some clarification of terms is needed:

Port = take an existing lump of code and get it running on a different device. This might be a different OS, different language, or whatever. Is that what you're trying to do?

Web app = a web page? If it's just HTML, then use a UIWebView to display it.

Apple not approving = Apple will reject your app when you submit it if all it does is display a web page - Safari will do that far better than your app will.

iPode = no idea.

(And another thing: how can it be "completely designed for the iPad" if it's isn't even running on it?)
__________________

Highlight PDF text like no other app: iHighlight (now available for iPad and iPhone!)
-----
Create iPhone lists with no typing: Insta-List
-----
Make spelling fun, and create your own tests: iWillSpell
-----
A fast, elegant flashlight app: Insta-Light
-----


FourSixteen Productions
MattW is offline   Reply With Quote
Old 09-08-2011, 05:56 PM   #7 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Quote:
Originally Posted by MattW View Post
(And another thing: how can it be "completely designed for the iPad" if it's isn't even running on it?)
Maybe he means it's a website/webapp optimized for running on a mobile device, kind of like m.facebook.com , m.gmail.com etc.
Personally I don't like the term web app, sure it's not a static page, but websites weren't static a long time ago. It runs on the server, it runs in the browser, it's a website. Deal with it.

Back to the topic, I'm still not sure what's going on here, but hopefully answers to your questions might shed some light.
baja_yu is offline   Reply With Quote
Old 09-08-2011, 06:01 PM   #8 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 11
Elihu5991 is on a distinguished road
Default woops

Sorry, I meant load a site in teh web, which requests it from the server.

It is basically a website optimized for the iOS. It uses iWebkit.

How will Safari will do better?

iPode = like your humour ;D

It will be running on the iPad; we're in development stage at the moment.

Still, as I am learning, how will I do it?

Thanks for helping me out thus far everyone XD

Quote:
Originally Posted by MattW View Post
I think some clarification of terms is needed:

Port = take an existing lump of code and get it running on a different device. This might be a different OS, different language, or whatever. Is that what you're trying to do?

Web app = a web page? If it's just HTML, then use a UIWebView to display it.

Apple not approving = Apple will reject your app when you submit it if all it does is display a web page - Safari will do that far better than your app will.

iPode = no idea.

(And another thing: how can it be "completely designed for the iPad" if it's isn't even running on it?)
Elihu5991 is offline   Reply With Quote
Old 09-08-2011, 06:04 PM   #9 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 11
Elihu5991 is on a distinguished road
Default sorry about my misclarity

Yes, it is optimized for the iPad. We wont be having the whole m. thing; that's not our criteria - though for another project I might.

Yeah, your right; though then what do you define a web app as? Check this site: Online tools and applications - Go2web20 <<< what do you think of the 'web apps' there? Am curious in getting a better understanding in what your saying.

I'm basicly trying to make a website appear in a iPhone app.

Quote:
Originally Posted by baja_yu View Post
Maybe he means it's a website/webapp optimized for running on a mobile device, kind of like m.facebook.com , m.gmail.com etc.
Personally I don't like the term web app, sure it's not a static page, but websites weren't static a long time ago. It runs on the server, it runs in the browser, it's a website. Deal with it.

Back to the topic, I'm still not sure what's going on here, but hopefully answers to your questions might shed some light.
Elihu5991 is offline   Reply With Quote
Old 09-08-2011, 06:40 PM   #10 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Don't worry about the first part of my post, that was just some ranting.

So what you have is basically a website that you open up with a URL. Unfortunately, the only way to do this on iPhone/iPad is to open the Safari browser and type in your URL. Earlier you could make a native app which consisted of an embedded browser that loads your site, but Apple no longer allows that. So your only option is for the user to make a bookmark to your site in Safari.
baja_yu is offline   Reply With Quote
Old 09-08-2011, 08:16 PM   #11 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 11
Elihu5991 is on a distinguished road
Default What exactly it is doing

Which post? they sound similar in tone.

Our supervisor says it is possible and showed us how to make a button that would link to a webpage and open it up. What I want is the app, when pressed, to automatically open it up. Al the necessary functions are in the website.

I sincerely apologise for my ambiguity. I am new to iOS development.

Quote:
Originally Posted by baja_yu View Post
Don't worry about the first part of my post, that was just some ranting.

So what you have is basically a website that you open up with a URL. Unfortunately, the only way to do this on iPhone/iPad is to open the Safari browser and type in your URL. Earlier you could make a native app which consisted of an embedded browser that loads your site, but Apple no longer allows that. So your only option is for the user to make a bookmark to your site in Safari.

Last edited by Elihu5991; 09-08-2011 at 08:17 PM. Reason: changed familiar to similar in tone
Elihu5991 is offline   Reply With Quote
Old 09-08-2011, 08:25 PM   #12 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 577
Speed is on a distinguished road
Default

Elihu5991,

In your RootViewController, which is essentially the first screen in your application, you can create an instance of the UIWebView class - which displays a webpage embedded inside of your application.

You can add this code into your viewDidLoad method and it will display when your application launches.

Code:
UIWebView *aWebView = [[UIWebView alloc] init];
[aWebView setFrame:CGRectMake(0, 0, 320, 460)];
[aWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[@"http://www.YOURWEBSITE.com/" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]];
[self.view addSubview:webView];
[aWebView release];
This by its self will get your application rejected, as it doesn't provide any native functionality.

What I would personally recommend would be to create an API that you can use on the iPhone side - and re-write your web-app to work natively, instead of through a browser. Therefore, you would be able to have an application in the App Store, and a faster experience for the user.

Last edited by Speed; 09-08-2011 at 08:27 PM.
Speed is offline   Reply With Quote
Old 09-08-2011, 09:20 PM   #13 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 11
Elihu5991 is on a distinguished road
Default

To improve my skill, I will still follow those steps; but in the future, I do hope to make actual apps.

Did Apple used to accept apps like it?

I'm currently not at a Mac so I can't try it yet; when I do, I'll let you know.

How do I create an API?

How will this method create a faster experience for the user?
Quote:
Originally Posted by Speed View Post
Elihu5991,

In your RootViewController, which is essentially the first screen in your application, you can create an instance of the UIWebView class - which displays a webpage embedded inside of your application.

You can add this code into your viewDidLoad method and it will display when your application launches.

Code:
UIWebView *aWebView = [[UIWebView alloc] init];
[aWebView setFrame:CGRectMake(0, 0, 320, 460)];
[aWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[@"http://www.YOURWEBSITE.com/" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]];
[self.view addSubview:webView];
[aWebView release];
This by its self will get your application rejected, as it doesn't provide any native functionality.

What I would personally recommend would be to create an API that you can use on the iPhone side - and re-write your web-app to work natively, instead of through a browser. Therefore, you would be able to have an application in the App Store, and a faster experience for the user.
Elihu5991 is offline   Reply With Quote
Old 09-08-2011, 09:42 PM   #14 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 577
Speed is on a distinguished road
Default

Quote:
Originally Posted by Elihu5991 View Post
Did Apple used to accept apps like it?
Yes, back in the day.

Quote:
Originally Posted by Elihu5991 View Post
How do I create an API?
You would have to talk with your web developers on having them make a web based API.

Quote:
Originally Posted by Elihu5991 View Post
How will this method create a faster experience for the user?
Creating a native application allows you to take advantage of the iPhone's hardware in creating your application, rather than having something on the web.
Speed is offline   Reply With Quote
Old 09-09-2011, 07:33 PM   #15 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 11
Elihu5991 is on a distinguished road
Default

I am also partially part of the web development team; I've contributed code. Could you please still tell me how?

Though our site loads in an instant and runs really smooth. So how would this make a difference? Remember, I'm new to iOS development - so forgive me of my ignorance (ie. lack of knowledge).

P.S All of you are so helpful!

Quote:
Originally Posted by Speed View Post
Yes, back in the day.



You would have to talk with your web developers on having them make a web based API.



Creating a native application allows you to take advantage of the iPhone's hardware in creating your application, rather than having something on the web.
Elihu5991 is offline   Reply With Quote
Old 09-09-2011, 07:47 PM   #16 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Quote:
Originally Posted by Elihu5991 View Post
I am also partially part of the web development team; I've contributed code. Could you please still tell me how?
We can't tell you much because we have no idea what your website does.

Quote:
Originally Posted by Elihu5991 View Post
Though our site loads in an instant and runs really smooth. So how would this make a difference? Remember, I'm new to iOS development - so forgive me of my ignorance (ie. lack of knowledge).
We also, still, aren't clear on what you really want to do. If you just wanted an app that will load your website, as already stated that's no longer an option. So you'll either have to have the user create a bookmark in Safari, in which case your work is done, or recreate parts of your website (Webapp) as a native iPhone app so it can be accepted into the App Store. In that case things get much more complicated, and again we can't tell you anything because we don't know what your website does. But you should move parts that can function offline to the app, and have the app communicate with your server for the services it needs to get from it. If you worked on the website this should be pretty clear to you. If it was for example a Webmail, you would do all the interface, composing mail, saving drafts etc to the app, and just have the app communicate with the server for sending and receiving emails.
baja_yu is offline   Reply With Quote
Old 09-09-2011, 07:59 PM   #17 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 11
Elihu5991 is on a distinguished road
Default Oh

I told our supervisor with what you told me about it not being accepted in the app store; but he said it was possible.

I think he meant it is an app that loads the site within itself.

Would anyone know a place where I can learn the syntax of Objective-C? Knowing syntaxes of languages really helps understand the code better and follow the tutorials; because I believe this calls for us possible partially remaking the app to be accepted.

Its the weekend for me, so I'll have to wait till Monday to speak to him and clarify the ambiguities.

Quote:
Originally Posted by baja_yu View Post
We can't tell you much because we have no idea what your website does.



We also, still, aren't clear on what you really want to do. If you just wanted an app that will load your website, as already stated that's no longer an option. So you'll either have to have the user create a bookmark in Safari, in which case your work is done, or recreate parts of your website (Webapp) as a native iPhone app so it can be accepted into the App Store. In that case things get much more complicated, and again we can't tell you anything because we don't know what your website does. But you should move parts that can function offline to the app, and have the app communicate with your server for the services it needs to get from it. If you worked on the website this should be pretty clear to you. If it was for example a Webmail, you would do all the interface, composing mail, saving drafts etc to the app, and just have the app communicate with the server for sending and receiving emails.
Elihu5991 is offline   Reply With Quote
Old 09-09-2011, 08:06 PM   #18 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

There are no ambiguities here. It wont be accepted. Tell him to read the App Store Review Guidelines: https://developer.apple.com/appstore...uidelines.html

If he still wants to waste time and money, by all means, proceed with it.

If you want to learn the syntax, start here for the very basic: Loading… then read this "definitive" guide: Loading…

And just an FIY, making an app that just loads a webpage takes literally 3 minutes, and it's one of the reason's it's not getting into the store. Imagine how many of those "apps" we'd have if everyone with a website published one.

So tell your boss to get his head out of his butt, and feel free to buy me a beer with the money you save the company
baja_yu is offline   Reply With Quote
Old 09-09-2011, 08:14 PM   #19 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 11
Elihu5991 is on a distinguished road
Default

Quote:
Originally Posted by baja_yu View Post
There are no ambiguities here. It wont be accepted. Tell him to read the App Store Review Guidelines: https://developer.apple.com/appstore...uidelines.html

If he still wants to waste time and money, by all means, proceed with it.

If you want to learn the syntax, start here for the very basic: Loading… then read this "definitive" guide: Loading…

And just an FIY, making an app that just loads a webpage takes literally 3 minutes, and it's one of the reason's it's not getting into the store. Imagine how many of those "apps" we'd have if everyone with a website published one.

So tell your boss to get his head out of his butt, and feel free to buy me a beer with the money you save the company
I meant ambiguities in me interpreting his message.

It takes three minutes for you because you are a pro; I'm still learning remember

I can't see the guidelines because I'm not registered as an Apple Developer.

I like your sense of humour ;D

P.S The link you gave me to read say loading; but they do work. I'll read them and let you know when I am done - but then again, I'm multitasking and working on another project for our site (which is with another group of people, not the same ones as the ones for the iOS app).

Last edited by Elihu5991; 09-09-2011 at 08:15 PM. Reason: forgot to mention about not being an apple developer
Elihu5991 is offline   Reply With Quote
Old 09-09-2011, 08:16 PM   #20 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Here's a tutorial, with it you'll need 5 minutes UIWebView Tutorial | iPhone SDK Articles
baja_yu is offline   Reply With Quote
Old 09-09-2011, 08:25 PM   #21 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 11
Elihu5991 is on a distinguished road
Default

Wow, that looks very similar to our code. We were given a file called Skeleton. We need to edit around and play with it and Interface Builder to work with it and accomplish our goal. I've also noticed that you don't even access Interface Builder. Gosh, I really need to talk to him on Monday.
Elihu5991 is offline   Reply With Quote
Reply

Bookmarks

Tags
embed, iphone, port

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 377
8 members and 369 guests
apatsufas, JackReidy, jeroenkeij, Sami Gh, tim0504, UMAD, yomo710
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,671
Threads: 94,121
Posts: 402,904
Top Poster: BrianSlick (7,990)
Welcome to our newest member, JackReidy
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:53 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0