Force IE8 into compatibility mode

If your website is rendered wrong in IE8, you can force it to render in IE7 compatibility mode.

Use a simple meta tag:


 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

Analytics for iPad, Release 1.3

Just a few minutes ago a new update was submitted to Apple.

It will contain three very exciting new features:


1) The often requested row-selection

You are now able to select the number of rows to display. Choose between 10, 25, 50, 100, 250 and 500 rows.
But remember, the more you select, the longer you will need to wait!


2) Sub-Categories for the Traffic Sources

Do you want to see how your campaigns perform? Which goals or what revenue you get from a single source?
These are the reports you have waited for!


3) Page filter for Content reporting

Do you want to analyze just a small portion of your content?
Use the page filter to search for them. Only matching results will be included in the report!


For a better screen overview, the new reportings options will only be visible when available.


The release also includes a small improvement:
The compare switch is now independently saved.

And an important bugfix:
Special characters in website names caused the App to crash.

2010/07/23 – Today the update hit the store, watch out for update notices in iTunes or the App Store to get it on your iPad!

Detecting iPad Orientation in Safari using JavaScript

I stumbled on that by accident. One of my javascript-variables was called orientation and was not correctly used on the iPad’s Safari.

After looking at its content, I found out that you can detect the device orientation. I knew you can handle many cool things on the iOS, like swipes in javascript, but this one was new to me.

So, what are you going to do with this? It’s obvious: Style your website or re-order your content to match exactly your iPad’s orientation ;-)

You can use javascript in an event handler, loop, or whatever by accessing window.orientation (or only orientation).

Here’s an example on how to detect the current orientation of the iPad device either by pressing a button or when the orientation changes, using an event called onOrientationChange:





You can also use CSS Stylesheets using the media definition:




The detection is not restricted to the iPad, it should work on all iOS devices.

Time-based Kill-Switch for iOS Apps

If you want to set your App to stop working at a specific date, you are thinking about a time-based Kill-Switch.

You will want to do something like that if you worry about illegal copies of your Apps, you have sent out for testing purpose.

Realizing such switch is very easy, here’s an example:

	NSDate *killDate = [NSDate dateWithTimeIntervalSinceNow:0];
	int killDateTs = [killDate timeIntervalSince1970];
	if ( killDateTs > 1280624461 ) { // 2010-08-01
		exit(0);
	}


Replace the timestamp with your own expire time and your App will stop working at that day.

Amazon S3 with Bucket Policies

I received a newsletter from amazon some hours ago with some news about S3:

[..]
We are pleased to announce beta support for Amazon S3 bucket policies, which gives customers the ability to create conditional rules for managing access to their buckets and objects. Amazon S3 customers now have the following options for restricting access to their resources:

  • Authenticated requests: Allow or deny access based on AWS account
  • Query string authentication with expiring URLs: Allow temporary access to resources
  • Request-based restrictions: Allow or deny access based on request attributes, such as HTTP referrer and IP address

With bucket policies, customers can also now define security rules that apply to more than one object, including all objects or a subset of objects within a bucket. This makes updating and managing permissions easier.
[..]

This makes S3 much more fun! You can create temporary access to resources based on a query string like session id’s.

You can restrict content to be used only within your website without external linking (HTTP referrer).

And simple group editing using security rules, just change the rules for a folder with one command instead of executing it for every file!

I like that!

More control over your own data and easier editing!


How to create an .ipa for your App

Apple delivers Apps via iTunes using .ipa files. If you want to deliver some Apps to your testers, you can either sync your App to their device or send them an .ipa too.

An .ipa is nothing more than a simple ZIP archive you can create yourself in three easy steps.


Step 1

  • Create a folder called “Payload
  • and put your App into it


Step 2

  • Copy your big PNG or JPEG Icon (the 512×512 pixels one) into the same folder where Payload folder resides in and
  • rename the icon to “iTunesArtwork” (yes, no extension)

This step is optional. If you don’t care about an icon in iTunes, ignore it.


Step 3

Compress both, the Payload folder and the iTunesArtwork file into one ZIP archive


Rename the .zip extension into .ipa and voila, you got your ipa for distribution to your testers!

Your testers can double-click the .ipa and sync it to their devices via iTunes.


Btw. ipa stands for iPhone/iPod Touch Application



Switch to our mobile site