Cannot access property on Swift type from Objective-C

Optional values of non-Objective-C types aren’t bridged into Objective-C. That is, the first three properties of TestClass below would be available in Objective-C, but the fourth wouldn’t: class TestClass: NSObject { var nsNumberVar: NSNumber = 0 // obj-c type, ok var nsNumberOpt: NSNumber? // optional obj-c type, ok var doubleVar: Double = 0 // bridged … Read more

How to modify SWIFT_MODULE_NAME?

The module name comes from the Product Module Name build setting: The SWIFT_MODULE_NAME setting is apparently hidden, but you can see its derivation by looking at Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/XCLanguageSupport.xcplugin/Contents/Resources/Swift.xcspec: … { Name = “SWIFT_MODULE_NAME”; Type = String; DefaultValue = “$(PRODUCT_MODULE_NAME)”; CommandLineArgs = ( “-module-name”, “$(value)”, ); }, …