Added iPhone 3G compatibility