From dc227c8fbc9b48e7831e067563324d06f2a225ff Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Thu, 24 Jul 2014 15:07:50 +0200 Subject: [PATCH] Check if the NSLinguisticTagger class is available before using it (it was added in 10.7). --- MP42/MP42SrtImporter.m | 2 +- UniversalDetector/UniversalDetector.xcodeproj/project.pbxproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MP42/MP42SrtImporter.m b/MP42/MP42SrtImporter.m index 4fab150..483ecfe 100644 --- a/MP42/MP42SrtImporter.m +++ b/MP42/MP42SrtImporter.m @@ -36,7 +36,7 @@ newTrack.alternate_group = 2; newTrack.language = getFilenameLanguage((CFStringRef)[_fileURL path]); - if ([newTrack.language isEqualToString:@"Unknown"]) { + if ([newTrack.language isEqualToString:@"Unknown"] && NSClassFromString(@"NSLinguisticTagger")) { // we couldn't deduce language from the fileURL // -> Let's look into the file itself diff --git a/UniversalDetector/UniversalDetector.xcodeproj/project.pbxproj b/UniversalDetector/UniversalDetector.xcodeproj/project.pbxproj index d7c1a04..3e6045e 100644 --- a/UniversalDetector/UniversalDetector.xcodeproj/project.pbxproj +++ b/UniversalDetector/UniversalDetector.xcodeproj/project.pbxproj @@ -667,7 +667,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.6; ONLY_ACTIVE_ARCH = NO; - SDKROOT = macosx10.8; + SDKROOT = macosx; }; name = Debug; }; @@ -683,7 +683,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.6; ONLY_ACTIVE_ARCH = NO; - SDKROOT = macosx10.8; + SDKROOT = macosx; }; name = Release; };