Dianne Hackborn and Jason Parks of Android talk about the platform J2ME: The Frustration
Dec 07

Trawlr Ben has posted about his experience creating an iPhone optimised version of Trawlr with iUI and Rails 2.

He goes through the steps that he went through, which include:

  • Mime type: Mime::Type.register_alias “text/html”, :iphone
  • Detecting the iPhone: def iphone_user_agent?
  • Store whether it should be adjusted for iPhone adjust_format_for_iphone
  • Using iUI and creating iPhone views
  • Mr. TopFunky himself showed up to share his 80% solution for using layouts to generically support the iPhone without having to update views for each page:

    layout :determine_layout
    
    def determine_layout
      if mobile_safari_subdomain_or_relevant_header?
        return "iphone"
      end
    
      return "application"
    end
    

Leave a Reply

Spam is a pain, we are sorry to have to do this to you, but can you answer the question below? If so, the comment will go through!

Spam Question: What is the number after 4?

Your Answer: