Xcode 8 - XCODE_VERSION_MAJOR causes compilation issue
Xcode 8 - XCODE_VERSION_MAJOR causes compilation issue
- Subject: Xcode 8 - XCODE_VERSION_MAJOR causes compilation issue
- From: Sasikumar JP <email@hidden>
- Date: Thu, 11 Aug 2016 12:39:48 +0530
Hi,
Xcode defines following build variables, we can not use them in Xcode 8
as the values are invalid octal number.
XCODE_VERSION_ACTUAL = 0800
XCODE_VERSION_MAJOR = 0800
XCODE_VERSION_MINOR = 0800
I am working on iOS project, it should be compilable in both Xcode 7 and
Xcode 8.
I am planning to add the conditional compilation like below
preprocessor macro:
XCODE_VERS=$(XCODE_VERSION_MAJOR)
#if XCODE_VERS > 0700
@interface SampleTableCell : UITableViewCell<CAAnimationDelegate>
#else
@interface SampleTableCell : UITableViewCell
#endif
But this code throws the compilation error (Invalid digit '8' in octal
constant) in Xcode 8, since 0800 is not a valid octal value.
Is there any work around other than creating 2 different targets(separate
target for Xcode 7 and Xcode 8)
Regards
Sasikumar JP
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden