0

enter image description here

enter image description here

enter image description here

If remove swift file from project it is complied successfully. if add then get error.

Sasha Sewerow
  • 117
  • 2
  • 7

1 Answers1

0

#defines get converted to Swift by trying to figure out the type. For instance

#define B @"b"

...becomes:

var B: String { get }

Find details in this answer.

As your define #define MY_EXPORT does not provide a type, the conversion fails.

This code would work:

Prefix.pch:

#define MY_EXPORT @"Olala"

MyOneClass.m:

#import "MyOneClass.h"

@implementation MyOneClass

- (void)method {
    NSString *useIt = MY_EXPORT;
}

@end
shallowThought
  • 19,212
  • 9
  • 65
  • 112