Upvote:2

Aprove answer

  I've got it.

  As these three pictures showing below:

Based SDKs

Deployment Target

Based SDK in Run Scheme

The key to the question is, that Xcode must compile project by based SDK 5.1 or later. But the based SDK is not the one in project settings. Like me, I put three versions of iOS SDK into the directory, so there are 3 devices in Run Scheme(as picture3 shows) and its order is the same as the based SDK. I need choose based SDK iOS 5.1 or later in Run Scheme, then it will work well.


Credit Goes to: stackoverflow.com

Related question with same questions but different answers