I have just released my app on the App Store however I have just been emailed and told that there is issues with crashing.
The issue is with Alert Views which crash
I had the same problem in the relese build. It seems an internal bug of the swift compiler (using Xcode 6.0.1 (6A317) )
I solved actually with a objC helper class with this method:
+ (BOOL) checkIfClassExists:(NSString *)className {
id c = objc_getClass([className cStringUsingEncoding:NSASCIIStringEncoding]);
if (c != nil) {
return YES;
} else {
return NO;
}
}
called in my swift code with a bridge header
if ObjCFix.checkIfClassExists("UIAlertController") {
//iOS 8 code here
} else {
//iOS 7 code here
}