import magic for objective c utils

This commit is contained in:
John Estropia
2016-06-20 20:28:25 +09:00
parent 0b48bb3347
commit 11d428c05c
3 changed files with 16 additions and 1 deletions

View File

@@ -15,7 +15,8 @@ Pod::Spec.new do |s|
s.source_files = "Sources", "Sources/**/*.{swift}"
s.frameworks = "Foundation", "CoreData"
s.requires_arc = true
s.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS' => '-D USE_FRAMEWORKS' }
s.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS' => '-D USE_FRAMEWORKS',
'GCC_PREPROCESSOR_DEFINITIONS' => 'USE_FRAMEWORKS=1' }
s.dependency "GCDKit", "1.2.5"
end

View File

@@ -2422,6 +2422,7 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
"USE_FRAMEWORKS=1",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -2472,6 +2473,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_PREPROCESSOR_DEFINITIONS = "USE_FRAMEWORKS=1";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;

View File

@@ -24,8 +24,20 @@
//
#import "CoreStoreBridge.h"
#if USE_FRAMEWORKS
#import <CoreStore/CoreStore-Swift.h>
#elif !defined(SWIFT_OBJC_INTERFACE_HEADER_NAME)
#error Add "SWIFT_OBJC_INTERFACE_HEADER_NAME=$(SWIFT_OBJC_INTERFACE_HEADER_NAME)" to the project's GCC_PREPROCESSOR_DEFINITIONS settings
#else
#define _STRINGIFY(x) #x
#define STRINGIFY(x) _STRINGIFY(x)
#import STRINGIFY(SWIFT_OBJC_INTERFACE_HEADER_NAME)
#endif
CS_OBJC_OVERLOADABLE
CSFrom *_Nonnull CSFromClass(Class _Nonnull entityClass) CS_OBJC_RETURNS_RETAINED {