Xcode 7 on Yosemite: XCTest no longer compiles .mm objective-c ++ files

After upgrading to Xcode 7 on OSX Yosemite (10.10.5), my .mm XCTest file no longer compiles. I get the following errors:

 In file included from /Users/.../unit_test.mm:9: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.h:32: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Security.framework/Headers/SecItem.h:985:49: error: expected ';' after top level declarator extern const CFStringRef kSecUseAuthenticationUI ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Security.framework/Headers/SecItem.h:987:54: error: expected ';' after top level declarator extern const CFStringRef kSecUseAuthenticationContext ^ ... 

The lines he complains about are as follows:

 extern const CFStringRef kSecUseAuthenticationUI __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0); extern const CFStringRef kSecUseAuthenticationContext __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0); 

While this has no problems with these ads:

 extern const CFStringRef kSecUseItemList __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_2_0); 

It looks like the update added the __MAC_10_11 line and the .mm files no longer compile with XCTest on OS 10.10.

Does anyone know of a workaround other than upgrading to OS 10.11?

Thanks.

+5
source share

Source: https://habr.com/ru/post/1233487/


All Articles