From 4bbf42ba8316a7b93461676a8662e80959b52244 Mon Sep 17 00:00:00 2001 From: Anthony Oliveri Date: Mon, 12 Nov 2018 15:26:00 -0600 Subject: [PATCH] feat(All): Add support for Swift 4.2 --- .../SpeechToText+Recognize.swift | 4 + .../WebSockets/SpeechToTextEncoder.swift | 4 +- .../WebSockets/SpeechToTextRecorder.swift | 4 + .../TextToSpeechV1/TextToSpeechDecoder.swift | 6 +- .../VisualRecognition+UIImage.swift | 14 ++ .../project.pbxproj | 155 +++++++++--------- 6 files changed, 109 insertions(+), 78 deletions(-) diff --git a/Source/SpeechToTextV1/SpeechToText+Recognize.swift b/Source/SpeechToTextV1/SpeechToText+Recognize.swift index 64d85a7a4..59c6d0825 100644 --- a/Source/SpeechToTextV1/SpeechToText+Recognize.swift +++ b/Source/SpeechToTextV1/SpeechToText+Recognize.swift @@ -177,7 +177,11 @@ extension SpeechToText { // make sure the AVAudioSession shared instance is properly configured do { let audioSession = AVAudioSession.sharedInstance() + #if swift(>=4.2) + try audioSession.setCategory(AVAudioSession.Category.playAndRecord, mode: .default, options: [.defaultToSpeaker, .mixWithOthers]) + #else try audioSession.setCategory(AVAudioSessionCategoryPlayAndRecord, with: [.defaultToSpeaker, .mixWithOthers]) + #endif try audioSession.setActive(true) } catch { let failureReason = "Failed to setup the AVAudioSession sharedInstance properly." diff --git a/Source/SpeechToTextV1/WebSockets/SpeechToTextEncoder.swift b/Source/SpeechToTextV1/WebSockets/SpeechToTextEncoder.swift index 4d7ab6a25..54501c96f 100644 --- a/Source/SpeechToTextV1/WebSockets/SpeechToTextEncoder.swift +++ b/Source/SpeechToTextV1/WebSockets/SpeechToTextEncoder.swift @@ -123,7 +123,7 @@ internal class SpeechToTextEncoder { } // deallocate header data buffer - packetData.deallocate(capacity: headerData.count) + packetData.deallocate() // assemble pages and add to ogg cache assemblePages(flush: true) @@ -153,7 +153,7 @@ internal class SpeechToTextEncoder { } // deallocate header data buffer - packetData.deallocate(capacity: headerData.count) + packetData.deallocate() // assemble pages and add to ogg cache assemblePages(flush: true) diff --git a/Source/SpeechToTextV1/WebSockets/SpeechToTextRecorder.swift b/Source/SpeechToTextV1/WebSockets/SpeechToTextRecorder.swift index e79aba3dd..d345847ae 100644 --- a/Source/SpeechToTextV1/WebSockets/SpeechToTextRecorder.swift +++ b/Source/SpeechToTextV1/WebSockets/SpeechToTextRecorder.swift @@ -127,7 +127,11 @@ internal class SpeechToTextRecorder { userInfo: nil, repeats: true ) + #if swift(>=4.2) + RunLoop.current.add(powerTimer!, forMode: RunLoop.Mode.common) + #else RunLoop.current.add(powerTimer!, forMode: RunLoopMode.commonModes) + #endif } internal func startRecording() throws { diff --git a/Source/TextToSpeechV1/TextToSpeechDecoder.swift b/Source/TextToSpeechV1/TextToSpeechDecoder.swift index 70f91fa77..e370570e3 100644 --- a/Source/TextToSpeechV1/TextToSpeechDecoder.swift +++ b/Source/TextToSpeechV1/TextToSpeechDecoder.swift @@ -86,7 +86,7 @@ internal class TextToSpeechDecoder { ogg_sync_wrote(&syncState, bufferSize) // attempt to get a page from the data that we wrote - while (ogg_sync_pageout(&syncState, &page) == 1) { + while ogg_sync_pageout(&syncState, &page) == 1 { if beginStream { // assign stream's number with the page. ogg_stream_init(&streamState, ogg_page_serialno(&page)) @@ -176,7 +176,7 @@ internal class TextToSpeechDecoder { // deallocate pcmDataBuffer when the function ends, regardless if the function ended normally or with an error. defer { - pcmDataBuffer.deallocate(capacity: MemoryLayout.stride * Int(MAX_FRAME_SIZE) * Int(numChannels)) + pcmDataBuffer.deallocate() } } else if packetCount == 1 { hasTagsPacket = true @@ -196,7 +196,7 @@ internal class TextToSpeechDecoder { numberOfSamplesDecoded = opus_multistream_decode_float(decoder, packet.packet, Int32(packet.bytes), pcmDataBuffer, MAX_FRAME_SIZE, 0) if numberOfSamplesDecoded < 0 { - NSLog("Decoding error: \(opus_strerror(numberOfSamplesDecoded))") + NSLog("Decoding error: \(String(describing: opus_strerror(numberOfSamplesDecoded)))") throw OpusError.internalError } diff --git a/Source/VisualRecognitionV3/VisualRecognition+UIImage.swift b/Source/VisualRecognitionV3/VisualRecognition+UIImage.swift index 414250d1a..77ddd3e57 100644 --- a/Source/VisualRecognitionV3/VisualRecognition+UIImage.swift +++ b/Source/VisualRecognitionV3/VisualRecognition+UIImage.swift @@ -154,6 +154,15 @@ extension VisualRecognition { success: @escaping (ClassifiedImages) -> Void) { // convert UIImage to Data + #if swift(>=4.2) + guard let imageData = image.pngData() else { + let description = "Failed to convert image from UIImage to Data." + let userInfo = [NSLocalizedDescriptionKey: description] + let error = NSError(domain: self.domain, code: 0, userInfo: userInfo) + failure?(error) + return + } + #else guard let imageData = UIImagePNGRepresentation(image) else { let description = "Failed to convert image from UIImage to Data." let userInfo = [NSLocalizedDescriptionKey: description] @@ -161,6 +170,7 @@ extension VisualRecognition { failure?(error) return } + #endif self.classifyWithLocalModel(imageData: imageData, classifierIDs: classifierIDs, threshold: threshold, failure: failure, success: success) @@ -174,7 +184,11 @@ extension VisualRecognition { let filename = UUID().uuidString + ".jpg" let directory = NSURL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true) guard let file = directory.appendingPathComponent(filename) else { throw RestError.encodingError } + #if swift(>=4.2) + guard let data = image.jpegData(compressionQuality: 0.75) else { throw RestError.encodingError } + #else guard let data = UIImageJPEGRepresentation(image, 0.75) else { throw RestError.encodingError } + #endif try data.write(to: file) return file } diff --git a/WatsonDeveloperCloud.xcodeproj/project.pbxproj b/WatsonDeveloperCloud.xcodeproj/project.pbxproj index 47cce7b27..3353bc2ad 100644 --- a/WatsonDeveloperCloud.xcodeproj/project.pbxproj +++ b/WatsonDeveloperCloud.xcodeproj/project.pbxproj @@ -3270,100 +3270,113 @@ TargetAttributes = { 1241DFAD1E380F0A00B8B33E = { CreatedOnToolsVersion = 8.2.1; - LastSwiftMigration = 0820; + LastSwiftMigration = 1010; ProvisioningStyle = Manual; }; 1241DFB51E380F0A00B8B33E = { CreatedOnToolsVersion = 8.2.1; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; 124C2DEE1D19E29000D9F602 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0940; + LastSwiftMigration = 1010; }; 124C2DF71D19E29100D9F602 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 12F8003F1DF71921006851D6 = { CreatedOnToolsVersion = 8.1; - LastSwiftMigration = 0810; + LastSwiftMigration = 1010; ProvisioningStyle = Manual; }; 12F800471DF71921006851D6 = { CreatedOnToolsVersion = 8.1; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; + 6877FA512056D4F100383B25 = { + LastSwiftMigration = 1010; + }; 6877FA9C2056D4F500383B25 = { DevelopmentTeam = CDXLDASP22; + LastSwiftMigration = 1010; }; 7A67117F1DD0EEEB0070CA9D = { CreatedOnToolsVersion = 8.0; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; 7A6711871DD0EEEB0070CA9D = { CreatedOnToolsVersion = 8.0; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; 7AAAF3C21CEE9A3700B74848 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 7AAAF3CB1CEE9A3700B74848 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 7AAAF3F71CEE9D1900B74848 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 7AAAF4001CEE9D1900B74848 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 7AAAF44D1CEE9F8800B74848 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0940; + LastSwiftMigration = 1010; }; 7AAAF4561CEE9F8800B74848 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 7AAAF4AE1CEEA10600B74848 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 7AAAF4B71CEEA10700B74848 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 7AAAF4DB1CEEA16100B74848 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 7AAAF4E41CEEA16100B74848 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 7AB445231D3E647A00E8748A = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; 7AB4452C1D3E647A00E8748A = { CreatedOnToolsVersion = 7.3.1; DevelopmentTeam = CDXLDASP22; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; + }; + 924EE78021505D7A0048C0E5 = { + LastSwiftMigration = 1010; }; 924EE7D521505D810048C0E5 = { DevelopmentTeam = CDXLDASP22; + LastSwiftMigration = 1010; }; CAD2685120CAF28A002BA2C4 = { CreatedOnToolsVersion = 9.4; - LastSwiftMigration = 0940; + LastSwiftMigration = 1010; ProvisioningStyle = Manual; }; CAD2685920CAF28A002BA2C4 = { CreatedOnToolsVersion = 9.4; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; }; @@ -4982,7 +4995,7 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5009,7 +5022,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.NaturalLanguageUnderstandingV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5029,7 +5042,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.NaturalLanguageUnderstandingV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5048,7 +5061,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.NaturalLanguageUnderstandingV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5072,14 +5085,13 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Source/SupportingFiles/AudioCodec/lib", "$(PROJECT_DIR)/Source/SupportingFiles/Dependencies/Libraries", ); PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.TextToSpeechV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5103,13 +5115,12 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Source/SupportingFiles/AudioCodec/lib", "$(PROJECT_DIR)/Source/SupportingFiles/Dependencies/Libraries", ); PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.TextToSpeechV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5126,7 +5137,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.TextToSpeechV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5143,7 +5154,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.TextToSpeechV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5173,7 +5184,7 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5201,7 +5212,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.DiscoveryV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5222,7 +5233,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.DiscoveryV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5242,7 +5253,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.DiscoveryV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5267,7 +5278,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.AssistantV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5292,7 +5303,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.AssistantV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5310,7 +5321,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.AssistantV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5328,7 +5339,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.AssistantV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5465,7 +5476,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5491,7 +5502,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.PersonalityInsightsV3"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5512,7 +5523,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.PersonalityInsightsV3Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5532,7 +5543,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.PersonalityInsightsV3Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5556,7 +5567,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.VisualRecognitionV3"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5580,7 +5591,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.VisualRecognitionV3"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5597,7 +5608,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.VisualRecognitionV3Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5614,7 +5625,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.VisualRecognitionV3Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5638,7 +5649,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.ToneAnalyzerV3"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5662,7 +5673,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.ToneAnalyzerV3"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5679,7 +5690,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.ToneAnalyzerV3Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5696,7 +5707,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.ToneAnalyzerV3Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5720,14 +5731,13 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Source/SupportingFiles/AudioCodec/lib", "$(PROJECT_DIR)/Source/SupportingFiles/Dependencies/Libraries", ); PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.SpeechToTextV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5751,13 +5761,12 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Source/SupportingFiles/AudioCodec/lib", "$(PROJECT_DIR)/Source/SupportingFiles/Dependencies/Libraries", ); PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.SpeechToTextV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5774,7 +5783,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.SpeechToTextV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5791,7 +5800,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.SpeechToTextV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5815,7 +5824,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.NaturalLanguageClassifierV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5839,7 +5848,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.NaturalLanguageClassifierV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5856,7 +5865,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.NaturalLanguageClassifierV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5873,7 +5882,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.NaturalLanguageClassifierV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5897,7 +5906,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.LanguageTranslatorV2"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5921,7 +5930,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.LanguageTranslatorV2"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5938,7 +5947,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.LanguageTranslatorV2Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -5955,7 +5964,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.LanguageTranslatorV2Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -5980,7 +5989,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.ConversationV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -6005,7 +6014,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.ConversationV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -6022,7 +6031,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.ConversationV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -6039,7 +6048,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.ConversationV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -6064,7 +6073,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.AssistantV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -6089,7 +6098,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.AssistantV1"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -6107,7 +6116,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.AssistantV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -6125,7 +6134,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.AssistantV1Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -6151,7 +6160,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -6176,7 +6185,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.LanguageTranslatorV3"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -6193,7 +6202,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.LanguageTranslatorV3Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -6210,7 +6219,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.watson.developer-cloud.LanguageTranslatorV3Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; };