diff --git a/CheckoutExampleObjC/CheckoutExampleObjC.xcodeproj/project.pbxproj b/CheckoutExampleObjC/CheckoutExampleObjC.xcodeproj/project.pbxproj index 9456654..f95751e 100644 --- a/CheckoutExampleObjC/CheckoutExampleObjC.xcodeproj/project.pbxproj +++ b/CheckoutExampleObjC/CheckoutExampleObjC.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -14,12 +14,27 @@ 7E7826841CD902180008C69A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7E7826831CD902180008C69A /* Assets.xcassets */; }; 7E7826871CD902180008C69A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7E7826851CD902180008C69A /* LaunchScreen.storyboard */; }; 7E7826981CD926830008C69A /* CheckoutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E7826971CD926830008C69A /* CheckoutViewController.m */; }; - ACDB7D0A252DB53D006DDD02 /* libKountDataCollector.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ACDB7D09252DB53D006DDD02 /* libKountDataCollector.a */; }; - ACDB7D57252F092B006DDD02 /* CustomWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = ACDB7D51252F092B006DDD02 /* CustomWindow.m */; }; - ACDB7D58252F092B006DDD02 /* UIViewController+TouchControl.m in Sources */ = {isa = PBXBuildFile; fileRef = ACDB7D52252F092B006DDD02 /* UIViewController+TouchControl.m */; }; - ACDB7D59252F092B006DDD02 /* UIControl+CustomControl.m in Sources */ = {isa = PBXBuildFile; fileRef = ACDB7D56252F092B006DDD02 /* UIControl+CustomControl.m */; }; + ACFE764B25CA815400825D2C /* KountDataCollector.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = ACFE763E25CA805400825D2C /* KountDataCollector.xcframework */; }; + ACFE764C25CA815400825D2C /* KountDataCollector.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = ACFE763E25CA805400825D2C /* KountDataCollector.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + ACFE766F25CAB95B00825D2C /* CustomWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = ACFE766925CAB95B00825D2C /* CustomWindow.m */; }; + ACFE767025CAB95B00825D2C /* UIViewController+TouchControl.m in Sources */ = {isa = PBXBuildFile; fileRef = ACFE766A25CAB95B00825D2C /* UIViewController+TouchControl.m */; }; + ACFE767125CAB95B00825D2C /* UIControl+CustomControl.m in Sources */ = {isa = PBXBuildFile; fileRef = ACFE766E25CAB95B00825D2C /* UIControl+CustomControl.m */; }; /* End PBXBuildFile section */ +/* Begin PBXCopyFilesBuildPhase section */ + ACFE764D25CA815400825D2C /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ACFE764C25CA815400825D2C /* KountDataCollector.xcframework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 7E7826741CD902180008C69A /* CheckoutExampleObjC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CheckoutExampleObjC.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7E7826781CD902180008C69A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -33,13 +48,13 @@ 7E7826881CD902180008C69A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 7E7826961CD926830008C69A /* CheckoutViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckoutViewController.h; sourceTree = ""; }; 7E7826971CD926830008C69A /* CheckoutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CheckoutViewController.m; sourceTree = ""; }; - ACDB7D09252DB53D006DDD02 /* libKountDataCollector.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libKountDataCollector.a; path = ../KountDataCollector/libKountDataCollector.a; sourceTree = ""; }; - ACDB7D51252F092B006DDD02 /* CustomWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomWindow.m; sourceTree = ""; }; - ACDB7D52252F092B006DDD02 /* UIViewController+TouchControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+TouchControl.m"; sourceTree = ""; }; - ACDB7D53252F092B006DDD02 /* UIControl+CustomControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIControl+CustomControl.h"; sourceTree = ""; }; - ACDB7D54252F092B006DDD02 /* CustomWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomWindow.h; sourceTree = ""; }; - ACDB7D55252F092B006DDD02 /* UIViewController+TouchControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+TouchControl.h"; sourceTree = ""; }; - ACDB7D56252F092B006DDD02 /* UIControl+CustomControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIControl+CustomControl.m"; sourceTree = ""; }; + ACFE763E25CA805400825D2C /* KountDataCollector.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = KountDataCollector.xcframework; path = ../KountDataCollector.xcframework; sourceTree = ""; }; + ACFE766925CAB95B00825D2C /* CustomWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomWindow.m; sourceTree = ""; }; + ACFE766A25CAB95B00825D2C /* UIViewController+TouchControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+TouchControl.m"; sourceTree = ""; }; + ACFE766B25CAB95B00825D2C /* UIControl+CustomControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIControl+CustomControl.h"; sourceTree = ""; }; + ACFE766C25CAB95B00825D2C /* CustomWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomWindow.h; sourceTree = ""; }; + ACFE766D25CAB95B00825D2C /* UIViewController+TouchControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+TouchControl.h"; sourceTree = ""; }; + ACFE766E25CAB95B00825D2C /* UIControl+CustomControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIControl+CustomControl.m"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -47,7 +62,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - ACDB7D0A252DB53D006DDD02 /* libKountDataCollector.a in Frameworks */, + ACFE764B25CA815400825D2C /* KountDataCollector.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -57,7 +72,7 @@ 7E78266B1CD902180008C69A = { isa = PBXGroup; children = ( - ACDB7D09252DB53D006DDD02 /* libKountDataCollector.a */, + ACFE763E25CA805400825D2C /* KountDataCollector.xcframework */, 7E7826761CD902180008C69A /* CheckoutExampleObjC */, 7E7826751CD902180008C69A /* Products */, ); @@ -74,7 +89,7 @@ 7E7826761CD902180008C69A /* CheckoutExampleObjC */ = { isa = PBXGroup; children = ( - ACDB7D50252F092B006DDD02 /* TouchControls */, + ACFE766825CAB95B00825D2C /* TouchControls */, 7E78267A1CD902180008C69A /* AppDelegate.h */, 7E78267B1CD902180008C69A /* AppDelegate.m */, 7E78267D1CD902180008C69A /* ViewController.h */, @@ -98,18 +113,18 @@ name = "Supporting Files"; sourceTree = ""; }; - ACDB7D50252F092B006DDD02 /* TouchControls */ = { + ACFE766825CAB95B00825D2C /* TouchControls */ = { isa = PBXGroup; children = ( - ACDB7D54252F092B006DDD02 /* CustomWindow.h */, - ACDB7D51252F092B006DDD02 /* CustomWindow.m */, - ACDB7D53252F092B006DDD02 /* UIControl+CustomControl.h */, - ACDB7D56252F092B006DDD02 /* UIControl+CustomControl.m */, - ACDB7D55252F092B006DDD02 /* UIViewController+TouchControl.h */, - ACDB7D52252F092B006DDD02 /* UIViewController+TouchControl.m */, + ACFE766925CAB95B00825D2C /* CustomWindow.m */, + ACFE766A25CAB95B00825D2C /* UIViewController+TouchControl.m */, + ACFE766B25CAB95B00825D2C /* UIControl+CustomControl.h */, + ACFE766C25CAB95B00825D2C /* CustomWindow.h */, + ACFE766D25CAB95B00825D2C /* UIViewController+TouchControl.h */, + ACFE766E25CAB95B00825D2C /* UIControl+CustomControl.m */, ); name = TouchControls; - path = ../../KountDataCollector/TouchControls; + path = ../../KountDataCollectorUnivesalLibrary/TouchControls; sourceTree = ""; }; /* End PBXGroup section */ @@ -122,6 +137,7 @@ 7E7826701CD902180008C69A /* Sources */, 7E7826711CD902180008C69A /* Frameworks */, 7E7826721CD902180008C69A /* Resources */, + ACFE764D25CA815400825D2C /* Embed Frameworks */, ); buildRules = ( ); @@ -185,12 +201,12 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - ACDB7D57252F092B006DDD02 /* CustomWindow.m in Sources */, + ACFE766F25CAB95B00825D2C /* CustomWindow.m in Sources */, 7E7826981CD926830008C69A /* CheckoutViewController.m in Sources */, 7E78267F1CD902180008C69A /* ViewController.m in Sources */, - ACDB7D59252F092B006DDD02 /* UIControl+CustomControl.m in Sources */, + ACFE767125CAB95B00825D2C /* UIControl+CustomControl.m in Sources */, 7E78267C1CD902180008C69A /* AppDelegate.m in Sources */, - ACDB7D58252F092B006DDD02 /* UIViewController+TouchControl.m in Sources */, + ACFE767025CAB95B00825D2C /* UIViewController+TouchControl.m in Sources */, 7E7826791CD902180008C69A /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -257,7 +273,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ../KountDataCollector; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; LIBRARY_SEARCH_PATHS = ../KountDataCollector; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -299,7 +315,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ../KountDataCollector; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; LIBRARY_SEARCH_PATHS = ../KountDataCollector; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; @@ -317,9 +333,14 @@ CURRENT_PROJECT_VERSION = 6; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = YES; + HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = CheckoutExampleObjC/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.kount.CheckoutExampleObjC; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -336,9 +357,14 @@ CURRENT_PROJECT_VERSION = 6; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = YES; + HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = CheckoutExampleObjC/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.kount.CheckoutExampleObjC; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/CheckoutExampleObjC/CheckoutExampleObjC/AppDelegate.m b/CheckoutExampleObjC/CheckoutExampleObjC/AppDelegate.m index 9a58934..06f3c09 100644 --- a/CheckoutExampleObjC/CheckoutExampleObjC/AppDelegate.m +++ b/CheckoutExampleObjC/CheckoutExampleObjC/AppDelegate.m @@ -20,9 +20,17 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [dataCollectionObject setEnvironmentForAnalytics: [KDataCollector.sharedCollector environment]]; // To collect Analytics Data, you'll want set this analyticsData to YES or else NO BOOL analyticsData = YES; - [dataCollectionObject collect:sessionID analyticsSwitch:analyticsData completion:^(NSString * _Nonnull sessionID, NSError * _Nullable error) { - if (error != nil) { - NSLog(@"%@",error); + [dataCollectionObject collect:sessionID analyticsSwitch:analyticsData completion:^(NSString * _Nonnull sessionID, BOOL success, NSError * _Nullable error) { + if(success) { + NSLog(@"Collection Successful"); + } + else { + if (error != nil) { + NSLog(@"Collection failed with error:%@",error.description); + } + else { + NSLog(@"Collection failed without error"); + } } }]; diff --git a/CheckoutExampleSwift/CheckoutExampleSwift.xcodeproj/project.pbxproj b/CheckoutExampleSwift/CheckoutExampleSwift.xcodeproj/project.pbxproj index d8f76c5..bfa7f61 100644 --- a/CheckoutExampleSwift/CheckoutExampleSwift.xcodeproj/project.pbxproj +++ b/CheckoutExampleSwift/CheckoutExampleSwift.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -13,12 +13,27 @@ 7E7826AD1CDA4D120008C69A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7E7826AC1CDA4D120008C69A /* Assets.xcassets */; }; 7E7826B01CDA4D120008C69A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7E7826AE1CDA4D120008C69A /* LaunchScreen.storyboard */; }; 7E7826B81CDA4DD30008C69A /* CheckoutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E7826B71CDA4DD30008C69A /* CheckoutViewController.swift */; }; - ACDB7D08252DB52A006DDD02 /* libKountDataCollector.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ACDB7D07252DB529006DDD02 /* libKountDataCollector.a */; }; - ACDB7D4D252F0919006DDD02 /* CustomWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = ACDB7D47252F0919006DDD02 /* CustomWindow.m */; }; - ACDB7D4E252F0919006DDD02 /* UIViewController+TouchControl.m in Sources */ = {isa = PBXBuildFile; fileRef = ACDB7D48252F0919006DDD02 /* UIViewController+TouchControl.m */; }; - ACDB7D4F252F0919006DDD02 /* UIControl+CustomControl.m in Sources */ = {isa = PBXBuildFile; fileRef = ACDB7D4C252F0919006DDD02 /* UIControl+CustomControl.m */; }; + ACFE764E25CA815A00825D2C /* KountDataCollector.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = ACFE763D25CA804300825D2C /* KountDataCollector.xcframework */; }; + ACFE764F25CA815A00825D2C /* KountDataCollector.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = ACFE763D25CA804300825D2C /* KountDataCollector.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + ACFE766525CAB93700825D2C /* CustomWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = ACFE765F25CAB93700825D2C /* CustomWindow.m */; }; + ACFE766625CAB93700825D2C /* UIViewController+TouchControl.m in Sources */ = {isa = PBXBuildFile; fileRef = ACFE766025CAB93700825D2C /* UIViewController+TouchControl.m */; }; + ACFE766725CAB93700825D2C /* UIControl+CustomControl.m in Sources */ = {isa = PBXBuildFile; fileRef = ACFE766425CAB93700825D2C /* UIControl+CustomControl.m */; }; /* End PBXBuildFile section */ +/* Begin PBXCopyFilesBuildPhase section */ + ACFE765025CA815A00825D2C /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ACFE764F25CA815A00825D2C /* KountDataCollector.xcframework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 7E7826A21CDA4D120008C69A /* CheckoutExampleSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CheckoutExampleSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7E7826A51CDA4D120008C69A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -29,13 +44,13 @@ 7E7826B11CDA4D120008C69A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 7E7826B71CDA4DD30008C69A /* CheckoutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutViewController.swift; sourceTree = ""; }; 7E7826BC1CDA50290008C69A /* CheckoutExampleSwift-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CheckoutExampleSwift-Bridging-Header.h"; path = "CheckoutExampleSwift/CheckoutExampleSwift-Bridging-Header.h"; sourceTree = ""; }; - ACDB7D07252DB529006DDD02 /* libKountDataCollector.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libKountDataCollector.a; path = ../KountDataCollector/libKountDataCollector.a; sourceTree = ""; }; - ACDB7D47252F0919006DDD02 /* CustomWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomWindow.m; sourceTree = ""; }; - ACDB7D48252F0919006DDD02 /* UIViewController+TouchControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+TouchControl.m"; sourceTree = ""; }; - ACDB7D49252F0919006DDD02 /* UIControl+CustomControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIControl+CustomControl.h"; sourceTree = ""; }; - ACDB7D4A252F0919006DDD02 /* CustomWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomWindow.h; sourceTree = ""; }; - ACDB7D4B252F0919006DDD02 /* UIViewController+TouchControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+TouchControl.h"; sourceTree = ""; }; - ACDB7D4C252F0919006DDD02 /* UIControl+CustomControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIControl+CustomControl.m"; sourceTree = ""; }; + ACFE763D25CA804300825D2C /* KountDataCollector.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = KountDataCollector.xcframework; path = ../KountDataCollector.xcframework; sourceTree = ""; }; + ACFE765F25CAB93700825D2C /* CustomWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomWindow.m; sourceTree = ""; }; + ACFE766025CAB93700825D2C /* UIViewController+TouchControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+TouchControl.m"; sourceTree = ""; }; + ACFE766125CAB93700825D2C /* UIControl+CustomControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIControl+CustomControl.h"; sourceTree = ""; }; + ACFE766225CAB93700825D2C /* CustomWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomWindow.h; sourceTree = ""; }; + ACFE766325CAB93700825D2C /* UIViewController+TouchControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+TouchControl.h"; sourceTree = ""; }; + ACFE766425CAB93700825D2C /* UIControl+CustomControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIControl+CustomControl.m"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -43,7 +58,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - ACDB7D08252DB52A006DDD02 /* libKountDataCollector.a in Frameworks */, + ACFE764E25CA815A00825D2C /* KountDataCollector.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -53,10 +68,11 @@ 7E7826991CDA4D120008C69A = { isa = PBXGroup; children = ( - ACDB7D07252DB529006DDD02 /* libKountDataCollector.a */, + ACFE763D25CA804300825D2C /* KountDataCollector.xcframework */, 7E7826BC1CDA50290008C69A /* CheckoutExampleSwift-Bridging-Header.h */, 7E7826A41CDA4D120008C69A /* CheckoutExampleSwift */, 7E7826A31CDA4D120008C69A /* Products */, + ACFE764525CA80D900825D2C /* Frameworks */, ); sourceTree = ""; }; @@ -71,7 +87,7 @@ 7E7826A41CDA4D120008C69A /* CheckoutExampleSwift */ = { isa = PBXGroup; children = ( - ACDB7D46252F0919006DDD02 /* TouchControls */, + ACFE765E25CAB93700825D2C /* TouchControls */, 7E7826A51CDA4D120008C69A /* AppDelegate.swift */, 7E7826A71CDA4D120008C69A /* ViewController.swift */, 7E7826B71CDA4DD30008C69A /* CheckoutViewController.swift */, @@ -83,18 +99,25 @@ path = CheckoutExampleSwift; sourceTree = ""; }; - ACDB7D46252F0919006DDD02 /* TouchControls */ = { + ACFE764525CA80D900825D2C /* Frameworks */ = { isa = PBXGroup; children = ( - ACDB7D4A252F0919006DDD02 /* CustomWindow.h */, - ACDB7D47252F0919006DDD02 /* CustomWindow.m */, - ACDB7D49252F0919006DDD02 /* UIControl+CustomControl.h */, - ACDB7D4C252F0919006DDD02 /* UIControl+CustomControl.m */, - ACDB7D4B252F0919006DDD02 /* UIViewController+TouchControl.h */, - ACDB7D48252F0919006DDD02 /* UIViewController+TouchControl.m */, + ); + name = Frameworks; + sourceTree = ""; + }; + ACFE765E25CAB93700825D2C /* TouchControls */ = { + isa = PBXGroup; + children = ( + ACFE765F25CAB93700825D2C /* CustomWindow.m */, + ACFE766025CAB93700825D2C /* UIViewController+TouchControl.m */, + ACFE766125CAB93700825D2C /* UIControl+CustomControl.h */, + ACFE766225CAB93700825D2C /* CustomWindow.h */, + ACFE766325CAB93700825D2C /* UIViewController+TouchControl.h */, + ACFE766425CAB93700825D2C /* UIControl+CustomControl.m */, ); name = TouchControls; - path = ../../KountDataCollector/TouchControls; + path = ../../KountDataCollectorUnivesalLibrary/TouchControls; sourceTree = ""; }; /* End PBXGroup section */ @@ -107,6 +130,7 @@ 7E78269E1CDA4D120008C69A /* Sources */, 7E78269F1CDA4D120008C69A /* Frameworks */, 7E7826A01CDA4D120008C69A /* Resources */, + ACFE765025CA815A00825D2C /* Embed Frameworks */, ); buildRules = ( ); @@ -172,10 +196,10 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - ACDB7D4F252F0919006DDD02 /* UIControl+CustomControl.m in Sources */, - ACDB7D4D252F0919006DDD02 /* CustomWindow.m in Sources */, + ACFE766725CAB93700825D2C /* UIControl+CustomControl.m in Sources */, + ACFE766525CAB93700825D2C /* CustomWindow.m in Sources */, 7E7826A81CDA4D120008C69A /* ViewController.swift in Sources */, - ACDB7D4E252F0919006DDD02 /* UIViewController+TouchControl.m in Sources */, + ACFE766625CAB93700825D2C /* UIViewController+TouchControl.m in Sources */, 7E7826B81CDA4DD30008C69A /* CheckoutViewController.swift in Sources */, 7E7826A61CDA4D120008C69A /* AppDelegate.swift in Sources */, ); @@ -243,7 +267,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ../KountDataCollector; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; LIBRARY_SEARCH_PATHS = ../KountDataCollector; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -287,12 +311,13 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ../KountDataCollector; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; LIBRARY_SEARCH_PATHS = ../KountDataCollector; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OBJC_BRIDGING_HEADER = "CheckoutExampleSwift/CheckoutExampleSwift-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_OPTIMIZATION_LEVEL = "-O"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -307,9 +332,13 @@ CURRENT_PROJECT_VERSION = 15; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = YES; - HEADER_SEARCH_PATHS = ../KountDataCollector; + HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = CheckoutExampleSwift/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ""; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.kount.CheckoutExampleSwifts; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -328,9 +357,13 @@ CURRENT_PROJECT_VERSION = 15; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = YES; - HEADER_SEARCH_PATHS = ../KountDataCollector; + HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = CheckoutExampleSwift/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.kount.CheckoutExampleSwifts; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/CheckoutExampleSwift/CheckoutExampleSwift/AppDelegate.swift b/CheckoutExampleSwift/CheckoutExampleSwift/AppDelegate.swift index 17eff67..d07a651 100644 --- a/CheckoutExampleSwift/CheckoutExampleSwift/AppDelegate.swift +++ b/CheckoutExampleSwift/CheckoutExampleSwift/AppDelegate.swift @@ -22,11 +22,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // To collect Analytics Data, you'll want set this analyticsData to true or else false let analyticsData = true KountAnalyticsViewController().setEnvironmentForAnalytics(KDataCollector.shared().environment) - KountAnalyticsViewController().collect(sessionID, analyticsSwitch: analyticsData) { (sessionID, error) in - if (error != nil) { - print(error as Any) + KountAnalyticsViewController().collect(sessionID, analyticsSwitch: analyticsData) { + (sessionID, success, error) in + if (success) { + print("Collection Successful") + } + else { + if((error) != nil) { + print("Collection failed with error",error?.localizedDescription as Any) + } + else { + print("Collection failed without error") + } + } } - } return true } diff --git a/KountDataCollector.xcframework/Info.plist b/KountDataCollector.xcframework/Info.plist new file mode 100644 index 0000000..520a8fc --- /dev/null +++ b/KountDataCollector.xcframework/Info.plist @@ -0,0 +1,45 @@ + + + + + AvailableLibraries + + + HeadersPath + Headers + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + libKountDataCollector.a + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + HeadersPath + Headers + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + libKountDataCollector.a + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/KountDataCollector/KDataCollector.h b/KountDataCollector.xcframework/ios-arm64_armv7/Headers/KDataCollector.h similarity index 100% rename from KountDataCollector/KDataCollector.h rename to KountDataCollector.xcframework/ios-arm64_armv7/Headers/KDataCollector.h diff --git a/KountDataCollector.xcframework/ios-arm64_armv7/Headers/KountAnalyticsViewController.h b/KountDataCollector.xcframework/ios-arm64_armv7/Headers/KountAnalyticsViewController.h new file mode 100644 index 0000000..48e6824 --- /dev/null +++ b/KountDataCollector.xcframework/ios-arm64_armv7/Headers/KountAnalyticsViewController.h @@ -0,0 +1,58 @@ +// +// KountAnalyticsViewController.h +// KountDataCollector +// +// Created by Vamsi Krishna on 07/08/20. +// Copyright © 2020 Kount Inc. All rights reserved. +// + +#import +#import +#import +#import "KDataCollector.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface KountAnalyticsViewController : UIViewController { + +} + ++ (id)sharedInstance; ++ (void)setColorWellButtonType; +- (NSString *)getColorWellButtonType; ++ (NSString *)getAppSessionID; +- (BOOL)checkIsDeviceJailbroken; +- (void)appear; +- (void)disappear; +- (int64_t)getEpochTime; +- (void)storeDeletionTime; +- (void)storeStartingTime; +- (void)msDifferenceBetweenCharacter; +- (void)allMsDifferenceBetweenKeys; +- (void)assignInputData; +- (void)deviceDidRotate:(NSNotification *)notification; +- (void)collectBatteryData; +- (void)getBatteryState; +- (void)getBatteryLevel; +- (void)getLowPowerModeStatus; +- (void)didChangeBatteryState:(NSNotification *)notification; +- (void)didChangeBatteryLevel:(NSNotification *)notification; +- (void)didChangePowerMode:(NSNotification *)notification; +- (void)assignBatteryData; +- (void)getDeviceOrientationData; +- (void)collectDeviceOrientationData; +- (void)assignDeviceOrientationData; +- (void)checkForDeviceMotion; +- (void)collect:(NSString *)sessionID analyticsSwitch:(BOOL)analyticsData completion:(nullable void (^)(NSString *_Nonnull sessionID, BOOL success, NSError *_Nullable error))completionBlock; +- (NSString *)getSessionID; +- (void)createJsonObjectFormat; +- (void)storeLogInEvents:(BOOL)logInStatus; +- (void)assignFormData; +- (void)setEnvironmentForAnalytics:(KEnvironment)env; +- (void)registerBackgroundTask; +- (void)appInBackground; + +@end + +NS_ASSUME_NONNULL_END + diff --git a/KountDataCollector.xcframework/ios-arm64_armv7/libKountDataCollector.a b/KountDataCollector.xcframework/ios-arm64_armv7/libKountDataCollector.a new file mode 100644 index 0000000..13c2a19 Binary files /dev/null and b/KountDataCollector.xcframework/ios-arm64_armv7/libKountDataCollector.a differ diff --git a/KountDataCollector.xcframework/ios-arm64_x86_64-simulator/Headers/KDataCollector.h b/KountDataCollector.xcframework/ios-arm64_x86_64-simulator/Headers/KDataCollector.h new file mode 100644 index 0000000..a5f71e5 --- /dev/null +++ b/KountDataCollector.xcframework/ios-arm64_x86_64-simulator/Headers/KDataCollector.h @@ -0,0 +1,106 @@ +// +// KDataCollector.h +// Kount Data Collector SDK +// +// Copyright © 2016 Kount Inc. All rights reserved. +// + +#import + +// Error Codes +typedef NS_ENUM(NSInteger, KDataCollectorErrorCode) { + + KDataCollectorErrorCodeUnknown = 0, + + // A system error occurred + KDataCollectorErrorCodeNSError, + + // A required collector timed out + KDataCollectorErrorCodeTimeout, + + // A bad parameter was passed into the data collector + KDataCollectorErrorCodeBadParameter, + + // A network connection isn't available + KDataCollectorErrorCodeNoNetwork, + + // An error occurred while validating a response from the server + KDataCollectorErrorCodeResponseValidation, +}; + +NS_ASSUME_NONNULL_BEGIN + +extern NSString *const KDataCollectorErrorDomain; + +// Version of the Kount Data Collector SDK +extern NSString *const KDataCollectorVersion; + +// Configuration settings for location collection +typedef NS_ENUM(NSInteger, KLocationCollectorConfig) { + + // Request permission if not currently authorized (default) + KLocationCollectorConfigRequestPermission = 0, + + // Only collect if app already has location permissions + // (use in cases where requesting permission is done by the app itself) + KLocationCollectorConfigPassive, + + // Skip location collection + KLocationCollectorConfigSkip, +}; + +// Configuration settings Kount collection environment +typedef NS_ENUM(NSInteger, KEnvironment) { + + // Unknown Environment + KEnvironmentUnknown = 0, + + // Test Environment + KEnvironmentTest, + + // Production Environment + KEnvironmentProduction, +}; + +// KDataCollector enables you to collect device information for the given session +// +// First, configure the collector during the initialization of your application +// Second, call collectForSession when you start the payment checkout process +// +@interface KDataCollector : NSObject + +// Get the shared instance of the Data Collector ++ (KDataCollector *)sharedCollector; + +// +// Configuration +// + +// The Kount Merchant ID +@property NSInteger merchantID; +// The configuration of the location collector to determine if and how it goes about collection location +@property KLocationCollectorConfig locationCollectorConfig; +// Debug logging to the console +@property BOOL debug; +// Timeout in MS for the collection +@property NSInteger timeoutInMS; +// The Kount environment +@property KEnvironment environment; +// Device Data Sending to Analytics SDK +@property NSDictionary *deviceDataForAnalytics; + +// +// Collection +// + +// Collect data for the session. +// +// @param sessionID A unique session ID that should match the sessionID for the payment transaction +// @param completionBlock This completion block will be called when the collection has completed or an error occurs. +- (void)collectForSession:(NSString *)sessionID completion:(nullable void (^)(NSString *_Nonnull sessionID, BOOL success, NSError *_Nullable error))completionBlock; + +NS_ASSUME_NONNULL_END + +@end + + diff --git a/KountDataCollector.xcframework/ios-arm64_x86_64-simulator/Headers/KountAnalyticsViewController.h b/KountDataCollector.xcframework/ios-arm64_x86_64-simulator/Headers/KountAnalyticsViewController.h new file mode 100644 index 0000000..48e6824 --- /dev/null +++ b/KountDataCollector.xcframework/ios-arm64_x86_64-simulator/Headers/KountAnalyticsViewController.h @@ -0,0 +1,58 @@ +// +// KountAnalyticsViewController.h +// KountDataCollector +// +// Created by Vamsi Krishna on 07/08/20. +// Copyright © 2020 Kount Inc. All rights reserved. +// + +#import +#import +#import +#import "KDataCollector.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface KountAnalyticsViewController : UIViewController { + +} + ++ (id)sharedInstance; ++ (void)setColorWellButtonType; +- (NSString *)getColorWellButtonType; ++ (NSString *)getAppSessionID; +- (BOOL)checkIsDeviceJailbroken; +- (void)appear; +- (void)disappear; +- (int64_t)getEpochTime; +- (void)storeDeletionTime; +- (void)storeStartingTime; +- (void)msDifferenceBetweenCharacter; +- (void)allMsDifferenceBetweenKeys; +- (void)assignInputData; +- (void)deviceDidRotate:(NSNotification *)notification; +- (void)collectBatteryData; +- (void)getBatteryState; +- (void)getBatteryLevel; +- (void)getLowPowerModeStatus; +- (void)didChangeBatteryState:(NSNotification *)notification; +- (void)didChangeBatteryLevel:(NSNotification *)notification; +- (void)didChangePowerMode:(NSNotification *)notification; +- (void)assignBatteryData; +- (void)getDeviceOrientationData; +- (void)collectDeviceOrientationData; +- (void)assignDeviceOrientationData; +- (void)checkForDeviceMotion; +- (void)collect:(NSString *)sessionID analyticsSwitch:(BOOL)analyticsData completion:(nullable void (^)(NSString *_Nonnull sessionID, BOOL success, NSError *_Nullable error))completionBlock; +- (NSString *)getSessionID; +- (void)createJsonObjectFormat; +- (void)storeLogInEvents:(BOOL)logInStatus; +- (void)assignFormData; +- (void)setEnvironmentForAnalytics:(KEnvironment)env; +- (void)registerBackgroundTask; +- (void)appInBackground; + +@end + +NS_ASSUME_NONNULL_END + diff --git a/KountDataCollector.xcframework/ios-arm64_x86_64-simulator/libKountDataCollector.a b/KountDataCollector.xcframework/ios-arm64_x86_64-simulator/libKountDataCollector.a new file mode 100644 index 0000000..6e57781 Binary files /dev/null and b/KountDataCollector.xcframework/ios-arm64_x86_64-simulator/libKountDataCollector.a differ diff --git a/KountDataCollector/TouchControls/UIControl+CustomControl.m b/KountDataCollector/TouchControls/UIControl+CustomControl.m deleted file mode 100644 index b28d37d..0000000 --- a/KountDataCollector/TouchControls/UIControl+CustomControl.m +++ /dev/null @@ -1,68 +0,0 @@ -// -// UIControl+CustomControl.m -// TouchDemo -// -// Created by Astha Ameta on 19/08/20. -// Copyright © 2020 Kount Inc. All rights reserved. -// - -#import "UIControl+CustomControl.h" - -@implementation UIButton (CustomButton) - -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ - [super touchesBegan:touches withEvent:event]; - [self.nextResponder touchesBegan:touches withEvent:event]; -} - -- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ - [super touchesEnded:touches withEvent:event]; - [self.nextResponder touchesEnded:touches withEvent:event]; -} - -- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ - [super touchesMoved:touches withEvent:event]; - [self.nextResponder touchesMoved:touches withEvent:event]; -} - -@end - -@implementation UISlider (CustomSlider) - -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ - [super touchesBegan:touches withEvent:event]; - UIResponder *next = self.nextResponder; - while (next.nextResponder != nil) { - if([next isKindOfClass:[UIViewController class]]){ - break; - } - next = next.nextResponder; - } - [next touchesBegan:touches withEvent:event]; -} - -- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ - [super touchesEnded:touches withEvent:event]; - UIResponder *next = self.nextResponder; - while (next.nextResponder != nil) { - if([next isKindOfClass:[UIViewController class]]){ - break; - } - next = next.nextResponder; - } - [next touchesEnded:touches withEvent:event]; -} - -- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ - [super touchesMoved:touches withEvent:event]; - UIResponder *next = self.nextResponder; - while (next.nextResponder != nil) { - if([next isKindOfClass:[UIViewController class]]){ - break; - } - next = next.nextResponder; - } - [next touchesMoved:touches withEvent:event]; -} - -@end diff --git a/KountDataCollectorUnivesalLibrary/KDataCollector.h b/KountDataCollectorUnivesalLibrary/KDataCollector.h new file mode 100644 index 0000000..a5f71e5 --- /dev/null +++ b/KountDataCollectorUnivesalLibrary/KDataCollector.h @@ -0,0 +1,106 @@ +// +// KDataCollector.h +// Kount Data Collector SDK +// +// Copyright © 2016 Kount Inc. All rights reserved. +// + +#import + +// Error Codes +typedef NS_ENUM(NSInteger, KDataCollectorErrorCode) { + + KDataCollectorErrorCodeUnknown = 0, + + // A system error occurred + KDataCollectorErrorCodeNSError, + + // A required collector timed out + KDataCollectorErrorCodeTimeout, + + // A bad parameter was passed into the data collector + KDataCollectorErrorCodeBadParameter, + + // A network connection isn't available + KDataCollectorErrorCodeNoNetwork, + + // An error occurred while validating a response from the server + KDataCollectorErrorCodeResponseValidation, +}; + +NS_ASSUME_NONNULL_BEGIN + +extern NSString *const KDataCollectorErrorDomain; + +// Version of the Kount Data Collector SDK +extern NSString *const KDataCollectorVersion; + +// Configuration settings for location collection +typedef NS_ENUM(NSInteger, KLocationCollectorConfig) { + + // Request permission if not currently authorized (default) + KLocationCollectorConfigRequestPermission = 0, + + // Only collect if app already has location permissions + // (use in cases where requesting permission is done by the app itself) + KLocationCollectorConfigPassive, + + // Skip location collection + KLocationCollectorConfigSkip, +}; + +// Configuration settings Kount collection environment +typedef NS_ENUM(NSInteger, KEnvironment) { + + // Unknown Environment + KEnvironmentUnknown = 0, + + // Test Environment + KEnvironmentTest, + + // Production Environment + KEnvironmentProduction, +}; + +// KDataCollector enables you to collect device information for the given session +// +// First, configure the collector during the initialization of your application +// Second, call collectForSession when you start the payment checkout process +// +@interface KDataCollector : NSObject + +// Get the shared instance of the Data Collector ++ (KDataCollector *)sharedCollector; + +// +// Configuration +// + +// The Kount Merchant ID +@property NSInteger merchantID; +// The configuration of the location collector to determine if and how it goes about collection location +@property KLocationCollectorConfig locationCollectorConfig; +// Debug logging to the console +@property BOOL debug; +// Timeout in MS for the collection +@property NSInteger timeoutInMS; +// The Kount environment +@property KEnvironment environment; +// Device Data Sending to Analytics SDK +@property NSDictionary *deviceDataForAnalytics; + +// +// Collection +// + +// Collect data for the session. +// +// @param sessionID A unique session ID that should match the sessionID for the payment transaction +// @param completionBlock This completion block will be called when the collection has completed or an error occurs. +- (void)collectForSession:(NSString *)sessionID completion:(nullable void (^)(NSString *_Nonnull sessionID, BOOL success, NSError *_Nullable error))completionBlock; + +NS_ASSUME_NONNULL_END + +@end + + diff --git a/KountDataCollector/KountAnalyticsViewController.h b/KountDataCollectorUnivesalLibrary/KountAnalyticsViewController.h similarity index 100% rename from KountDataCollector/KountAnalyticsViewController.h rename to KountDataCollectorUnivesalLibrary/KountAnalyticsViewController.h diff --git a/KountDataCollector/TouchControls/CustomWindow.h b/KountDataCollectorUnivesalLibrary/TouchControls/CustomWindow.h similarity index 100% rename from KountDataCollector/TouchControls/CustomWindow.h rename to KountDataCollectorUnivesalLibrary/TouchControls/CustomWindow.h diff --git a/KountDataCollector/TouchControls/CustomWindow.m b/KountDataCollectorUnivesalLibrary/TouchControls/CustomWindow.m similarity index 100% rename from KountDataCollector/TouchControls/CustomWindow.m rename to KountDataCollectorUnivesalLibrary/TouchControls/CustomWindow.m diff --git a/KountDataCollector/TouchControls/UIControl+CustomControl.h b/KountDataCollectorUnivesalLibrary/TouchControls/UIControl+CustomControl.h similarity index 51% rename from KountDataCollector/TouchControls/UIControl+CustomControl.h rename to KountDataCollectorUnivesalLibrary/TouchControls/UIControl+CustomControl.h index 70b5df2..3a8f6d2 100644 --- a/KountDataCollector/TouchControls/UIControl+CustomControl.h +++ b/KountDataCollectorUnivesalLibrary/TouchControls/UIControl+CustomControl.h @@ -15,3 +15,24 @@ @interface UISlider (CustomSlider) @end + +@interface UIStepper (CustomStepper) + +@end + +@interface UIPageControl (CustomPageControl) + +@end + +@interface UIColorWell (CustomColorWell) + +@end + +@interface UIScrollView (CustomScrollView) + +@end + +@interface UITableView (CustomTableView) + +@end + diff --git a/KountDataCollectorUnivesalLibrary/TouchControls/UIControl+CustomControl.m b/KountDataCollectorUnivesalLibrary/TouchControls/UIControl+CustomControl.m new file mode 100644 index 0000000..9e6fcf6 --- /dev/null +++ b/KountDataCollectorUnivesalLibrary/TouchControls/UIControl+CustomControl.m @@ -0,0 +1,138 @@ +// +// UIControl+CustomControl.m +// TouchDemo +// +// Created by Astha Ameta on 19/08/20. +// Copyright © 2020 Kount Inc. All rights reserved. +// + +#import "UIControl+CustomControl.h" +#import "KountAnalyticsViewController.h" + +@implementation UIButton (CustomButton) + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ + [super touchesBegan:touches withEvent:event]; + [self.nextResponder touchesBegan:touches withEvent:event]; +} + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ + [super touchesEnded:touches withEvent:event]; + [self.nextResponder touchesEnded:touches withEvent:event]; +} + +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ + [super touchesMoved:touches withEvent:event]; + [self.nextResponder touchesMoved:touches withEvent:event]; +} + +@end + +@implementation UISlider (CustomSlider) + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ + [super touchesBegan:touches withEvent:event]; + UIResponder *next = self.nextResponder; + while (next.nextResponder != nil) { + if([next isKindOfClass:[UIViewController class]]){ + break; + } + next = next.nextResponder; + } + [next touchesBegan:touches withEvent:event]; +} + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ + [super touchesEnded:touches withEvent:event]; + UIResponder *next = self.nextResponder; + while (next.nextResponder != nil) { + if([next isKindOfClass:[UIViewController class]]){ + break; + } + next = next.nextResponder; + } + [next touchesEnded:touches withEvent:event]; +} + +@end + +@implementation UIStepper (CustomStepper) + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ + [super touchesBegan:touches withEvent:event]; + [self.nextResponder touchesBegan:touches withEvent:event]; +} + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ + [super touchesEnded:touches withEvent:event]; + [self.nextResponder touchesEnded:touches withEvent:event]; +} + +@end + +@implementation UIPageControl (CustomPageControl) + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ + [super touchesBegan:touches withEvent:event]; + [self.nextResponder touchesBegan:touches withEvent:event]; +} + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ + [super touchesEnded:touches withEvent:event]; + [self.nextResponder touchesEnded:touches withEvent:event]; +} + +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ + [super touchesMoved:touches withEvent:event]; + [self.nextResponder touchesMoved:touches withEvent:event]; +} + +@end + +@implementation UIColorWell (CustomColorWell) + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ + [KountAnalyticsViewController setColorWellButtonType]; + [super touchesBegan:touches withEvent:event]; + [self.nextResponder touchesBegan:touches withEvent:event]; +} + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ + [super touchesEnded:touches withEvent:event]; + [self.nextResponder touchesEnded:touches withEvent:event]; +} + +@end + + +@implementation UIScrollView (CustomScrollView) + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ + [self.nextResponder touchesBegan:touches withEvent:event]; +} + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ + [self.nextResponder touchesEnded:touches withEvent:event]; +} + +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ + [self.nextResponder touchesMoved:touches withEvent:event]; +} + +@end + +@implementation UITableView (CustomTableView) + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ + [self.nextResponder touchesBegan:touches withEvent:event]; +} + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ + [self.nextResponder touchesEnded:touches withEvent:event]; +} + +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ + [self.nextResponder touchesMoved:touches withEvent:event]; +} + +@end diff --git a/KountDataCollector/TouchControls/UIViewController+TouchControl.h b/KountDataCollectorUnivesalLibrary/TouchControls/UIViewController+TouchControl.h similarity index 100% rename from KountDataCollector/TouchControls/UIViewController+TouchControl.h rename to KountDataCollectorUnivesalLibrary/TouchControls/UIViewController+TouchControl.h diff --git a/KountDataCollector/TouchControls/UIViewController+TouchControl.m b/KountDataCollectorUnivesalLibrary/TouchControls/UIViewController+TouchControl.m similarity index 100% rename from KountDataCollector/TouchControls/UIViewController+TouchControl.m rename to KountDataCollectorUnivesalLibrary/TouchControls/UIViewController+TouchControl.m diff --git a/KountDataCollector/libKountDataCollector.a b/KountDataCollectorUnivesalLibrary/libKountDataCollector.a similarity index 100% rename from KountDataCollector/libKountDataCollector.a rename to KountDataCollectorUnivesalLibrary/libKountDataCollector.a