Welcome Guest, Not a member yet? Register   Sign In
iPhone specific website
#1

[eluser]ravi kiran[/eluser]
I am developing a directory listing website using codeigniter. Now my client wants me to develop the same website specific to iPhone. Will this involve only changing VIEW(template) or anyother thing and also can anyone suggest the best approach to do this.

Thanks
Ravi Kiran
#2

[eluser]NogDog[/eluser]
I think it depends on what exactly your client considers to be different. If it's purely a look-and-feel question, I would probably try to address it via the CSS stylesheet by making use of media types.

If you need to significantly change what gets output, you could look into using the get_browser() function to conditionally select which view is to be loaded.
#3

[eluser]Kromack[/eluser]
Sometimes iPhone sites are located in m.yourdomain.com or iphone.yourdomaine.com.

For one of our client, we made a second instalation of CI with only the iPhone views (because this is a static website) in the subdomain, this wiki page could help.

Basically, you only need to change the views to display iPhone content. So, if you want to keep your controllers job in one place, I think you can also templating your views to display iPhone or stantards views. You can easily detect mobile users with the user_agent library.
#4

[eluser]oddman[/eluser]
[quote author="Kromack" date="1240334132"]Sometimes iPhone sites are located in m.yourdomain.com or iphone.yourdomaine.com.

For one of our client, we made a second instalation of CI with only the iPhone views (because this is a static website) in the subdomain, this wiki page could help.

Basically, you only need to change the views to display iPhone content. So, if you want to keep your controllers job in one place, I think you can also templating your views to display iPhone or stantards views. You can easily detect mobile users with the user_agent library.[/quote]

This seems like overkill when you should be able to check the OS/Browser the user is using from the request info and then handling renders based on that. Ie:

Code:
if iphone
    render_dir = 'iphone'
else
    render_dir = 'default'

One codebase, different view directories - kind of like a separate theme for iphone.
#5

[eluser]Crimp[/eluser]
One problem you may have is that the browsing experience of mobile Safari is so good (and that's not only IMO) that some people may actually want to use the default site (more features, info, images, etc.) and not the version with the iPhone UI elements plastered all over it. If you put in place sniffing in your default controller and serve views based on user-agent, you override users who may want to use the main site instead. There would be no easy way for them to get to it. Since there is no way of knowing a user's preference (leaving out cookies), I think it may be preferable, given the excellence of mobile Safari, to develop an iPhone version with another controller and thus a different URL, like somedomain.com/iphone (or a subdomain). Users can then choose version by URL.
#6

[eluser]ravi kiran[/eluser]
Thanks Guys.
I just want to know if there is any library to develop iphone view in CI?
Or if you have any better solution please suggest.
#7

[eluser]Crimp[/eluser]
People use Joe Hewitt's iPhone UI, or whatever its latest name is. It's a framework for standard UI widgets. Google it for the Google code repo.
#8

[eluser]ravi kiran[/eluser]
Thanks Crim! I will look for it




Theme © iAndrew 2016 - Forum software by © MyBB