From 3530cf670e372c830737332757f9633c67ccc609 Mon Sep 17 00:00:00 2001 From: Abdulhakim Ajetunmobi Date: Thu, 12 Nov 2020 11:44:28 +0000 Subject: [PATCH] remove duplicate constants (#67) --- OTAcceleratorCore.xcodeproj/project.pbxproj | 4 +-- .../{OTAnnotation => }/Constants.h | 19 +++++++++++--- OTAcceleratorCore/OTCommonCommunicator.h | 11 +------- OTAcceleratorCore/TextChat/Constant.h | 25 ------------------- OTAcceleratorCore/TextChat/OTTextChat.m | 2 +- .../OTTextChatView/OTTextChatViewController.m | 2 +- 6 files changed, 19 insertions(+), 44 deletions(-) rename OTAcceleratorCore/{OTAnnotation => }/Constants.h (59%) delete mode 100644 OTAcceleratorCore/TextChat/Constant.h diff --git a/OTAcceleratorCore.xcodeproj/project.pbxproj b/OTAcceleratorCore.xcodeproj/project.pbxproj index 0d8eafd..d639d45 100644 --- a/OTAcceleratorCore.xcodeproj/project.pbxproj +++ b/OTAcceleratorCore.xcodeproj/project.pbxproj @@ -181,7 +181,6 @@ /* Begin PBXFileReference section */ 120640212525FEBC008E3516 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; - 129EDCFC253F0E0500541893 /* Constant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Constant.h; sourceTree = ""; }; 129EDCFD253F0E0600541893 /* OTTextMessage_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OTTextMessage_Private.h; sourceTree = ""; }; 129EDCFE253F0E0600541893 /* OTTextMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OTTextMessage.m; sourceTree = ""; }; 129EDD00253F0E0600541893 /* OTTextChat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OTTextChat.m; sourceTree = ""; }; @@ -467,7 +466,6 @@ 129EDCFB253F0DF500541893 /* TextChat */ = { isa = PBXGroup; children = ( - 129EDCFC253F0E0500541893 /* Constant.h */, 129EDD01253F0E0600541893 /* OTTextChat.h */, 129EDD00253F0E0600541893 /* OTTextChat.m */, 129EDCFD253F0E0600541893 /* OTTextMessage_Private.h */, @@ -577,7 +575,6 @@ 12B6BA832540927C00293718 /* AnnLoggingWrapper.h */, 12B6BA822540927C00293718 /* AnnLoggingWrapper.m */, 12B6BA87254092A400293718 /* Category */, - 12B6BA97254092C600293718 /* Constants.h */, 12B6BA98254092C600293718 /* OTAnnotationKitBundle.h */, 12B6BA99254092C600293718 /* OTAnnotationKitBundle.m */, 12B6BA9B254092F500293718 /* OTAnnotationNative */, @@ -854,6 +851,7 @@ A080E47C1E244CFA007972D8 /* OTCommonCommunicator.h */, A0AB9F0E1E3AC2D50068E20F /* OTScreenCapture.h */, A0AB9F0F1E3AC2D50068E20F /* OTScreenCapture.m */, + 12B6BA97254092C600293718 /* Constants.h */, A0565F221DF63F62001F9032 /* Info.plist */, ); path = OTAcceleratorCore; diff --git a/OTAcceleratorCore/OTAnnotation/Constants.h b/OTAcceleratorCore/Constants.h similarity index 59% rename from OTAcceleratorCore/OTAnnotation/Constants.h rename to OTAcceleratorCore/Constants.h index 7b79ffb..99d9d57 100644 --- a/OTAcceleratorCore/OTAnnotation/Constants.h +++ b/OTAcceleratorCore/Constants.h @@ -11,10 +11,6 @@ static const CGFloat WidthOfColorPicker = 49.0f; static const CGFloat HeightOfColorPicker = 49.0f; static const CGFloat LeadingPaddingOfAnnotationTextView = 20.0f; - -static NSString * const kLogComponentIdentifier = @"annotationsAccPack"; -static NSString * const KLogClientVersion = @"ios-vsol-1.1.0"; -static NSString* const KLogActionInitialize = @"Init"; static NSString* const KLogActionStartDrawing = @"StartDrawing"; static NSString* const KLogActionEndDrawing = @"EndDrawing"; static NSString* const KLogActionFreeHand = @"FreeHand"; @@ -29,3 +25,18 @@ static NSString* const KLogActionDone = @"DONE"; static NSString* const KLogVariationAttempt = @"Attempt"; static NSString* const KLogVariationSuccess = @"Success"; static NSString* const KLogVariationFailure = @"Failure"; + +static NSString* const KLogActionStart = @"Start"; +static NSString* const KLogActionEnd = @"End"; +static NSString* const KLogActionOpen = @"OpenTC"; +static NSString* const KLogActionClose = @"CloseTC"; +static NSString* const KLogActionSendMessage = @"SendMessage"; +static NSString* const KLogActionReceiveMessage = @"ReceiveMessage"; +static NSString* const KLogActionSetMaxLength = @"SetMaxLength"; + +static NSString* const KLogClientVersion = @"ios-accelerator-core-3.0.0"; +static NSString* const kLogComponentIdentifier = @"OTAcceleratorCore"; +static NSString* const KLogActionInitialize = @"Init"; +static NSString* const KLogActionStartCommunication = @"StartComm"; +static NSString* const KLogActionStartScreenCommunication = @"StartScreenComm"; +static NSString* const KLogActionEndCommunication = @"EndComm"; diff --git a/OTAcceleratorCore/OTCommonCommunicator.h b/OTAcceleratorCore/OTCommonCommunicator.h index 52ea97e..7b30f3e 100644 --- a/OTAcceleratorCore/OTCommonCommunicator.h +++ b/OTAcceleratorCore/OTCommonCommunicator.h @@ -7,16 +7,7 @@ // #import - -static NSString* const KLogClientVersion = @"ios-accelerator-core-1.1.0"; -static NSString* const kLogComponentIdentifier = @"OTAcceleratorCore"; -static NSString* const KLogActionInitialize = @"Init"; -static NSString* const KLogActionStartCommunication = @"StartComm"; -static NSString* const KLogActionStartScreenCommunication = @"StartScreenComm"; -static NSString* const KLogActionEndCommunication = @"EndComm"; -static NSString* const KLogVariationAttempt = @"Attempt"; -static NSString* const KLogVariationSuccess = @"Success"; -static NSString* const KLogVariationFailure = @"Failure"; +#import "Constants.h" typedef NS_ENUM(NSUInteger, OTCommunicationSignal) { OTPublisherCreated, // capture camera/screen successfully and publishing in the OpenTok cloud diff --git a/OTAcceleratorCore/TextChat/Constant.h b/OTAcceleratorCore/TextChat/Constant.h deleted file mode 100644 index 7934d1c..0000000 --- a/OTAcceleratorCore/TextChat/Constant.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Constant.h -// -// Copyright © 2016 Tokbox, Inc. All rights reserved. -// - -#ifndef Constant_h -#define Constant_h - -// Analytics constants -static NSString* const kLogComponentIdentifier = @"textChatAccPack"; -static NSString* const KLogClientVersion = @"ios-vsol-2.0.0"; -static NSString* const KLogActionInitialize = @"Init"; -static NSString* const KLogActionStart = @"Start"; -static NSString* const KLogActionEnd = @"End"; -static NSString* const KLogActionOpen = @"OpenTC"; -static NSString* const KLogActionClose = @"CloseTC"; -static NSString* const KLogActionSendMessage = @"SendMessage"; -static NSString* const KLogActionReceiveMessage = @"ReceiveMessage"; -static NSString* const KLogActionSetMaxLength = @"SetMaxLength"; -static NSString* const KLogVariationAttempt = @"Attempt"; -static NSString* const KLogVariationSuccess = @"Success"; -static NSString* const KLogVariationFailure = @"Failure"; - -#endif /* Constant_h */ diff --git a/OTAcceleratorCore/TextChat/OTTextChat.m b/OTAcceleratorCore/TextChat/OTTextChat.m index 98d9fdf..9e9f3ad 100644 --- a/OTAcceleratorCore/TextChat/OTTextChat.m +++ b/OTAcceleratorCore/TextChat/OTTextChat.m @@ -11,7 +11,7 @@ #import "OTTextMessage.h" #import "OTTextMessage_Private.h" -#import "Constant.h" +#import "Constants.h" static NSString* const kTextChatType = @"text-chat"; diff --git a/OTAcceleratorCore/TextChat/UI/OTTextChatView/OTTextChatViewController.m b/OTAcceleratorCore/TextChat/UI/OTTextChatView/OTTextChatViewController.m index 9483497..12cea3e 100644 --- a/OTAcceleratorCore/TextChat/UI/OTTextChatView/OTTextChatViewController.m +++ b/OTAcceleratorCore/TextChat/UI/OTTextChatView/OTTextChatViewController.m @@ -13,7 +13,7 @@ #import "OTAcceleratorSession.h" #import "OTTextChatAcceleratorBundle.h" -#import "Constant.h" +#import "Constants.h" @interface OTTextChatViewController() { OTTextChatViewType typeOfTextChatTableView;