Hi everyone,
when I opened my app with xCode 7.3 beta (7D129n) I ran into several compiler issues regarding bridged data types. The app builds with xCode 7.2. I built following example which runs into the same problem: It compiles with xCode 7.2 but fails to build in xCode 7.3 beta with "Use of undeclared type 'MyType' ". Calling a method from the same class is building though.
Legacy.h:
#import <Foundation/Foundation.h>
@interface Legacy : NSObject
enum MyType : NSUInteger {
VAL_A = 0,
VAL_B = 1,
VAL_C = 2,
VAL_D = 3
};
- (void) doSomething;
@end
Legacy.m
#import <Foundation/Foundation.h>
#import "Legacy.h"
@implementation Legacy
- (void)doSomething {
// do some stuff
}
@end
SwiftClass.swift
import Foundation
class SwiftClass {
var legacy : Legacy = Legacy()
var type : MyType = VAR_A // the error is: Use of undeclared type 'MyType'
func doLegacyStuff() {
legacy.doSomething() // creating a Legacy-object and making a call will build
}
}
BetaProject-Bridging-Header.h
#import "Legacy.h"
Am I missing a change that was made for xCode 7.3 or is this an issue with the xCode 7.3 beta?
If more information is necessary please contact me.
Kind regards,
Alexander