0

The problem is my app target is iOS 7.0 I'm using SDK 8.1 to build app with Xcode. And getting no warnings, no errors on methods available in SDK 8.+ only.

this compiles easy:

if ([test containsString:@"CRASH"]) {
    test = @"this code will never run on iOS 7";
}

Is there a way to crash a build If Im building an app for iOS 7.0 and using any methods available only since SDK 8? Ideally, If I'm using anything from "future" SDK versions?

Oleg Shanyuk
  • 1,296
  • 2
  • 15
  • 26
  • Why do you want the build to fail? The code is fine on iOS 8 devices. You need to app proper runtime checks. – rmaddy Dec 20 '14 at 17:30
  • @maddy because I can easily "autocomplete" with method, which will crash an app in iOS 7. The point is to make strict check of API use. – Oleg Shanyuk Dec 20 '14 at 17:32

0 Answers0