diff --git a/Rudder.xcodeproj/project.pbxproj b/Rudder.xcodeproj/project.pbxproj index de90c300..95bd1829 100644 --- a/Rudder.xcodeproj/project.pbxproj +++ b/Rudder.xcodeproj/project.pbxproj @@ -9,11 +9,12 @@ /* Begin PBXBuildFile section */ 06CABC332630C6B00097BEFF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 06CABC322630C6B00097BEFF /* Foundation.framework */; }; 06CABC352630C6D30097BEFF /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 06CABC2E2630C6660097BEFF /* UIKit.framework */; }; - 238487371079D14D0B098555 /* Pods_RudderTests_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8ACE1A679CAD30B58E39A88 /* Pods_RudderTests_tvOS.framework */; }; - 431F0AE2E4A192AE78D34326 /* Pods_RudderTests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E491712EDB73E1E33A1C1129 /* Pods_RudderTests_iOS.framework */; }; - 9C58FA70616A3762BE1FBE9B /* Pods_Rudder_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED1B2AD2F9D4E0F26745091B /* Pods_Rudder_iOS.framework */; }; - 9FEE83571C0E25C88369FE41 /* Pods_RudderTests_watchOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FFA1BAA6275D5530AC912B3 /* Pods_RudderTests_watchOS.framework */; }; - BF320707E73393A5EC3DB72B /* Pods_Rudder_watchOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AB3A24BE91BE2AEE0CA3FF1 /* Pods_Rudder_watchOS.framework */; }; + 124BC738753A7EBA2BDB77FE /* Pods_Rudder_watchOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1251BED05C11996C9985542F /* Pods_Rudder_watchOS.framework */; }; + 19B7B2014341F881D7F342F2 /* Pods_RudderTests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BEDBEB016295CE3F60A3BCEA /* Pods_RudderTests_iOS.framework */; }; + 5748B013B070B0CD0CE2F13B /* Pods_Rudder_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DA5FC16FAC93546433E646D /* Pods_Rudder_tvOS.framework */; }; + 918937C316BE629F324D3F51 /* Pods_Rudder_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B8A6F843BFFF0E7D92C128D6 /* Pods_Rudder_iOS.framework */; }; + AEDD7B16575CD61874C7B566 /* Pods_RudderTests_watchOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AAE0087EA56042D53789FCB /* Pods_RudderTests_watchOS.framework */; }; + C646AE273D48DC6FB39D37A3 /* Pods_RudderTests_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50A2F232CDDFC398BD7D1C1C /* Pods_RudderTests_tvOS.framework */; }; ED0CA6EA2A7D08B900899C1C /* RSTransformationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F6F2FA752A53D8310025D510 /* RSTransformationEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; ED0CA6EB2A7D08B900899C1C /* RSTransformationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F6F2FA752A53D8310025D510 /* RSTransformationEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; ED0CA6EC2A7D08D800899C1C /* RSTransformationRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = F6F2FA732A53CD9F0025D510 /* RSTransformationRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -715,7 +716,6 @@ F6F2FA782A53D8520025D510 /* RSTransformationEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = F6F2FA772A53D8520025D510 /* RSTransformationEvent.m */; }; F6F2FA7A2A53D8BF0025D510 /* RSTransformationMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = F6F2FA792A53D8BF0025D510 /* RSTransformationMetadata.h */; settings = {ATTRIBUTES = (Public, ); }; }; F6F2FA7C2A53D8E50025D510 /* RSTransformationMetadata.m in Sources */ = {isa = PBXBuildFile; fileRef = F6F2FA7B2A53D8E50025D510 /* RSTransformationMetadata.m */; }; - F7A8C3320A3B92B920A6B7EF /* Pods_Rudder_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93E378BE7E662EC3466AD22C /* Pods_Rudder_tvOS.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -743,28 +743,29 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 047016191610999BB5D6639D /* Pods-RudderTests-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-iOS.debug.xcconfig"; path = "Target Support Files/Pods-RudderTests-iOS/Pods-RudderTests-iOS.debug.xcconfig"; sourceTree = ""; }; 06CABB842630C3CA0097BEFF /* Rudder.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Rudder.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 06CABC2E2630C6660097BEFF /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/iOSSupport/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 06CABC322630C6B00097BEFF /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 0AB3A24BE91BE2AEE0CA3FF1 /* Pods_Rudder_watchOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Rudder_watchOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 0C12A2068DA24653A547FFC5 /* Pods-RudderTests-watchOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-watchOS.release.xcconfig"; path = "Target Support Files/Pods-RudderTests-watchOS/Pods-RudderTests-watchOS.release.xcconfig"; sourceTree = ""; }; - 46E7849777925491E280B136 /* Pods-RudderTests-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-tvOS.release.xcconfig"; path = "Target Support Files/Pods-RudderTests-tvOS/Pods-RudderTests-tvOS.release.xcconfig"; sourceTree = ""; }; - 594C68EBA69B23ED13FCDF7D /* Pods-RudderTests-watchOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-watchOS.debug.xcconfig"; path = "Target Support Files/Pods-RudderTests-watchOS/Pods-RudderTests-watchOS.debug.xcconfig"; sourceTree = ""; }; - 62E2A1E694983F13BA03EB9D /* Pods-Rudder-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-iOS.release.xcconfig"; path = "Target Support Files/Pods-Rudder-iOS/Pods-Rudder-iOS.release.xcconfig"; sourceTree = ""; }; - 6725E430849222D61D5E0234 /* Pods-Rudder-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-Rudder-tvOS/Pods-Rudder-tvOS.debug.xcconfig"; sourceTree = ""; }; - 67B6FB354D9492FE1F10F098 /* Pods-RudderTests-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-RudderTests-tvOS/Pods-RudderTests-tvOS.debug.xcconfig"; sourceTree = ""; }; - 696BB56E6F38B30EA9E87E59 /* Pods-RudderTests-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-iOS.release.xcconfig"; path = "Target Support Files/Pods-RudderTests-iOS/Pods-RudderTests-iOS.release.xcconfig"; sourceTree = ""; }; - 6B7B1FD50E9D829FF642DF10 /* Pods-Rudder-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-tvOS.release.xcconfig"; path = "Target Support Files/Pods-Rudder-tvOS/Pods-Rudder-tvOS.release.xcconfig"; sourceTree = ""; }; - 93E378BE7E662EC3466AD22C /* Pods_Rudder_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Rudder_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9FFA1BAA6275D5530AC912B3 /* Pods_RudderTests_watchOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RudderTests_watchOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A1322AEF7B87457F0BB3A90F /* Pods-Rudder-watchOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-watchOS.debug.xcconfig"; path = "Target Support Files/Pods-Rudder-watchOS/Pods-Rudder-watchOS.debug.xcconfig"; sourceTree = ""; }; - A8923DB47023C19C14199A71 /* Pods-Rudder-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-iOS.debug.xcconfig"; path = "Target Support Files/Pods-Rudder-iOS/Pods-Rudder-iOS.debug.xcconfig"; sourceTree = ""; }; - A8ACE1A679CAD30B58E39A88 /* Pods_RudderTests_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RudderTests_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E491712EDB73E1E33A1C1129 /* Pods_RudderTests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RudderTests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0A977578ECF172470D193554 /* Pods-RudderTests-watchOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-watchOS.release.xcconfig"; path = "Target Support Files/Pods-RudderTests-watchOS/Pods-RudderTests-watchOS.release.xcconfig"; sourceTree = ""; }; + 1251BED05C11996C9985542F /* Pods_Rudder_watchOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Rudder_watchOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1AAE0087EA56042D53789FCB /* Pods_RudderTests_watchOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RudderTests_watchOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DA5FC16FAC93546433E646D /* Pods_Rudder_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Rudder_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D9792D9F5CE88B5BC97B978 /* Pods-Rudder-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-Rudder-tvOS/Pods-Rudder-tvOS.debug.xcconfig"; sourceTree = ""; }; + 478CD144BEBFA7832B7B2035 /* Pods-RudderTests-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-iOS.debug.xcconfig"; path = "Target Support Files/Pods-RudderTests-iOS/Pods-RudderTests-iOS.debug.xcconfig"; sourceTree = ""; }; + 50A2F232CDDFC398BD7D1C1C /* Pods_RudderTests_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RudderTests_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5C9B965CD54B037B411A0124 /* Pods-RudderTests-watchOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-watchOS.debug.xcconfig"; path = "Target Support Files/Pods-RudderTests-watchOS/Pods-RudderTests-watchOS.debug.xcconfig"; sourceTree = ""; }; + 708F7213A7BE91F370104DDD /* Pods-RudderTests-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-RudderTests-tvOS/Pods-RudderTests-tvOS.debug.xcconfig"; sourceTree = ""; }; + 72B1E09C53F0A419370FFFE4 /* Pods-RudderTests-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-iOS.release.xcconfig"; path = "Target Support Files/Pods-RudderTests-iOS/Pods-RudderTests-iOS.release.xcconfig"; sourceTree = ""; }; + 7F63AF3B53A8A5CA8E853F8E /* Pods-Rudder-watchOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-watchOS.debug.xcconfig"; path = "Target Support Files/Pods-Rudder-watchOS/Pods-Rudder-watchOS.debug.xcconfig"; sourceTree = ""; }; + B8A6F843BFFF0E7D92C128D6 /* Pods_Rudder_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Rudder_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + BEDBEB016295CE3F60A3BCEA /* Pods_RudderTests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RudderTests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C148B926084FFA4AD60811E1 /* Pods-RudderTests-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-tvOS.release.xcconfig"; path = "Target Support Files/Pods-RudderTests-tvOS/Pods-RudderTests-tvOS.release.xcconfig"; sourceTree = ""; }; + D0E9154343D77C1B5263184E /* Pods-Rudder-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-iOS.debug.xcconfig"; path = "Target Support Files/Pods-Rudder-iOS/Pods-Rudder-iOS.debug.xcconfig"; sourceTree = ""; }; + D857424193DECFDA1E89A1FC /* Pods-Rudder-watchOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-watchOS.release.xcconfig"; path = "Target Support Files/Pods-Rudder-watchOS/Pods-Rudder-watchOS.release.xcconfig"; sourceTree = ""; }; + D9AF18B47F6BD6F20709346B /* Pods-Rudder-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-iOS.release.xcconfig"; path = "Target Support Files/Pods-Rudder-iOS/Pods-Rudder-iOS.release.xcconfig"; sourceTree = ""; }; + E4DCE5E11979AB9681B17F25 /* Pods-Rudder-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-tvOS.release.xcconfig"; path = "Target Support Files/Pods-Rudder-tvOS/Pods-Rudder-tvOS.release.xcconfig"; sourceTree = ""; }; ED04A2482986C1750080A88D /* xccov-to-generic.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "xccov-to-generic.sh"; sourceTree = ""; }; ED056314291AABFD00BAEE65 /* sonar-project.properties */ = {isa = PBXFileReference; lastKnownFileType = text; path = "sonar-project.properties"; sourceTree = ""; }; - ED1B2AD2F9D4E0F26745091B /* Pods_Rudder_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Rudder_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; ED1C4C8829E6CCC7007007C9 /* find-tag.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "find-tag.sh"; sourceTree = ""; }; ED252CF52AA8780600B17ACF /* UserSessionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSessionTests.swift; sourceTree = ""; }; ED38D36C29CB01A0003A7544 /* DataResidencyTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataResidencyTests.swift; sourceTree = ""; }; @@ -1020,7 +1021,6 @@ F6F2FA772A53D8520025D510 /* RSTransformationEvent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RSTransformationEvent.m; sourceTree = ""; }; F6F2FA792A53D8BF0025D510 /* RSTransformationMetadata.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RSTransformationMetadata.h; sourceTree = ""; }; F6F2FA7B2A53D8E50025D510 /* RSTransformationMetadata.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RSTransformationMetadata.m; sourceTree = ""; }; - F8F5D21AB948C5691AD2ADA9 /* Pods-Rudder-watchOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-watchOS.release.xcconfig"; path = "Target Support Files/Pods-Rudder-watchOS/Pods-Rudder-watchOS.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -1031,7 +1031,7 @@ 06CABC332630C6B00097BEFF /* Foundation.framework in Frameworks */, 06CABC352630C6D30097BEFF /* UIKit.framework in Frameworks */, EDEF1B312A835A90002B3E57 /* Security.framework in Frameworks */, - 9C58FA70616A3762BE1FBE9B /* Pods_Rudder_iOS.framework in Frameworks */, + 918937C316BE629F324D3F51 /* Pods_Rudder_iOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1041,7 +1041,7 @@ files = ( ED998F0F2A69003600031B06 /* Foundation.framework in Frameworks */, ED998F102A69003600031B06 /* UIKit.framework in Frameworks */, - F7A8C3320A3B92B920A6B7EF /* Pods_Rudder_tvOS.framework in Frameworks */, + 5748B013B070B0CD0CE2F13B /* Pods_Rudder_tvOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1051,7 +1051,7 @@ files = ( ED998FDF2A69024E00031B06 /* Foundation.framework in Frameworks */, ED998FE02A69024E00031B06 /* UIKit.framework in Frameworks */, - BF320707E73393A5EC3DB72B /* Pods_Rudder_watchOS.framework in Frameworks */, + 124BC738753A7EBA2BDB77FE /* Pods_Rudder_watchOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1060,7 +1060,7 @@ buildActionMask = 2147483647; files = ( ED9990312A69102400031B06 /* Rudder.framework in Frameworks */, - 238487371079D14D0B098555 /* Pods_RudderTests_tvOS.framework in Frameworks */, + C646AE273D48DC6FB39D37A3 /* Pods_RudderTests_tvOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1069,7 +1069,7 @@ buildActionMask = 2147483647; files = ( ED99903F2A69103B00031B06 /* Rudder.framework in Frameworks */, - 431F0AE2E4A192AE78D34326 /* Pods_RudderTests_iOS.framework in Frameworks */, + 19B7B2014341F881D7F342F2 /* Pods_RudderTests_iOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1078,7 +1078,7 @@ buildActionMask = 2147483647; files = ( ED99904D2A69104B00031B06 /* Rudder.framework in Frameworks */, - 9FEE83571C0E25C88369FE41 /* Pods_RudderTests_watchOS.framework in Frameworks */, + AEDD7B16575CD61874C7B566 /* Pods_RudderTests_watchOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1116,12 +1116,12 @@ EDEF1B302A835A90002B3E57 /* Security.framework */, 06CABC322630C6B00097BEFF /* Foundation.framework */, 06CABC2E2630C6660097BEFF /* UIKit.framework */, - ED1B2AD2F9D4E0F26745091B /* Pods_Rudder_iOS.framework */, - 93E378BE7E662EC3466AD22C /* Pods_Rudder_tvOS.framework */, - 0AB3A24BE91BE2AEE0CA3FF1 /* Pods_Rudder_watchOS.framework */, - E491712EDB73E1E33A1C1129 /* Pods_RudderTests_iOS.framework */, - A8ACE1A679CAD30B58E39A88 /* Pods_RudderTests_tvOS.framework */, - 9FFA1BAA6275D5530AC912B3 /* Pods_RudderTests_watchOS.framework */, + B8A6F843BFFF0E7D92C128D6 /* Pods_Rudder_iOS.framework */, + 1DA5FC16FAC93546433E646D /* Pods_Rudder_tvOS.framework */, + 1251BED05C11996C9985542F /* Pods_Rudder_watchOS.framework */, + BEDBEB016295CE3F60A3BCEA /* Pods_RudderTests_iOS.framework */, + 50A2F232CDDFC398BD7D1C1C /* Pods_RudderTests_tvOS.framework */, + 1AAE0087EA56042D53789FCB /* Pods_RudderTests_watchOS.framework */, ); name = Frameworks; sourceTree = ""; @@ -1129,18 +1129,18 @@ DFB2363B6EC8D146934DE8DD /* Pods */ = { isa = PBXGroup; children = ( - A8923DB47023C19C14199A71 /* Pods-Rudder-iOS.debug.xcconfig */, - 62E2A1E694983F13BA03EB9D /* Pods-Rudder-iOS.release.xcconfig */, - 6725E430849222D61D5E0234 /* Pods-Rudder-tvOS.debug.xcconfig */, - 6B7B1FD50E9D829FF642DF10 /* Pods-Rudder-tvOS.release.xcconfig */, - A1322AEF7B87457F0BB3A90F /* Pods-Rudder-watchOS.debug.xcconfig */, - F8F5D21AB948C5691AD2ADA9 /* Pods-Rudder-watchOS.release.xcconfig */, - 047016191610999BB5D6639D /* Pods-RudderTests-iOS.debug.xcconfig */, - 696BB56E6F38B30EA9E87E59 /* Pods-RudderTests-iOS.release.xcconfig */, - 67B6FB354D9492FE1F10F098 /* Pods-RudderTests-tvOS.debug.xcconfig */, - 46E7849777925491E280B136 /* Pods-RudderTests-tvOS.release.xcconfig */, - 594C68EBA69B23ED13FCDF7D /* Pods-RudderTests-watchOS.debug.xcconfig */, - 0C12A2068DA24653A547FFC5 /* Pods-RudderTests-watchOS.release.xcconfig */, + D0E9154343D77C1B5263184E /* Pods-Rudder-iOS.debug.xcconfig */, + D9AF18B47F6BD6F20709346B /* Pods-Rudder-iOS.release.xcconfig */, + 2D9792D9F5CE88B5BC97B978 /* Pods-Rudder-tvOS.debug.xcconfig */, + E4DCE5E11979AB9681B17F25 /* Pods-Rudder-tvOS.release.xcconfig */, + 7F63AF3B53A8A5CA8E853F8E /* Pods-Rudder-watchOS.debug.xcconfig */, + D857424193DECFDA1E89A1FC /* Pods-Rudder-watchOS.release.xcconfig */, + 478CD144BEBFA7832B7B2035 /* Pods-RudderTests-iOS.debug.xcconfig */, + 72B1E09C53F0A419370FFFE4 /* Pods-RudderTests-iOS.release.xcconfig */, + 708F7213A7BE91F370104DDD /* Pods-RudderTests-tvOS.debug.xcconfig */, + C148B926084FFA4AD60811E1 /* Pods-RudderTests-tvOS.release.xcconfig */, + 5C9B965CD54B037B411A0124 /* Pods-RudderTests-watchOS.debug.xcconfig */, + 0A977578ECF172470D193554 /* Pods-RudderTests-watchOS.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -1858,7 +1858,7 @@ isa = PBXNativeTarget; buildConfigurationList = 06CABB982630C3CA0097BEFF /* Build configuration list for PBXNativeTarget "Rudder-iOS" */; buildPhases = ( - AFEA49832884FFAB57FDF230 /* [CP] Check Pods Manifest.lock */, + 6603BAF043C4A2A042A5473E /* [CP] Check Pods Manifest.lock */, 06CABB7F2630C3CA0097BEFF /* Headers */, 06CABB802630C3CA0097BEFF /* Sources */, 06CABB812630C3CA0097BEFF /* Frameworks */, @@ -1877,7 +1877,7 @@ isa = PBXNativeTarget; buildConfigurationList = ED998F122A69003600031B06 /* Build configuration list for PBXNativeTarget "Rudder-tvOS" */; buildPhases = ( - 3D29E465A99831E1830BA50E /* [CP] Check Pods Manifest.lock */, + 8211AF91A45176C2F3C05AB6 /* [CP] Check Pods Manifest.lock */, ED998E482A69003600031B06 /* Headers */, ED998EAE2A69003600031B06 /* Sources */, ED998F0E2A69003600031B06 /* Frameworks */, @@ -1896,7 +1896,7 @@ isa = PBXNativeTarget; buildConfigurationList = ED998FE22A69024E00031B06 /* Build configuration list for PBXNativeTarget "Rudder-watchOS" */; buildPhases = ( - FA646B8CEFE5AE97B9FF54B7 /* [CP] Check Pods Manifest.lock */, + C4F5EECB398F2E5B40FC806B /* [CP] Check Pods Manifest.lock */, ED998F182A69024E00031B06 /* Headers */, ED998F7E2A69024E00031B06 /* Sources */, ED998FDE2A69024E00031B06 /* Frameworks */, @@ -1915,11 +1915,11 @@ isa = PBXNativeTarget; buildConfigurationList = ED9990342A69102400031B06 /* Build configuration list for PBXNativeTarget "RudderTests-tvOS" */; buildPhases = ( - 7BD8C108C1E023AEC53DA6B9 /* [CP] Check Pods Manifest.lock */, + 1228038C95CFF2E450B90C7A /* [CP] Check Pods Manifest.lock */, ED9990292A69102400031B06 /* Sources */, ED99902A2A69102400031B06 /* Frameworks */, ED99902B2A69102400031B06 /* Resources */, - D500A6672225011FA2D992BA /* [CP] Embed Pods Frameworks */, + FB1FEF9094CDAC9D21EE165B /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -1935,11 +1935,11 @@ isa = PBXNativeTarget; buildConfigurationList = ED9990422A69103B00031B06 /* Build configuration list for PBXNativeTarget "RudderTests-iOS" */; buildPhases = ( - ECDDBE7C2C4DEAE0E3739C04 /* [CP] Check Pods Manifest.lock */, + 43AD776146E9FC1A22584E6C /* [CP] Check Pods Manifest.lock */, ED9990372A69103A00031B06 /* Sources */, ED9990382A69103A00031B06 /* Frameworks */, ED9990392A69103A00031B06 /* Resources */, - 2DD0BFC71FCF57B2030F35F0 /* [CP] Embed Pods Frameworks */, + A676A135DFA28837FF6B5D35 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -1955,11 +1955,11 @@ isa = PBXNativeTarget; buildConfigurationList = ED9990502A69104B00031B06 /* Build configuration list for PBXNativeTarget "RudderTests-watchOS" */; buildPhases = ( - 410B5B108347EF9C66CDB8CA /* [CP] Check Pods Manifest.lock */, + 9890818812415F2E308E1168 /* [CP] Check Pods Manifest.lock */, ED9990452A69104B00031B06 /* Sources */, ED9990462A69104B00031B06 /* Frameworks */, ED9990472A69104B00031B06 /* Resources */, - 4C1BBEB758DC89CDF90C677E /* [CP] Embed Pods Frameworks */, + 84497B6A8742931A63018B21 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -2097,24 +2097,29 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2DD0BFC71FCF57B2030F35F0 /* [CP] Embed Pods Frameworks */ = { + 1228038C95CFF2E450B90C7A /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RudderTests-iOS/Pods-RudderTests-iOS-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RudderTests-iOS/Pods-RudderTests-iOS-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RudderTests-tvOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RudderTests-iOS/Pods-RudderTests-iOS-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 3D29E465A99831E1830BA50E /* [CP] Check Pods Manifest.lock */ = { + 43AD776146E9FC1A22584E6C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2129,14 +2134,14 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Rudder-tvOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-RudderTests-iOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 410B5B108347EF9C66CDB8CA /* [CP] Check Pods Manifest.lock */ = { + 6603BAF043C4A2A042A5473E /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2151,53 +2156,53 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RudderTests-watchOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Rudder-iOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 4C1BBEB758DC89CDF90C677E /* [CP] Embed Pods Frameworks */ = { + 8211AF91A45176C2F3C05AB6 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RudderTests-watchOS/Pods-RudderTests-watchOS-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RudderTests-watchOS/Pods-RudderTests-watchOS-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Rudder-tvOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RudderTests-watchOS/Pods-RudderTests-watchOS-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 7BD8C108C1E023AEC53DA6B9 /* [CP] Check Pods Manifest.lock */ = { + 84497B6A8742931A63018B21 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RudderTests-watchOS/Pods-RudderTests-watchOS-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RudderTests-tvOS-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-RudderTests-watchOS/Pods-RudderTests-watchOS-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RudderTests-watchOS/Pods-RudderTests-watchOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - AFEA49832884FFAB57FDF230 /* [CP] Check Pods Manifest.lock */ = { + 9890818812415F2E308E1168 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2212,31 +2217,31 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Rudder-iOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-RudderTests-watchOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - D500A6672225011FA2D992BA /* [CP] Embed Pods Frameworks */ = { + A676A135DFA28837FF6B5D35 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RudderTests-tvOS/Pods-RudderTests-tvOS-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-RudderTests-iOS/Pods-RudderTests-iOS-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RudderTests-tvOS/Pods-RudderTests-tvOS-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-RudderTests-iOS/Pods-RudderTests-iOS-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RudderTests-tvOS/Pods-RudderTests-tvOS-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RudderTests-iOS/Pods-RudderTests-iOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - ECDDBE7C2C4DEAE0E3739C04 /* [CP] Check Pods Manifest.lock */ = { + C4F5EECB398F2E5B40FC806B /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2251,33 +2256,28 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RudderTests-iOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Rudder-watchOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - FA646B8CEFE5AE97B9FF54B7 /* [CP] Check Pods Manifest.lock */ = { + FB1FEF9094CDAC9D21EE165B /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RudderTests-tvOS/Pods-RudderTests-tvOS-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Rudder-watchOS-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-RudderTests-tvOS/Pods-RudderTests-tvOS-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RudderTests-tvOS/Pods-RudderTests-tvOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -2809,7 +2809,7 @@ }; 06CABB992630C3CA0097BEFF /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A8923DB47023C19C14199A71 /* Pods-Rudder-iOS.debug.xcconfig */; + baseConfigurationReference = D0E9154343D77C1B5263184E /* Pods-Rudder-iOS.debug.xcconfig */; buildSettings = { ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; APPLICATION_EXTENSION_API_ONLY = NO; @@ -2854,7 +2854,7 @@ }; 06CABB9A2630C3CA0097BEFF /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 62E2A1E694983F13BA03EB9D /* Pods-Rudder-iOS.release.xcconfig */; + baseConfigurationReference = D9AF18B47F6BD6F20709346B /* Pods-Rudder-iOS.release.xcconfig */; buildSettings = { ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; APPLICATION_EXTENSION_API_ONLY = NO; @@ -2898,7 +2898,7 @@ }; ED998F132A69003600031B06 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6725E430849222D61D5E0234 /* Pods-Rudder-tvOS.debug.xcconfig */; + baseConfigurationReference = 2D9792D9F5CE88B5BC97B978 /* Pods-Rudder-tvOS.debug.xcconfig */; buildSettings = { ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; APPLICATION_EXTENSION_API_ONLY = NO; @@ -2943,7 +2943,7 @@ }; ED998F142A69003600031B06 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6B7B1FD50E9D829FF642DF10 /* Pods-Rudder-tvOS.release.xcconfig */; + baseConfigurationReference = E4DCE5E11979AB9681B17F25 /* Pods-Rudder-tvOS.release.xcconfig */; buildSettings = { ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; APPLICATION_EXTENSION_API_ONLY = NO; @@ -2987,7 +2987,7 @@ }; ED998FE32A69024E00031B06 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A1322AEF7B87457F0BB3A90F /* Pods-Rudder-watchOS.debug.xcconfig */; + baseConfigurationReference = 7F63AF3B53A8A5CA8E853F8E /* Pods-Rudder-watchOS.debug.xcconfig */; buildSettings = { ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; APPLICATION_EXTENSION_API_ONLY = NO; @@ -3032,7 +3032,7 @@ }; ED998FE42A69024E00031B06 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F8F5D21AB948C5691AD2ADA9 /* Pods-Rudder-watchOS.release.xcconfig */; + baseConfigurationReference = D857424193DECFDA1E89A1FC /* Pods-Rudder-watchOS.release.xcconfig */; buildSettings = { ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; APPLICATION_EXTENSION_API_ONLY = NO; @@ -3076,7 +3076,7 @@ }; ED9990352A69102400031B06 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 67B6FB354D9492FE1F10F098 /* Pods-RudderTests-tvOS.debug.xcconfig */; + baseConfigurationReference = 708F7213A7BE91F370104DDD /* Pods-RudderTests-tvOS.debug.xcconfig */; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CODE_SIGN_STYLE = Automatic; @@ -3098,7 +3098,7 @@ }; ED9990362A69102400031B06 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 46E7849777925491E280B136 /* Pods-RudderTests-tvOS.release.xcconfig */; + baseConfigurationReference = C148B926084FFA4AD60811E1 /* Pods-RudderTests-tvOS.release.xcconfig */; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CODE_SIGN_STYLE = Automatic; @@ -3120,7 +3120,7 @@ }; ED9990432A69103B00031B06 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 047016191610999BB5D6639D /* Pods-RudderTests-iOS.debug.xcconfig */; + baseConfigurationReference = 478CD144BEBFA7832B7B2035 /* Pods-RudderTests-iOS.debug.xcconfig */; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CODE_SIGN_STYLE = Automatic; @@ -3152,7 +3152,7 @@ }; ED9990442A69103B00031B06 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 696BB56E6F38B30EA9E87E59 /* Pods-RudderTests-iOS.release.xcconfig */; + baseConfigurationReference = 72B1E09C53F0A419370FFFE4 /* Pods-RudderTests-iOS.release.xcconfig */; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CODE_SIGN_STYLE = Automatic; @@ -3184,7 +3184,7 @@ }; ED9990512A69104B00031B06 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 594C68EBA69B23ED13FCDF7D /* Pods-RudderTests-watchOS.debug.xcconfig */; + baseConfigurationReference = 5C9B965CD54B037B411A0124 /* Pods-RudderTests-watchOS.debug.xcconfig */; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CODE_SIGN_STYLE = Automatic; @@ -3206,7 +3206,7 @@ }; ED9990522A69104B00031B06 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0C12A2068DA24653A547FFC5 /* Pods-RudderTests-watchOS.release.xcconfig */; + baseConfigurationReference = 0A977578ECF172470D193554 /* Pods-RudderTests-watchOS.release.xcconfig */; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CODE_SIGN_STYLE = Automatic; diff --git a/Sources/Classes/Headers/Public/RSUtils.h b/Sources/Classes/Headers/Public/RSUtils.h index c58bf77c..9770ee47 100644 --- a/Sources/Classes/Headers/Public/RSUtils.h +++ b/Sources/Classes/Headers/Public/RSUtils.h @@ -8,6 +8,7 @@ #import #import +#import "RSMessage.h" #import "RSDBMessage.h" #import "RSServerConfigSource.h" @@ -26,17 +27,15 @@ NS_ASSUME_NONNULL_BEGIN + (NSString*) getLocale; + (NSString*) getDateString: (NSDate*) date; + (NSMutableArray *) sortArray:(NSMutableArray*) mutableArrayOfNumbers inOrder:(ORDER) order; -+ (NSString*) getStringFromDict:(NSDictionary *) dict; + (unsigned int) getUTF8LengthForDict:(NSDictionary *)message; + (unsigned int) getUTF8Length: (NSString*) message; -+ (NSDictionary*) serializeDict: (NSDictionary* _Nullable) dict; -+ (NSArray*) serializeArray: (NSArray*) array; + (int) getNumberOfBatches:(RSDBMessage*) dbMessage withFlushQueueSize: (int) queueSize; + (NSMutableArray*) getBatch:(NSMutableArray*) messageDetails withQueueSize: (int) queueSize; +(NSArray*) getArrayFromCSVString: (NSString *) csvString; -+ (NSString*) getCSVString:(NSArray*) inputStrings; -+ (NSString*) getJSONCSVString:(NSArray*) inputStrings; -+ (id _Nullable) deSerializeJSONString:(NSString*) jsonString; ++ (NSString*) getCSVStringFromArray:(NSArray*) inputStrings; ++ (id) sanitizeObject: (id) val; ++ (NSString*) serialize:(id) object; ++ (id _Nullable) deserialize:(NSString*) jsonString; + (BOOL) isValidURL:(NSURL*) url; + (NSString*) appendSlashToUrl:(NSString*) url; + (NSString* _Nullable) getBase64EncodedString:(NSString* __nonnull) inputString; @@ -46,6 +45,7 @@ NS_ASSUME_NONNULL_BEGIN + (BOOL)removeFile:(NSString *)fileName; + (BOOL) isDBMessageEmpty:(RSDBMessage*)dbMessage; + (BOOL) isEmptyString:(NSString *)value; ++ (BOOL) isInvalidNumber:(NSNumber *)number; extern unsigned int MAX_EVENT_SIZE; extern unsigned int MAX_BATCH_SIZE; diff --git a/Sources/Classes/RSCloudModeManager.m b/Sources/Classes/RSCloudModeManager.m index afc60ea4..0072f065 100644 --- a/Sources/Classes/RSCloudModeManager.m +++ b/Sources/Classes/RSCloudModeManager.m @@ -49,7 +49,7 @@ - (void) startCloudModeProcessor { if (payload != nil) { response = [strongSelf->networkManager sendNetworkRequest:payload toEndpoint:BATCH_ENDPOINT withRequestMethod:POST]; if (response.state == NETWORK_SUCCESS) { - [RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSCloudModeManager: CloudModeProcessor: Updating status as CLOUDMODEPROCESSING DONE for events (%@)",[RSUtils getCSVString:dbMessage.messageIds]]]; + [RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSCloudModeManager: CloudModeProcessor: Updating status as CLOUDMODEPROCESSING DONE for events (%@)",[RSUtils getCSVStringFromArray:dbMessage.messageIds]]]; [RSMetricsReporter report:SDKMETRICS_CM_ATTEMPT_SUCCESS forMetricType:COUNT withProperties:nil andValue:(float)dbMessage.messages.count]; [strongSelf->dbPersistentManager updateEventsWithIds:dbMessage.messageIds withStatus:CLOUD_MODE_PROCESSING_DONE]; [strongSelf->dbPersistentManager clearProcessedEventsFromDB]; diff --git a/Sources/Classes/RSContext.m b/Sources/Classes/RSContext.m index 086042e2..edab0edc 100644 --- a/Sources/Classes/RSContext.m +++ b/Sources/Classes/RSContext.m @@ -49,9 +49,8 @@ - (instancetype)initWithConfig:(RSConfig *) config { // no persisted traits, create new and persist [self createAndPersistTraits]; } else { - NSError *error; - NSDictionary *traitsDict = [NSJSONSerialization JSONObjectWithData:[traitsJson dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:&error]; - if (error == nil) { + NSDictionary *traitsDict = [RSUtils deserialize:traitsJson]; + if (traitsDict == nil) { _traits = [traitsDict mutableCopy]; _traits[@"anonymousId"] = _anonymousId; [self persistTraits]; @@ -64,9 +63,8 @@ - (instancetype)initWithConfig:(RSConfig *) config { // get saved external Ids from prefs NSString *externalIdJson = [preferenceManager getExternalIds]; if (externalIdJson != nil) { - NSError *error; - NSDictionary *externalIdDict = [NSJSONSerialization JSONObjectWithData:[externalIdJson dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:&error]; - if (error == nil) { + NSDictionary *externalIdDict = [RSUtils deserialize:externalIdJson]; + if (externalIdDict == nil) { _externalIds = [externalIdDict mutableCopy]; } } @@ -82,11 +80,11 @@ - (instancetype) initWithDict:(NSDictionary*) dict { _traits = dict[@"traits"]; _library = [[RSLibraryInfo alloc] initWithDict:dict[@"library"]]; _os = [[RSOSInfo alloc] initWithDict:dict[@"os"]]; - _screen = [[RSScreenInfo alloc] initWithDict:dict[@"screen"]]; + _screen = [[RSScreenInfo alloc] initWithDict:dict[@"screen"]]; _userAgent = dict[@"userAgent"]; _locale = dict[@"locale"]; _device = [[RSDeviceInfo alloc] initWithDict:dict[@"device"]]; - _network = [[RSNetwork alloc] initWithDict:dict[@"network"]]; + _network = [[RSNetwork alloc] initWithDict:dict[@"network"]]; _timezone = dict[@"timezone"]; _sessionId = dict[@"sessionId"]; if(dict[@"sessionStart"]) { @@ -144,8 +142,7 @@ - (void) persistTraitsOnQueue { } -(void) persistTraits { - NSData *traitsJsonData = [NSJSONSerialization dataWithJSONObject:[RSUtils serializeDict:self->_traits] options:0 error:nil]; - NSString *traitsString = [[NSString alloc] initWithData:traitsJsonData encoding:NSUTF8StringEncoding]; + NSString* traitsString = [RSUtils serialize:[self->_traits copy]]; [self->preferenceManager saveTraits:traitsString]; } @@ -215,8 +212,7 @@ - (void)persistExternalIds { dispatch_sync(queue, ^{ if (self->_externalIds != nil) { // update persistence storage - NSData *externalIdJsonData = [NSJSONSerialization dataWithJSONObject:[RSUtils serializeArray:[self->_externalIds copy]] options:0 error:nil]; - NSString *externalIdJson = [[NSString alloc] initWithData:externalIdJsonData encoding:NSUTF8StringEncoding]; + NSString *externalIdJson = [RSUtils serialize: [self->_externalIds copy]]; [self->preferenceManager saveExternalIds:externalIdJson]; } }); @@ -275,7 +271,7 @@ - (void)setConsentData:(NSArray *)deniedConsentIds { NSMutableDictionary *tempDict = [[NSMutableDictionary alloc] init]; dispatch_sync(queue, ^{ [tempDict setObject:[_app dict] forKey:@"app"]; - [tempDict setObject:[RSUtils serializeDict:_traits] forKey:@"traits"]; + [tempDict setObject:_traits forKey:@"traits"]; [tempDict setObject:[_library dict] forKey:@"library"]; [tempDict setObject:[_os dict] forKey:@"os"]; [tempDict setObject:[_screen dict] forKey:@"screen"]; diff --git a/Sources/Classes/RSDBPersistentManager.m b/Sources/Classes/RSDBPersistentManager.m index 5010164c..0f84a73e 100644 --- a/Sources/Classes/RSDBPersistentManager.m +++ b/Sources/Classes/RSDBPersistentManager.m @@ -447,7 +447,7 @@ - (void) clearOldEventsWithThreshold:(int) threshold { } - (void)clearEventsFromDB:(NSMutableArray *)messageIds { - NSString *deleteSqlString = [[NSString alloc] initWithFormat:@"DELETE FROM %@ WHERE %@ IN (%@);", TABLE_EVENTS, COL_ID, [RSUtils getCSVString:messageIds]]; + NSString *deleteSqlString = [[NSString alloc] initWithFormat:@"DELETE FROM %@ WHERE %@ IN (%@);", TABLE_EVENTS, COL_ID, [RSUtils getCSVStringFromArray:messageIds]]; [RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSDBPersistentManager: deleteEventSql: %@", deleteSqlString]]; @synchronized (self) { if([self execSQL:deleteSqlString]) { @@ -564,7 +564,7 @@ -(void) updateEventWithId:(NSNumber *) messageId withStatus:(EVENT_PROCESSING_ST } -(void) updateEventsWithIds:(NSArray*) messageIds withStatus:(EVENT_PROCESSING_STATUS) status { - NSString *messageIdsCsv = [RSUtils getCSVString:messageIds]; + NSString *messageIdsCsv = [RSUtils getCSVStringFromArray:messageIds]; if(messageIdsCsv != nil) { NSString* updateEventStatusSQL = [[NSString alloc] initWithFormat:@"UPDATE %@ SET %@ = %@ | %d WHERE %@ IN (%@);", TABLE_EVENTS, COL_STATUS, COL_STATUS, status, COL_ID, messageIdsCsv]; @synchronized (self) { diff --git a/Sources/Classes/RSDeviceModeManager.m b/Sources/Classes/RSDeviceModeManager.m index 84cb358d..c9e5ccdb 100644 --- a/Sources/Classes/RSDeviceModeManager.m +++ b/Sources/Classes/RSDeviceModeManager.m @@ -176,7 +176,7 @@ - (void) replayMessageQueue { NSArray *messageIds = dbMessage.messageIds; NSArray *messages = dbMessage.messages; for (int i=0; idbPersistentManager fetchEventsFromDB:DMT_BATCH_SIZE ForMode:DEVICEMODE]; RSTransformationRequest* request = [strongSelf __getDeviceModeTransformationRequest:dbMessage]; - NSString* payload = [RSUtils getStringFromDict:[request toDict]]; + NSString* payload = [RSUtils serialize:[request toDict]]; [RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSDeviceModeTransformationManager: TransformationProcessor: Payload: %@", payload]]; [RSLogger logInfo:[[NSString alloc] initWithFormat:@"RSDeviceModeTransformationManager: TransformationProcessor: EventCount: %lu", (unsigned long)dbMessage.messageIds.count]]; RSNetworkResponse* response = [strongSelf->networkManager sendNetworkRequest:payload toEndpoint:TRANSFORM_ENDPOINT withRequestMethod:POST]; @@ -96,7 +96,7 @@ - (void) transformationProcessor { [strongSelf completeDeviceModeEventProcessing:dbMessage]; } else { deviceModeSleepCount = 0; - id object = [RSUtils deSerializeJSONString:responsePayload]; + id object = [RSUtils deserialize:responsePayload]; if(object != nil && [object isKindOfClass:[NSDictionary class]]) { NSArray* transformedBatch = object[@"transformedBatch"]; if(transformedBatch != nil && transformedBatch.count > 0) { @@ -112,7 +112,7 @@ - (void) transformationProcessor { } } } - [RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSDeviceModeTransformationManager: TransformationProcessor: Updating status as DEVICE_MODE_PROCESSING DONE for events (%@)",[RSUtils getCSVString:dbMessage.messageIds]]]; + [RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSDeviceModeTransformationManager: TransformationProcessor: Updating status as DEVICE_MODE_PROCESSING DONE for events (%@)",[RSUtils getCSVStringFromArray:dbMessage.messageIds]]]; [strongSelf->dbPersistentManager updateEventsWithIds:dbMessage.messageIds withStatus:DEVICE_MODE_PROCESSING_DONE]; [strongSelf->dbPersistentManager clearProcessedEventsFromDB]; } @@ -135,7 +135,7 @@ - (RSTransformationRequest *) __getDeviceModeTransformationRequest:(RSDBMessage NSMutableArray* messages = dbMessage.messages; NSMutableArray* messageIds = dbMessage.messageIds; for(int i=0; i* destinationIds = [self getDestinationIdsWithTransformationsForMessage:message]; @@ -157,7 +157,7 @@ - (RSTransformationRequest *) __getDeviceModeTransformationRequest:(RSDBMessage - (void)completeDeviceModeEventProcessing:(RSDBMessage *)dbMessage { - [RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSDeviceModeTransformationManager: TransformationProcessor: Updating status as DEVICE_MODE_PROCESSING DONE for events (%@)",[RSUtils getCSVString:dbMessage.messageIds]]]; + [RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSDeviceModeTransformationManager: TransformationProcessor: Updating status as DEVICE_MODE_PROCESSING DONE for events (%@)",[RSUtils getCSVStringFromArray:dbMessage.messageIds]]]; [self->dbPersistentManager updateEventsWithIds:dbMessage.messageIds withStatus:DEVICE_MODE_PROCESSING_DONE]; [self->dbPersistentManager clearProcessedEventsFromDB]; } diff --git a/Sources/Classes/RSEventRepository.m b/Sources/Classes/RSEventRepository.m index f2e0c7e1..19602a9f 100644 --- a/Sources/Classes/RSEventRepository.m +++ b/Sources/Classes/RSEventRepository.m @@ -230,15 +230,19 @@ - (void) dump:(RSMessage *)message { message = [self applyConsents:message]; [self applySession:message withUserSession:userSession andRudderConfig:config]; - NSData *jsonData = [NSJSONSerialization dataWithJSONObject:[message dict] options:0 error:nil]; - NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; - [RSLogger logDebug:[[NSString alloc] initWithFormat:@"dump: %@", jsonString]]; + NSString * jsonString = [RSUtils serialize: [message dict]]; + if(jsonString == nil) { + [RSLogger logError:@"dump: Event is not a valid JSON object, discarding the event"]; + return; + } + unsigned int messageSize = [RSUtils getUTF8Length:jsonString]; if (messageSize > MAX_EVENT_SIZE) { [RSLogger logError:[NSString stringWithFormat:@"dump: Event size exceeds the maximum permitted event size(%iu)", MAX_EVENT_SIZE]]; [RSMetricsReporter report:SDKMETRICS_EVENTS_DISCARDED forMetricType:COUNT withProperties:@{SDKMETRICS_TYPE: SDKMETRICS_MSG_SIZE_INVALID} andValue:1]; return; } + [RSLogger logDebug:[[NSString alloc] initWithFormat:@"dump: %@", jsonString]]; NSNumber* rowId = [self->dbpersistenceManager saveEvent:jsonString]; [self->deviceModeManager makeFactoryDump: message FromHistory:NO withRowId:rowId]; } diff --git a/Sources/Classes/RSMessage.m b/Sources/Classes/RSMessage.m index 9e6eed80..01609061 100644 --- a/Sources/Classes/RSMessage.m +++ b/Sources/Classes/RSMessage.m @@ -79,18 +79,18 @@ - (instancetype) initWithDict: (NSDictionary*) dict { [tempDict setValue:_groupId forKey:@"groupId"]; } if (_traits != nil) { - [tempDict setValue:[RSUtils serializeDict:_traits] forKey:@"traits"]; + [tempDict setValue:_traits forKey:@"traits"]; } [tempDict setValue:_anonymousId forKey:@"anonymousId"]; if (_userId != nil) { [tempDict setValue:_userId forKey:@"userId"]; } if (_properties != nil) { - [tempDict setValue:[RSUtils serializeDict:_properties] forKey:@"properties"]; + [tempDict setValue: _properties forKey:@"properties"]; } [tempDict setValue:_event forKey:@"event"]; if (_userProperties != nil) { - [tempDict setValue:[RSUtils serializeDict:_userProperties] forKey:@"userProperties"]; + [tempDict setValue:_userProperties forKey:@"userProperties"]; } [tempDict setValue:_integrations forKey:@"integrations"]; diff --git a/Sources/Classes/RSNetwork.m b/Sources/Classes/RSNetwork.m index 244edf9d..830a0843 100644 --- a/Sources/Classes/RSNetwork.m +++ b/Sources/Classes/RSNetwork.m @@ -78,7 +78,7 @@ - (instancetype) initWithDict:(NSDictionary*) dict { @synchronized (tempDict) { tempDict = [[NSMutableDictionary alloc] init]; if(_carrier.count !=0) { - [tempDict setValue:[RSUtils getCSVString:_carrier] forKey:@"carrier"]; + [tempDict setValue:[RSUtils getCSVStringFromArray:_carrier] forKey:@"carrier"]; } #if !TARGET_OS_WATCH [tempDict setValue:[NSNumber numberWithBool:_wifi] forKey:@"wifi"]; diff --git a/Sources/Classes/RSPreferenceManager.m b/Sources/Classes/RSPreferenceManager.m index aa448d91..640ffb3f 100644 --- a/Sources/Classes/RSPreferenceManager.m +++ b/Sources/Classes/RSPreferenceManager.m @@ -141,11 +141,10 @@ - (void)clearAnonymousId { - (void) clearAnonymousIdFromTraits { NSString* traitsStr = [self getTraits]; - NSError *error; - NSMutableDictionary* traitsDict = [NSJSONSerialization JSONObjectWithData:[traitsStr dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:&error]; - if(error == nil && traitsDict != nil) { + NSMutableDictionary* traitsDict = [RSUtils deserialize:traitsStr]; + if(traitsDict != nil) { [traitsDict removeObjectForKey:@"anonymousId"]; - NSString* finalTraitsStr = [RSUtils getStringFromDict:traitsDict]; + NSString* finalTraitsStr = [RSUtils serialize:traitsDict]; [self saveTraits:finalTraitsStr]; } } @@ -286,9 +285,8 @@ - (RSServerConfigSource * __nullable)getServerSourceConfig { if (configStr == nil) { return nil; } - NSError *error; - NSDictionary *configDict = [NSJSONSerialization JSONObjectWithData:[configStr dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:&error]; - if (error == nil && configDict != nil) { + NSDictionary *configDict = [RSUtils deserialize:configStr]; + if (configDict != nil) { RSServerConfigSource *config = [[RSServerConfigSource alloc] initWithConfigDict:configDict]; return config; } diff --git a/Sources/Classes/RSServerConfigManager.m b/Sources/Classes/RSServerConfigManager.m index 2ba3b3f7..ad6e9fe2 100644 --- a/Sources/Classes/RSServerConfigManager.m +++ b/Sources/Classes/RSServerConfigManager.m @@ -66,11 +66,10 @@ - (RSServerConfigSource* _Nullable) _retrieveConfig { } - (RSServerConfigSource *_Nullable)_parseConfig:(NSString *)configStr { - NSError *error; - NSDictionary *configDict = [NSJSONSerialization JSONObjectWithData:[configStr dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:&error]; + NSDictionary *configDict = [RSUtils deserialize:configStr]; RSServerConfigSource *source; - if (error == nil && configDict != nil) { + if (configDict != nil) { source = [[RSServerConfigSource alloc] initWithConfigDict:configDict]; for (RSServerDestination *destination in source.destinations) { if (destination.shouldApplyDeviceModeTransformation) { diff --git a/Sources/Classes/RSUtils.m b/Sources/Classes/RSUtils.m index fdb4781a..8352a813 100644 --- a/Sources/Classes/RSUtils.m +++ b/Sources/Classes/RSUtils.m @@ -25,18 +25,16 @@ + (NSString*) getDateString:(NSDate *)date { return [dateFormatter stringFromDate:date]; } -+ (NSString*) getStringFromDict:(NSDictionary *) dict { - NSData *dictData = [NSJSONSerialization dataWithJSONObject:dict options:0 error:nil]; - if(dictData == nil) - return @""; - NSString *dictString = [[NSString alloc] initWithData:dictData encoding:NSUTF8StringEncoding]; - return dictString; -} - + (NSString *)getTimestamp { return [self getDateString:[[NSDate alloc] init]]; } +// returns number of seconds elapsed since 1970 ++ (long) getTimeStampLong{ + NSDate *date = [[NSDate alloc] init]; + return [date timeIntervalSince1970]; +} + + (NSString *)getFilePath:(NSString *)fileName { #if TARGET_OS_TV NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); @@ -57,11 +55,6 @@ + (BOOL)removeFile:(NSString *)fileName { return [[NSFileManager defaultManager] removeItemAtPath:path error:nil]; } -// returns number of seconds elapsed since 1970 -+ (long) getTimeStampLong{ - NSDate *date = [[NSDate alloc] init]; - return [date timeIntervalSince1970]; -} + (NSString *) getUniqueId { NSUUID *uuid = [NSUUID UUID]; @@ -79,7 +72,7 @@ + (NSString*) getLocale { } + (unsigned int) getUTF8LengthForDict:(NSDictionary *)message { - NSString* msgString = [self getStringFromDict:message]; + NSString* msgString = [self serialize:message]; if(msgString == nil) return 0; return [self getUTF8Length:msgString]; @@ -89,96 +82,20 @@ + (unsigned int) getUTF8Length:(NSString *)message { return (unsigned int)[[message dataUsingEncoding:NSUTF8StringEncoding] length]; } -+ (id) serializeValue: (id) val { - if ([val isKindOfClass:[NSString class]] || - [val isKindOfClass:[NSNumber class]] || - [val isKindOfClass:[NSNull class]] - ) { - return val; - } else if ([val isKindOfClass:[NSArray class]]) { - // handle array - NSMutableArray *array = [[NSMutableArray alloc] init]; - for (id i in val) { - [array addObject:[self serializeValue:i]]; - } - return [array copy]; - } else if ([val isKindOfClass:[NSDictionary class]] || - [val isKindOfClass:[NSMutableDictionary class]] - ) { - // handle dictionary - NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; - NSArray *keys = [val allKeys]; - for (NSString *key in keys) { - id value = [val objectForKey:key]; - if (![key isKindOfClass:[NSString class]]) { - [RSLogger logDebug:@"key should be string. changing it to its description"]; - } - [dict setValue:[self serializeValue:value] forKey:[key description]]; - } - return [dict copy]; - } else if ([val isKindOfClass:[NSDate class]]) { - // handle date // isofy - return [self getDateString:val]; - } else if ([val isKindOfClass:[NSURL class]]) { - // handle url - return [val absoluteString]; - } - [RSLogger logDebug:@"properties value is not serializable. using description"]; - return [val description]; -} - + (NSArray *) sortArray:(NSMutableArray*) arrayOfNumbers inOrder:(ORDER) order { NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"self" ascending:order == ASCENDING]; [arrayOfNumbers sortUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]]; return [arrayOfNumbers copy]; } -+ (NSDictionary *)serializeDict:(NSDictionary*)dict { - // if dict is not null - if (dict) { - NSMutableDictionary *returnDict = [[NSMutableDictionary alloc] initWithCapacity:dict.count]; - NSArray *keys = [dict allKeys]; - for (NSString* key in keys) { - id val = [self serializeValue: [dict objectForKey:key]]; - [returnDict setValue:val forKey:key]; - } - - return [returnDict copy]; - } - return dict; -} - -+ (NSArray*) serializeArray:(NSArray*) array { - if (array) { - NSMutableArray *returnArray = [[NSMutableArray alloc] init]; - for (id i in array) { - [returnArray addObject:[self serializeValue:i]]; - } - return [returnArray copy]; - } - return array; -} - +(NSArray*) getArrayFromCSVString: (NSString *) csvString { return [csvString componentsSeparatedByString:@","]; } -+(NSString*) getCSVString:(NSArray*) inputStrings { ++(NSString*) getCSVStringFromArray:(NSArray*) inputStrings { return [inputStrings componentsJoinedByString:@","]; } -+(NSString*) getJSONCSVString:(NSArray*) inputStrings { - NSMutableString *JSONCSVString = [[NSMutableString alloc] init]; - for (int index = 0; index < inputStrings.count; index++) { - [JSONCSVString appendFormat:@"\"%@\"", inputStrings[index]]; - if (index != inputStrings.count -1) { - [JSONCSVString appendString:@","]; - } - } - return [JSONCSVString copy]; -} - - + (int) getNumberOfBatches:(RSDBMessage*) dbMessage withFlushQueueSize: (int) queueSize { int messageCount = (int)dbMessage.messageIds.count; if (messageCount % queueSize == 0) { @@ -195,17 +112,6 @@ + (NSArray*) getBatch:(NSArray*) messageDetails withQueueSize: (int) queueSize { return [[NSMutableArray alloc] initWithArray:[messageDetails subarrayWithRange:NSMakeRange(0, queueSize)]]; } -+ (id _Nullable) deSerializeJSONString:(NSString*) jsonString { - NSError *error = nil; - NSData* data = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; - id object = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; - if(error) { - [RSLogger logError:[[NSString alloc] initWithFormat:@"Failed to serialize the given string back to object %@", jsonString]]; - return nil; - } - return object; -} - + (BOOL) isValidURL:(NSURL*) url { return url && [url scheme] && [url host]; } @@ -252,6 +158,93 @@ + (BOOL) isEmptyString:(NSString*)value { return (value == nil || value.length == 0); } ++ (NSString*) serialize:(id) object { + @try { + id sanitizedObject = [self sanitizeObject:object]; + NSData *objectData = [NSJSONSerialization dataWithJSONObject:sanitizedObject options:0 error:nil]; + NSString *objectString = [[NSString alloc] initWithData:objectData encoding:NSUTF8StringEncoding]; + return objectString; + } @catch (NSException *exception) { + [RSLogger logError:@"RSUtils: serialize: Input dict is not a valid JSON object"]; + } + return nil; +} + ++ (id _Nullable) deserialize:(NSString*) jsonString { + @try { + NSError *error = nil; + NSData* data = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + id object = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; + if(error) { + [RSLogger logError:[[NSString alloc] initWithFormat:@"RSUtils: deserialize: Failed to de-serialize the given string back to an object %@", jsonString]]; + return nil; + } + return object; + } @catch (NSException *exception) { + [RSLogger logError:[[NSString alloc] initWithFormat:@"RSUtils: deserialize: Failed to de-serialize the given string back to an object %@", jsonString]]; + } + return nil; +} + +// will stringify NSDate, NSURL Objects, invalid numbers (INFINITY, -INFINITY, NAN) to strings to ensure serialization doesn't fails ++ (id) sanitizeObject: (id) val { + // return immediately if the object is valid + if([NSJSONSerialization isValidJSONObject:val]) { + return val; + } + + // if the object is invalid, sanitize it + if ([val isKindOfClass:[NSString class]] || [val isKindOfClass:[NSNull class]]) { + return val; + } else if ([val isKindOfClass:[NSNumber class]]) { + // convert invalid numbers to strings + if ([self isInvalidNumber:(NSNumber *) val]) { + return [((NSNumber *) val) stringValue]; + } + return val; + } else if ([val isKindOfClass:[NSDate class]]) { + // handle date // isofy + return [self getDateString:val]; + } else if ([val isKindOfClass:[NSURL class]]) { + // handle url + return [val absoluteString]; + } else if ([val isKindOfClass:[NSArray class]]) { + // handle array + return [self sanitizeArray:val]; + } else if ([val isKindOfClass:[NSDictionary class]] || [val isKindOfClass:[NSMutableDictionary class]]) { + // handle dictionary + return [self sanitizeDictionary:val]; + } + [RSLogger logDebug:@"properties value is not serializable. using description"]; + return [val description]; +} + ++ (NSMutableDictionary *)sanitizeDictionary:(id)val { + NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; + NSArray *keys = [val allKeys]; + for (NSString *key in keys) { + id value = [val objectForKey:key]; + if (![key isKindOfClass:[NSString class]]) { + [RSLogger logDebug:@"key should be string. changing it to its description"]; + } + [dict setValue:[self sanitizeObject:value] forKey:[key description]]; + } + return dict; +} + ++ (id)sanitizeArray:(id)val { + NSMutableArray *array = [[NSMutableArray alloc] init]; + for (id i in val) { + [array addObject:[self sanitizeObject:i]]; + } + return [array copy]; +} + ++ (BOOL) isInvalidNumber:(NSNumber *)number { + return ([number isEqualToNumber:[NSDecimalNumber notANumber]] + || isinf([number doubleValue])); +} + unsigned int MAX_EVENT_SIZE = 32 * 1024; // 32 KB unsigned int MAX_BATCH_SIZE = 500 * 1024; // 500 KB diff --git a/Tests/RudderUtilsTest.swift b/Tests/RudderUtilsTest.swift index 4b6dae8b..a88198b5 100644 --- a/Tests/RudderUtilsTest.swift +++ b/Tests/RudderUtilsTest.swift @@ -11,20 +11,13 @@ import Rudder class RudderUtilsTest: XCTestCase { - override func setUpWithError() throws { - - } - - override func tearDownWithError() throws { - } - func testGetCSVString() throws { let bio:[String] = ["Desu","Mobile Engineer", "RudderStack"] - let bioCSV = RSUtils.getCSVString(bio) + let bioCSV = RSUtils.getCSVString(from: bio) print(bioCSV) XCTAssert(bioCSV == "Desu,Mobile Engineer,RudderStack") let carriers:[String] = ["Airtel"] - let carriersCSV = RSUtils.getCSVString(carriers) + let carriersCSV = RSUtils.getCSVString(from: carriers) print(carriersCSV) XCTAssertEqual(carriersCSV, "Airtel") @@ -32,7 +25,7 @@ class RudderUtilsTest: XCTestCase { func testGetJSONCSVString() throws { let bio:[String] = ["Desu","Mobile Engineer", "RudderStack"] - let bioJSONCSV = RSUtils.getJSONCSVString(bio) + let bioJSONCSV = RSUtils.getCSVString(from: bio) print(bioJSONCSV == "\"Desu\",\"Mobile Engineer\",\"RudderStack\"") } @@ -65,7 +58,7 @@ class RudderUtilsTest: XCTestCase { "company" : "RudderStack", "city" : "Hyderabad"] - let response = RSUtils.deSerializeJSONString(jsonString) + let response = RSUtils.deserialize(jsonString) let parsedDict:[String:String]? = response as? [String:String] ?? nil XCTAssert(parsedDict == dictObj) @@ -77,4 +70,278 @@ class RudderUtilsTest: XCTestCase { XCTAssertEqual(RSUtils.sortArray(NSMutableArray(array:numsArr), in: ASCENDING), NSMutableArray(array:[2,3,5,6,12])) XCTAssertEqual(RSUtils.sortArray(NSMutableArray(array:numsArr), in: DESCENDING), NSMutableArray(array:[12,6,5,3,2])) } + + func testSanitizeDictionary() { + let dirtyDict: [String:Any] = [ + "infinity": Double.infinity, + "nan": Double.nan, + "negativeInfinity": -Double.infinity, + "max": Double.greatestFiniteMagnitude, + "min": Double.leastNormalMagnitude, + "normal": 1.0, + "zero": 0.0, + "negativeNormal": -1.0, + "general": 35, + "date": Date(), + "url": URL(string: "https://www.rudderstack.com")! + ] + + if let cleanDict = RSUtils.sanitizeObject(dirtyDict) as? [String:Any] { + XCTAssertTrue(cleanDict["infinity"] is String) + XCTAssertEqual(cleanDict["infinity"] as? String, "inf") + XCTAssertTrue(cleanDict["negativeInfinity"] is String) + XCTAssertEqual(cleanDict["negativeInfinity"] as? String, "-inf") + XCTAssertTrue(cleanDict["nan"] is String) + XCTAssertEqual(cleanDict["nan"] as? String, "nan") + XCTAssertTrue(cleanDict["date"] is String) + XCTAssertTrue(cleanDict["url"] is String) + XCTAssertEqual(cleanDict["url"] as? String, "https://www.rudderstack.com") + XCTAssertTrue(cleanDict["max"] is Double) + XCTAssertEqual(cleanDict["max"] as? Double, Double.greatestFiniteMagnitude) + XCTAssertTrue(cleanDict["min"] is Double) + XCTAssertEqual(cleanDict["min"] as? Double, Double.leastNormalMagnitude) + XCTAssertTrue(cleanDict["normal"] is Double) + XCTAssertEqual(cleanDict["normal"] as? Double, 1.0) + XCTAssertTrue(cleanDict["zero"] is Double) + XCTAssertEqual(cleanDict["zero"] as? Double, 0.0) + XCTAssertTrue(cleanDict["negativeNormal"] is Double) + XCTAssertEqual(cleanDict["negativeNormal"] as? Double, -1.0) + XCTAssertTrue(cleanDict["general"] is Int) + XCTAssertEqual(cleanDict["general"] as? Int, 35) + } else { + XCTFail("Clean Dict shouldn't be nil") + } + } + + func testSanitizeArray() { + let dirtyArray: [Any] = [ + Double.infinity, + Double.nan, + -Double.infinity, + Double.greatestFiniteMagnitude, + Double.leastNormalMagnitude, + 1.0, + 0.0, + -1.0, + 35, + Date(), + URL(string: "https://www.rudderstack.com")! + ] + + if let cleanArray = RSUtils.sanitizeObject(dirtyArray) as? [Any] { + XCTAssertTrue(cleanArray[0] is String) + XCTAssertEqual(cleanArray[0] as? String, "inf") + XCTAssertTrue(cleanArray[1] is String) + XCTAssertEqual(cleanArray[1] as? String, "nan") + XCTAssertTrue(cleanArray[2] is String) + XCTAssertEqual(cleanArray[2] as? String, "-inf") + XCTAssertTrue(cleanArray[3] is Double) + XCTAssertEqual(cleanArray[3] as? Double, Double.greatestFiniteMagnitude) + XCTAssertTrue(cleanArray[4] is Double) + XCTAssertEqual(cleanArray[4] as? Double, Double.leastNormalMagnitude) + XCTAssertTrue(cleanArray[5] is Double) + XCTAssertEqual(cleanArray[5] as? Double, 1.0) + XCTAssertTrue(cleanArray[6] is Double) + XCTAssertEqual(cleanArray[6] as? Double, 0.0) + XCTAssertTrue(cleanArray[7] is Double) + XCTAssertEqual(cleanArray[7] as? Double, -1.0) + XCTAssertTrue(cleanArray[8] is Int) + XCTAssertEqual(cleanArray[8] as? Int, 35) + XCTAssertTrue(cleanArray[9] is String) + XCTAssertTrue(cleanArray[10] is String) + XCTAssertEqual(cleanArray[10] as? String, "https://www.rudderstack.com") + } else { + XCTFail("Clean Array shouldn't be nil") + } + } + + func testSanitizeNestedDictionary() { + let dirtyDict: [String:Any] = [ + "date": Date(), + "url": URL(string: "https://www.rudderstack.com")!, + "nestedDict": [ + "infinity": Double.infinity, + "nan": Double.nan, + "negativeInfinity": -Double.infinity, + "max": Double.greatestFiniteMagnitude, + ], + "nestedArray": [ + Double.infinity, + Double.nan, + Double.greatestFiniteMagnitude, + [ + "date": Date(), + "url": URL(string: "https://www.rudderstack.com")!, + ] + ] + ] + + if let cleanDict = RSUtils.sanitizeObject(dirtyDict) as? [String:Any] { + XCTAssertTrue(cleanDict["date"] is String) + XCTAssertTrue(cleanDict["url"] is String) + XCTAssertEqual(cleanDict["url"] as? String, "https://www.rudderstack.com") + XCTAssertTrue(cleanDict["nestedDict"] is [String:Any]) + if let nestedDict = cleanDict["nestedDict"] as? [String:Any] { + XCTAssertTrue(nestedDict["infinity"] is String) + XCTAssertEqual(nestedDict["infinity"] as? String, "inf") + XCTAssertTrue(nestedDict["negativeInfinity"] is String) + XCTAssertEqual(nestedDict["negativeInfinity"] as? String, "-inf") + XCTAssertTrue(nestedDict["nan"] is String) + XCTAssertEqual(nestedDict["nan"] as? String, "nan") + XCTAssertTrue(nestedDict["max"] is Double) + XCTAssertEqual(nestedDict["max"] as? Double, Double.greatestFiniteMagnitude) + } else { + XCTFail("Nested Dict shouldn't be nil") + } + XCTAssertTrue(cleanDict["nestedArray"] is [Any]) + if let nestedArray = cleanDict["nestedArray"] as? [Any] { + XCTAssertTrue(nestedArray[0] is String) + XCTAssertEqual(nestedArray[0] as? String, "inf") + XCTAssertTrue(nestedArray[1] is String) + XCTAssertEqual(nestedArray[1] as? String, "nan") + XCTAssertTrue(nestedArray[2] is Double) + XCTAssertEqual(nestedArray[2] as? Double, Double.greatestFiniteMagnitude) + XCTAssertTrue(nestedArray[3] is [String:Any]) + if let nestedDict = nestedArray[3] as? [String:Any] { + XCTAssertTrue(nestedDict["date"] is String) + XCTAssertTrue(nestedDict["url"] is String) + XCTAssertEqual(nestedDict["url"] as? String, "https://www.rudderstack.com") + } else { + XCTFail("Nested Dict shouldn't be nil") + } + } else { + XCTFail("Nested Array shouldn't be nil") + } + } + } + + func testSanitizeNestedArray() { + let dirtyArray: [Any] = [ + Double.infinity, + Double.nan, + -Double.infinity, + Double.greatestFiniteMagnitude, + Double.leastNormalMagnitude, + 1.0, + 0.0, + -1.0, + 35, + Date(), + URL(string: "https://www.rudderstack.com")!, + [ + "date": Date(), + "url": URL(string: "https://www.rudderstack.com")!, + "nestedDict": [ + "infinity": Double.infinity, + "nan": Double.nan, + "negativeInfinity": -Double.infinity, + "max": Double.greatestFiniteMagnitude, + ], + "nestedArray": [ + Double.infinity, + Double.nan, + Double.greatestFiniteMagnitude, + [ + "date": Date(), + "url": URL(string: "https://www.rudderstack.com")!, + ] + ] + ] + ] + + if let cleanArray = RSUtils.sanitizeObject(dirtyArray) as? [Any] { + XCTAssertTrue(cleanArray[0] is String) + XCTAssertEqual(cleanArray[0] as? String, "inf") + XCTAssertTrue(cleanArray[1] is String) + XCTAssertEqual(cleanArray[1] as? String, "nan") + XCTAssertTrue(cleanArray[2] is String) + XCTAssertEqual(cleanArray[2] as? String, "-inf") + XCTAssertTrue(cleanArray[3] is Double) + XCTAssertEqual(cleanArray[3] as? Double, Double.greatestFiniteMagnitude) + XCTAssertTrue(cleanArray[4] is Double) + XCTAssertEqual(cleanArray[4] as? Double, Double.leastNormalMagnitude) + XCTAssertTrue(cleanArray[5] is Double) + XCTAssertEqual(cleanArray[5] as? Double, 1.0) + XCTAssertTrue(cleanArray[6] is Double) + XCTAssertEqual(cleanArray[6] as? Double, 0.0) + XCTAssertTrue(cleanArray[7] is Double) + XCTAssertEqual(cleanArray[7] as? Double, -1.0) + XCTAssertTrue(cleanArray[8] is Int) + XCTAssertEqual(cleanArray[8] as? Int, 35) + XCTAssertTrue(cleanArray[9] is String) + XCTAssertTrue(cleanArray[10] is String) + XCTAssertEqual(cleanArray[10] as? String, "https://www.rudderstack.com") + XCTAssertTrue(cleanArray[11] is [String:Any]) + if let nestedDict = cleanArray[11] as? [String:Any] { + XCTAssertTrue(nestedDict["date"] is String) + XCTAssertTrue(nestedDict["url"] is String) + XCTAssertEqual(nestedDict["url"] as? String, "https://www.rudderstack.com") + XCTAssertTrue(nestedDict["nestedDict"] is [String:Any]) + if let nestedDict = nestedDict["nestedDict"] as? [String:Any] { + XCTAssertTrue(nestedDict["infinity"] is String) + XCTAssertEqual(nestedDict["infinity"] as? String, "inf") + XCTAssertTrue(nestedDict["negativeInfinity"] is String) + XCTAssertEqual(nestedDict["negativeInfinity"] as? String, "-inf") + XCTAssertTrue(nestedDict["nan"] is String) + XCTAssertEqual(nestedDict["nan"] as? String, "nan") + XCTAssertTrue(nestedDict["max"] is Double) + XCTAssertEqual(nestedDict["max"] as? Double, Double.greatestFiniteMagnitude) + } else { + XCTFail("Nested Dict shouldn't be nil") + } + XCTAssertTrue(nestedDict["nestedArray"] is [Any]) + if let nestedArray = nestedDict["nestedArray"] as? [Any] { + XCTAssertTrue(nestedArray[0] is String) + XCTAssertEqual(nestedArray[0] as? String, "inf") + XCTAssertTrue(nestedArray[1] is String) + XCTAssertEqual(nestedArray[1] as? String, "nan") + XCTAssertTrue(nestedArray[2] is Double) + XCTAssertEqual(nestedArray[2] as? Double, Double.greatestFiniteMagnitude) + XCTAssertTrue(nestedArray[3] is [String:Any]) + if let nestedDict = nestedArray[3] as? [String:Any] { + XCTAssertTrue(nestedDict["date"] is String) + XCTAssertTrue(nestedDict["url"] is String) + XCTAssertEqual(nestedDict["url"] as? String, "https://www.rudderstack.com") + } else { + XCTFail("Nested Dict shouldn't be nil") + } + } else { + XCTFail("Nested Array shouldn't be nil") + } + } else { + XCTFail("Nested Dict shouldn't be nil") + } + } + } + + func testIsInvalidNumber() { + XCTAssertTrue(RSUtils.isInvalidNumber(Double.infinity as NSNumber)) + XCTAssertTrue(RSUtils.isInvalidNumber(Double.nan as NSNumber)) + XCTAssertTrue(RSUtils.isInvalidNumber(-Double.infinity as NSNumber)) + XCTAssertFalse(RSUtils.isInvalidNumber(Double.greatestFiniteMagnitude as NSNumber)) + XCTAssertFalse(RSUtils.isInvalidNumber(Double.leastNormalMagnitude as NSNumber)) + XCTAssertFalse(RSUtils.isInvalidNumber(1.0)) + XCTAssertFalse(RSUtils.isInvalidNumber(0.0)) + XCTAssertFalse(RSUtils.isInvalidNumber(-1.0)) + XCTAssertFalse(RSUtils.isInvalidNumber(35)) + } + + func testSerialize() { + let dictObj : [String:Any] = [ + "name" : "Desu Sai Venkat", + "company" : "RudderStack", + "date": Date(), + "infinity": Double.infinity, + "url": URL(string: "https://www.rudderstack.com")!, + "nan": Double.nan, + "city" : "Hyderabad"] + let jsonString = RSUtils.serialize(dictObj) + print(jsonString) + XCTAssertNotNil(jsonString) + // ensure that url, nan, date are sanitized in the string + XCTAssertTrue(jsonString.contains("rudderstack.com")) + XCTAssertTrue(jsonString.contains("nan")) + XCTAssertTrue(jsonString.contains("date")) + XCTAssertTrue(jsonString.contains("inf")) + } }