Swift #available check not working properly with min deployment target

Originator:christian.noon
Number:rdar://22307360 Date Originated:17-Aug-2015 08:03 AM
Status:Closed Resolved:23-Sep-2015 09:57 PM
Product:Developer Tools Product Version:Xcode 7 beta 5
Classification:Serious Bug Reproducible:Always
 
Summary:
I created a sample project that demonstrates an issue I'm running into when creating a background session configuration. In the example, I have two different targets that compile the code. The first is an iOS framework with a minimum deployment target of iOS 8.0. The second is an OS X framework with a deployment target of 10.9.

The issue that I'm running into is that the #available check is not working properly. It appears that the #available(OSX 10.10, *) is not picking up the iOS OS properly with the *. See the code for more details and workarounds.

Steps to Reproduce:
1. Open the sample project.
2. Compile the iOS framework.
3. You will see the compiler warning.

Expected Results:
No compiler warning would be thrown.

Actual Results:
Compiler warning is thrown.

Version:
Xcode 7 beta 5

Notes:


Configuration:


Attachments:
'AvailablilityCheck.zip' was successfully uploaded.

--------- EDIT ---------

Issue was resolved in Xcode 7.1 beta 2 - 7B75

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!