0

I define a global constant in swift file and can use it in other swift file. but I failed to use it in OC files.Did i missing something?

1 Answers1

0

Global variables / constants defined in Swift don't import to ObjC. It's pretty much just classes and (Int-based) enums that do. See Swift Type Compatibility in Using Swift with Cocoa and Objective-C.

rickster
  • 124,678
  • 26
  • 272
  • 326