Skip to content

Commit b57cfaa

Browse files
fix(vis-rec): add vis rec deprecation warning [skip ci]
1 parent 08f1426 commit b57cfaa

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Source/VisualRecognitionV3/VisualRecognition.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public class VisualRecognition {
5454
in "YYYY-MM-DD" format.
5555
*/
5656
public init(version: String) throws {
57+
#warning("On 1 December 2021, Visual Recognition will no longer be available. For more information, see https://github.com/watson-developer-cloud/swift-sdk/tree/master#visual-recognition-deprecation")
58+
5759
self.version = version
5860

5961
let authenticator = try ConfigBasedAuthenticatorFactory.getAuthenticator(credentialPrefix: serviceSdkName)
@@ -75,6 +77,8 @@ public class VisualRecognition {
7577
- parameter authenticator: The Authenticator object used to authenticate requests to the service
7678
*/
7779
public init(version: String, authenticator: Authenticator) {
80+
#warning("On 1 December 2021, Visual Recognition will no longer be available. For more information, see https://github.com/watson-developer-cloud/swift-sdk/tree/master#visual-recognition-deprecation")
81+
7882
self.version = version
7983
self.authenticator = authenticator
8084
RestRequest.userAgent = Shared.userAgent

Source/VisualRecognitionV4/VisualRecognition.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public class VisualRecognition {
5454
in "YYYY-MM-DD" format.
5555
*/
5656
public init(version: String) throws {
57+
#warning("On 1 December 2021, Visual Recognition will no longer be available. For more information, see https://github.com/watson-developer-cloud/swift-sdk/tree/master#visual-recognition-deprecation")
58+
5759
self.version = version
5860

5961
let authenticator = try ConfigBasedAuthenticatorFactory.getAuthenticator(credentialPrefix: serviceSdkName)
@@ -75,6 +77,8 @@ public class VisualRecognition {
7577
- parameter authenticator: The Authenticator object used to authenticate requests to the service
7678
*/
7779
public init(version: String, authenticator: Authenticator) {
80+
#warning("On 1 December 2021, Visual Recognition will no longer be available. For more information, see https://github.com/watson-developer-cloud/swift-sdk/tree/master#visual-recognition-deprecation")
81+
7882
self.version = version
7983
self.authenticator = authenticator
8084
RestRequest.userAgent = Shared.userAgent

0 commit comments

Comments
 (0)