Ios Swift 2.2 |常量在@interface内定义,在Swift中无法访问@end关键字

Ios Swift 2.2 |常量在@interface内定义,在Swift中无法访问@end关键字,ios,objective-c,swift2.2,Ios,Objective C,Swift2.2,在Xcode 7.3和swift 2.2之后,@interface和@end关键字中定义的我的常量在swift中不可访问,可能是swift将它们标记为private或类似的东西 如何在swift代码中公开我的常量 // Constants.h @interface Test extern NSString * const BASE_URL; @end // Constants.m @implementation Test NSString * const BASE_URL=@"

在Xcode 7.3和swift 2.2之后,@interface和@end关键字中定义的我的常量在swift中不可访问,可能是swift将它们标记为private或类似的东西

如何在swift代码中公开我的常量

// Constants.h
@interface Test
    extern NSString * const BASE_URL;
@end

// Constants.m
@implementation Test
    NSString * const BASE_URL=@"http://my-server.com/";
@end
有人建议从@interface中取出常量以使其可见,但我不确定这种解决方案的后果


你知道怎样才能把它修好吗。

你当初为什么要这么做?