Xcode should check availability of classes in deployment target

Originator:tobias.banaszak
Number:rdar://26239932 Date Originated:12-May-2016 09:00 AM
Status:Duplicate 7184689/Closed Resolved:
Product:Developer Tools Product Version:Xcode 7.3.1
Classification:Bug Reproducible:Always
 
Summary:
We are building an iOS app configured to "deployment target": "8.0". We recently adopted the new 3D-touch features on the app-icon. Unfortunately, Xcode does not detect that using UIApplicationShortcutItem and setting [UIApplication sharedApplication].shortcutItems may crash the app on iOS 8-devices. Xcode knows that this app should run on iOS 8, so it should check if all APIs are available.

Steps to Reproduce:
Create a new app
set deployment target to iOS 8
Set [UIApplication sharedApplication].shortcutItems to a list of UIApplicationShortcutItem.


Expected Results:
Xcode should display a warning that these classes are not available at current build target and that the developer should take care of this

Actual Results:
Xcode silently builds the app. the app will crash on iOS 8 where these classes are not available.

Version:
Version 7.3.1 (7D1014)
El Capitan 10.11.4 (15E65)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!