When developing applications for Apple iPhone

Things you CAN:

1. You can intergrate google maps links (both places and routes). This is a great feature for businesses to provide directions to their location.
In order to place a link to a place you use something like this:
Cupertino
If you want to place a route link you use:
Directions

2. You can use direct links to phone numbers, that the users can click to call. This is a great feature for places that require phone reservations (like restaurants).
To do so you have to wrap the number into a link like this:
1-408-555-5555
The browser automatically converts any number that looks like a phone to a link (if you want to prevent it you must break up the numbers using span elements, for example).

3. You can use the following web standards when designing a page for iPhone's Safari:
- HTML 4.01
- XHTML 1.0
- CSS 2.1 and partial CSS 3.xx
- JavaScript 1.4, including DOM support
- AJAX technologies, including XMLHTTPRequest

4. You can know if the user views your site through iPhone or another browser, so you can display your site in the appropriate way.
iPhone's user agent is:
Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3

5. You can use the following media:
Images:
GIF
PNG
TIFF
JPG
Audio:
AIFF
MP3
AAC
MPEG audio
AMR
3GPP
MPEG-4 audio
WAVE
3GPP2
Video:
M4V
3GPP
Quick Time Movie
3GPP2
MPEG-4

6. You can use cookies - i think we all know the use of this feature;

7. You can add event handlers to your page using the modern DOM API, add event listener, or the more traditional onclick attribute.

8. You can use double tap. This is a new form of user interaction with an web page that enlarges an element when the user double taps it. The element can be a DIV, list, table or an image. When double tapped it becomes full screen, if double tapped again it zooms out. This can lead to some interesting efects.

9. You can control the way Safari scales your content trough the "viewport" meta tag.
The viewport meta tag properties are:
width The default is 980. The range is [200, 10,000].
height The default is calculated based on the width and aspect ratio. The range is [223, 10,000].
initial-scale is the scale to render the page when it first loads. The default fits the page to the screen.
The range is [minimum-scale, maximum-scale]. Keep in mind that the user can change the scale, either through the pinch gesture or by a double tap.
user-scalable determines whether or not the user can scale the page. The default is yes.
minimum-scale is the lower bound for scaling. The default is 0.25; the range is [>0, 10].
maximum-scale is the upper bound for scaling. The default is 1.6; the range is [>0, 10].

Here are some examples:


10. you can override Safari’s default text size adjustment using this CSS property:
Can also be set to auto and a procentage mutiplier: style="-webkit-text-size-adjust:200%"

Things you CAN'T:

1. You can't use too many links on a page, because of the finger input. This is a common sense restriction, since the small screen will also require large text, for better readability.

2. You can't use file upload - This restriction's main disadvantage is that it will not allow users to upload pictures from iPhone's camera.

3. You can't use flash or java - This has been dicussed over the web even before the iPhone was launched, so no comments are necesarry.

4. You can't use mouse over events, also a nobrainer, because of the finger imput method.This eliminates hover styles, tips, or any other element that requires a mouse over event.

5. You can't use cut, copy, paste, drag-and-drop, and text selection operations. This can be a brake to text editing applications.

6. You can't use windows, resizing and scroll bars. The browsers automaticaly resizes the content to fit the screen. It can only scroll up or down.

7. You can't use WML (Wireless Markup Language). I bet noone will miss it.

8. You can't use downloads or plug-ins.

9. You can't use flash movies or media players because of the lack of flash support. The supported media formats will be launched by the iPhone direcltly so it's better to provide links to the media files.

10. You can't use frames. But you don't want to either.

0 comments

Post a Comment