0

Use device on iOS 5.1 with XCode 4.2

-
ios

You have to install latest iOS version (5.1) to your xcode to detect your ios5.1 devices. But it does not included in xcode4.2 installer, so you have to upgrade your OS to 10.7.

There is a way to install iOS sdk 5.1 to your xcode 4.2 running on Mac OS X 10.6.x.

First, you have to download latest xcode installer here (mine is xcode_4.3.1_for_lion.dmg, you may have to login to download)

Open terminal (Application->Utilities->Termial) and type these commands:

  1. sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
  2. sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
  3. sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1\ \(9B176\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
  4. sudo rm -f /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest
  5. cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
  6. sudo ln -s ./5.1\ \(9B176\) ./Latest
sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1\ \(9B176\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
sudo rm -f /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest
cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
sudo ln -s ./5.1\ \(9B176\) ./Latest
  1. <code>
  2. </code>
<code>
</code>

Restart you xcode and now it works.

0

DETweetComposeViewController for iOS

-

An iOS 4 compatible version of the TWTweetComposeView controller. Otherwise known as the Tweet Sheet.
Full

0

How to Restrict Your iOS App to Modern Hardware

-

Marco Arment posted one of his regular iOS device and OS version stats overviews yesterday. While Marco’s stats obviously only represent Instapaper users and one has to be careful how representative the data is, these updates are nevertheless very welcome as they represent one of very few publicly available data points to estimate the adoption rate of iOS versions.

iOS 5 Adoption Rate Only at 45%

The most striking number to me is the rate of iOS 5 adoption: across Instapaper users on all iOS devices, 45% are running iOS 5. This strikes me as quite low. I would have expected a number in the range of 70–80%, especially considering that Instapaper users are probably significantly more geeky than the average iOS device owner.

How to Forcefully Exclude Older Devices From Running Your App

According to Marco’s numbers, having an app that requires iOS 5 would still exclude a lot of users at this time. Most developers should probably wait a least a few more months until they cut off iOS 4 support. For developers of apps that require a relatively high-performance device to run smoothly, that begs the question: how do I best restrict my app to only run on newer devices?

It is important to implement such a restriction in a way that enforces it not only at runtime but also at install time. Otherwise, you will (rightfully) get lots of e-mail from angry iPhone 3G owners (if your app even makes it through the review process). Here are the options you have:

1. Require a Certain iOS Version

We just learned that it is probably too early to require iOS 5.0 but what about iOS 4.3? iOS 4.3 does not run on anything that’s older than the iPhone 3GS and it has an adoption rate of 88% in Marco’s stats. In fact, that is what Marco recommends:

Developers of CPU-intensive iPhone apps and games can celebrate the continued infiltration of faster hardware, with at-least-3GS-class CPUs in 94.39% of iPhones and iPod Touches. Apps that need high performance can probably start requiring iOS 4.3 (87.8%) to forcefully cut support for the much slower old CPU in the iPhone 1, iPhone 3G, and 1-2G iPod Touches.

2. Require Certain Device Features such as OpenGL ES 2

If your app uses OpenGL ES 2, you are done because the GPUs in devices before the iPhone 3GS do not support that version. All you need to do is specify opengles-2 under theUIRequiredDeviceCapabilities key in your Info.plist file.

This is a convenient option but you should only use it if your app really uses and requires this special feature. Don’t just arbitrarily select a convenient option from the available device capabilities.

3. Require the armv7 CPU Architecture

One convenient way to sort of circumvent this rule is to explicitly require a device with a fast CPU: one of the options for UIRequiredDeviceCapabilities is armv7, which tells Apple and the OS that your app only runs on the modern CPU architecture that is used by the iPhone 3GS and all newer iOS devices. That way, you can allow iOS versions 4.0–4.2 and still restrict your app to modern hardware. (Please only do this if your app is really close to unusable on an iPhone 3G. Users of older hardware are probably used to somewhat slow performance, so they won’t necessarily hold it against you if your app stutters a bit.)

Requiring the armv7 CPU architecture in the UIRequiredDeviceCapabilities key.

Requiring the armv7 CPU architecture in the UIRequiredDeviceCapabilities key.

Note: Patrich Burleson noted on Twitter that he heard of app rejections when apps added new requirements to the UIRequiredDeviceCapabilities in an update. I find it hard to believe that that is a general rule. It must be allowed for existing apps to switch to OpenGL ES 2.0, for example. But it’s probably good to keep in mind.

1

iOS Open Source : Custom Progress Indicator

-

DDProgressView, written by Damien DeVille, is an easy to implement control for showing an animated progress indicator. There are three customizable values in this control, the inner color, outer color and the color of the progress indicator when empty (essentially the background color). To move the indicator forward or backward, you update a value (a float) in the control, which affects how the control is drawn.

In the screenshot above, the top progess view has an outer color of cyan and an inner color that is blue. The second bar has an outer color that is defined as [UIColor clearColor]], an inner color that is light gray and empty color that is white.

The example included with DDProgressView – which is the basis of the screenshots above – demonstrates how to create two controls, set their color values and update the progress indicator using an NSTimer with a scheduled timer interval.

Download DDProgressView

You can download DDProgressView from github.

0

Installing 4.3 iPhone Simulator in Xcode 4.2 (iOS5 SDK)

-

After having used all the betas of Xcode 4.2 and the iOS5 SDK I faced several problems when finally I downloaded the official Xcode 4.2 from the App Store. I wanted to anyways get rid of Xcode 3.x, 4.1 and so on (I kept them all installed around my hard drive) so I deleted and installed a fresh copy of Xcode 4.2 (btw I’m very pleased with the progress Apple made on Xcode’s stability and feature list).

However a fresh install of Xcode 4.2 comes with only a 5.0 iPhone and iPad Simulator. Luckily you can now pretty easy install also older version of the SDK. Just follow the easy steps below:

1. Simulator 5.0 only, but how to test whether your app is compatible with iOS 4.3?

2. Aha!, click on “More Simulators…”

3. Click “Install” on the row where it says “iOS 4.3 Simulator”

4. After the 4.3 Simulator is downloaded you’ll most probably see this alert (if you have the Simulator app already running)

5. Immediately after the install is done have a look at the list of available schemes in your project and …

That’s all – you can now test in both iOS 5.0 and iOS 4.3

All in all it’s about safe to support only 5.x when there’s a 5.1 release, by that time usually enough people have upgraded their devices (not counting the jail breakers of course, they update when there’s the relevant jail-break, but they are less likely to buy your app anyway…)

That’s it for today, more iOS5 posts to come.

1 2 3 »