tobinharris
tobinharris

Reputation: 2559

Use of empty enum after switching to XCode6

After loading an iPad project in XCode 6, I see "parse issue: use of empty enum" in UIDevice.h.

enter image description here

The problem goes away if I set the Base SDK to 8.1 (latest), but not if I set it to 7.1. __IPHONE_3_2 is less than both of those, so don't quite get it!

Upvotes: 1

Views: 445

Answers (2)

Mr. Berna
Mr. Berna

Reputation: 10655

This error popped up for me when I upgraded to Xcode 6.2, but only when building for the simulator, not when building for a device. I had installed the iOS 7.1 SDK from Xcode 5 into Xcode 6.2, because I have a legacy project that we haven't yet updated for iOS 8. On this project I have the Base SDK set to iOS 7.1.

I fixed it by installing the iOS 7 SDK for the simulator from Xcode 5 into Xcode 6.2. Xcode apparently processes #if __IPHONE_3_2 <= __IPHONE_OS_VERSION_MAX_ALLOWED wrong when the base SDK is set to iOS 7 but that SDK is not actually available.

To install the iOS 7 SDKs into Xcode 6, start by getting a copy of Xcode 5. Apple makes old versions of Xcode available to developers at https://developer.apple.com/downloads. The SDK's are in Xcode.app ▸ Contents ▸ Developer ▸ Platforms ▸ iPhoneSimulator.platform ▸ Developer ▸ SDKs and Xcode.app ▸ Contents ▸ Developer ▸ Platforms ▸ iPhoneOS.platform ▸ Developer ▸ SDKs. Move them to the same location in Xcode 6.

Upvotes: 1

xastor
xastor

Reputation: 482

I had this problem too in XCode 6.1.1 and "fixed it" by downgrading back to XCode 6.1. You can just remove XCode from your applications and then install Xcode 6.1 from the apple developer downloads site.

https://developer.apple.com/downloads

Upvotes: 1

Related Questions