Skip to content

Commit

Permalink
refactor: Port NSArray+MPCaseInsensitive to Swift
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonStalnaker committed Oct 7, 2024
1 parent 7828fed commit 270c050
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 43 deletions.
24 changes: 9 additions & 15 deletions mParticle-Apple-SDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@
53A79BC929CDFB2000E7489F /* MPIUserDefaults.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79B0429CDFB1F00E7489F /* MPIUserDefaults.h */; };
53A79BCA29CDFB2000E7489F /* MPConvertJS.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A79B0529CDFB1F00E7489F /* MPConvertJS.m */; };
53A79BCB29CDFB2000E7489F /* MPStateMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79B0629CDFB1F00E7489F /* MPStateMachine.h */; };
53A79BCC29CDFB2000E7489F /* NSArray+MPCaseInsensitive.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A79B0729CDFB1F00E7489F /* NSArray+MPCaseInsensitive.m */; };
53A79BCE29CDFB2000E7489F /* NSDictionary+MPCaseInsensitive.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A79B0929CDFB1F00E7489F /* NSDictionary+MPCaseInsensitive.m */; };
53A79BCF29CDFB2000E7489F /* MPResponseEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A79B0A29CDFB1F00E7489F /* MPResponseEvents.m */; };
53A79BD129CDFB2000E7489F /* MPResponseConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79B0C29CDFB1F00E7489F /* MPResponseConfig.h */; };
Expand Down Expand Up @@ -245,7 +244,6 @@
53A79C5329CDFB4800E7489F /* MPIdentityApi.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C3129CDFB4800E7489F /* MPIdentityApi.h */; settings = {ATTRIBUTES = (Public, ); }; };
53A79C5529CDFB4800E7489F /* NSDictionary+MPCaseInsensitive.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C3329CDFB4800E7489F /* NSDictionary+MPCaseInsensitive.h */; settings = {ATTRIBUTES = (Public, ); }; };
53A79C5629CDFB4800E7489F /* MParticleUser.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C3429CDFB4800E7489F /* MParticleUser.h */; settings = {ATTRIBUTES = (Public, ); }; };
53A79C5729CDFB4800E7489F /* NSArray+MPCaseInsensitive.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C3529CDFB4800E7489F /* NSArray+MPCaseInsensitive.h */; settings = {ATTRIBUTES = (Public, ); }; };
53A79C5829CDFB4800E7489F /* MPCommerceEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C3629CDFB4800E7489F /* MPCommerceEvent.h */; settings = {ATTRIBUTES = (Public, ); }; };
53A79C5929CDFB4800E7489F /* MPAliasResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C3729CDFB4800E7489F /* MPAliasResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
53A79C5B29CDFB4800E7489F /* MPIdentityApiRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C3929CDFB4800E7489F /* MPIdentityApiRequest.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -335,7 +333,6 @@
53A79D0B29CE23F700E7489F /* MPProduct.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C4329CDFB4800E7489F /* MPProduct.h */; settings = {ATTRIBUTES = (Public, ); }; };
53A79D0C29CE23F700E7489F /* MPExtensionProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C2829CDFB4800E7489F /* MPExtensionProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
53A79D0D29CE23F700E7489F /* MPIdentityApiRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C3929CDFB4800E7489F /* MPIdentityApiRequest.h */; settings = {ATTRIBUTES = (Public, ); }; };
53A79D0E29CE23F700E7489F /* NSArray+MPCaseInsensitive.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C3529CDFB4800E7489F /* NSArray+MPCaseInsensitive.h */; settings = {ATTRIBUTES = (Public, ); }; };
53A79D0F29CE23F700E7489F /* MPForwardRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C2529CDFB4800E7489F /* MPForwardRecord.h */; settings = {ATTRIBUTES = (Public, ); }; };
53A79D1029CE23F700E7489F /* FilteredMParticleUser.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C2929CDFB4800E7489F /* FilteredMParticleUser.h */; settings = {ATTRIBUTES = (Public, ); }; };
53A79D1129CE23F700E7489F /* MPCommerceEvent+Dictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A79C3F29CDFB4800E7489F /* MPCommerceEvent+Dictionary.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -442,7 +439,6 @@
53A79D8229CE23F700E7489F /* MPCommerceEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 53A79B4029CDFB1F00E7489F /* MPCommerceEvent.mm */; };
53A79D8329CE23F700E7489F /* MPConsentSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A79AF729CDFB1F00E7489F /* MPConsentSerialization.m */; };
53A79D8429CE23F700E7489F /* MPIdentityApi.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A79AA129CDFB1E00E7489F /* MPIdentityApi.m */; };
53A79D8529CE23F700E7489F /* NSArray+MPCaseInsensitive.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A79B0729CDFB1F00E7489F /* NSArray+MPCaseInsensitive.m */; };
53A79D8629CE23F700E7489F /* MPUpload.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A79AC929CDFB1E00E7489F /* MPUpload.m */; };
53A79D8729CE23F700E7489F /* MPAppDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A79B3B29CDFB1F00E7489F /* MPAppDelegateProxy.m */; };
53A79D8829CE23F700E7489F /* MPApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A79B0D29CDFB1F00E7489F /* MPApplication.m */; };
Expand Down Expand Up @@ -502,6 +498,8 @@
53FDD1BD2AE871AF003D5FA1 /* MPIHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53FDD1BC2AE871AF003D5FA1 /* MPIHasher.swift */; };
53FDD1BE2AE871AF003D5FA1 /* MPIHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53FDD1BC2AE871AF003D5FA1 /* MPIHasher.swift */; };
D3724C192AE02AF60074CD67 /* mParticle_Apple_SDK_NoLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = D3724C182AE02AF60074CD67 /* mParticle_Apple_SDK_NoLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
D3961CD62CB468DC003B3194 /* NSArray+MPCaseInsensitive.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3961CD52CB468DC003B3194 /* NSArray+MPCaseInsensitive.swift */; };
D3961CD72CB468DC003B3194 /* NSArray+MPCaseInsensitive.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3961CD52CB468DC003B3194 /* NSArray+MPCaseInsensitive.swift */; };
D3B3E2072AE029AE001AB58C /* mParticle_Apple_SDK.h in Headers */ = {isa = PBXBuildFile; fileRef = D3B3E2062AE028EC001AB58C /* mParticle_Apple_SDK.h */; settings = {ATTRIBUTES = (Public, ); }; };
D3CEDAB92C9B14BF001B32DF /* MPCCPAConsent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDAB82C9B14BF001B32DF /* MPCCPAConsent.swift */; };
D3CEDABA2C9B14BF001B32DF /* MPCCPAConsent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDAB82C9B14BF001B32DF /* MPCCPAConsent.swift */; };
Expand All @@ -511,12 +509,12 @@
D3CEDABF2C9C5B5B001B32DF /* MPGDPRConsent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDABD2C9C5B5B001B32DF /* MPGDPRConsent.swift */; };
D3CEDAC02C9C5B5B001B32DF /* MPGDPRConsent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDABD2C9C5B5B001B32DF /* MPGDPRConsent.swift */; };
D3CEDAC12C9C5B5B001B32DF /* MPGDPRConsent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDABD2C9C5B5B001B32DF /* MPGDPRConsent.swift */; };
D3CEDAC82CA2F214001B32DF /* MPLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDAC72CA2F214001B32DF /* MPLogger.swift */; };
D3CEDAC92CA2F214001B32DF /* MPLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDAC72CA2F214001B32DF /* MPLogger.swift */; };
D3CEDAC32C9DAC25001B32DF /* MPDateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDAC22C9DAC25001B32DF /* MPDateFormatter.swift */; };
D3CEDAC42C9DB0E0001B32DF /* MPDateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDAC22C9DAC25001B32DF /* MPDateFormatter.swift */; };
D3CEDAC52C9DB0E0001B32DF /* MPDateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDAC22C9DAC25001B32DF /* MPDateFormatter.swift */; };
D3CEDAC62C9DB0E1001B32DF /* MPDateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDAC22C9DAC25001B32DF /* MPDateFormatter.swift */; };
D3CEDAC82CA2F214001B32DF /* MPLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDAC72CA2F214001B32DF /* MPLogger.swift */; };
D3CEDAC92CA2F214001B32DF /* MPLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3CEDAC72CA2F214001B32DF /* MPLogger.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -609,7 +607,6 @@
53A79B0429CDFB1F00E7489F /* MPIUserDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPIUserDefaults.h; sourceTree = "<group>"; };
53A79B0529CDFB1F00E7489F /* MPConvertJS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPConvertJS.m; sourceTree = "<group>"; };
53A79B0629CDFB1F00E7489F /* MPStateMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStateMachine.h; sourceTree = "<group>"; };
53A79B0729CDFB1F00E7489F /* NSArray+MPCaseInsensitive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+MPCaseInsensitive.m"; sourceTree = "<group>"; };
53A79B0929CDFB1F00E7489F /* NSDictionary+MPCaseInsensitive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+MPCaseInsensitive.m"; sourceTree = "<group>"; };
53A79B0A29CDFB1F00E7489F /* MPResponseEvents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPResponseEvents.m; sourceTree = "<group>"; };
53A79B0C29CDFB1F00E7489F /* MPResponseConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPResponseConfig.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -704,7 +701,6 @@
53A79C3129CDFB4800E7489F /* MPIdentityApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPIdentityApi.h; sourceTree = "<group>"; };
53A79C3329CDFB4800E7489F /* NSDictionary+MPCaseInsensitive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+MPCaseInsensitive.h"; sourceTree = "<group>"; };
53A79C3429CDFB4800E7489F /* MParticleUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MParticleUser.h; sourceTree = "<group>"; };
53A79C3529CDFB4800E7489F /* NSArray+MPCaseInsensitive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+MPCaseInsensitive.h"; sourceTree = "<group>"; };
53A79C3629CDFB4800E7489F /* MPCommerceEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCommerceEvent.h; sourceTree = "<group>"; };
53A79C3729CDFB4800E7489F /* MPAliasResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAliasResponse.h; sourceTree = "<group>"; };
53A79C3929CDFB4800E7489F /* MPIdentityApiRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPIdentityApiRequest.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -800,12 +796,13 @@
53B33E892A4606CD00CC8A19 /* MPSideloadedKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPSideloadedKit.swift; sourceTree = "<group>"; };
53FDD1BC2AE871AF003D5FA1 /* MPIHasher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPIHasher.swift; sourceTree = "<group>"; };
D3724C182AE02AF60074CD67 /* mParticle_Apple_SDK_NoLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mParticle_Apple_SDK_NoLocation.h; sourceTree = "<group>"; };
D3961CD52CB468DC003B3194 /* NSArray+MPCaseInsensitive.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSArray+MPCaseInsensitive.swift"; sourceTree = "<group>"; };
D3B3E2062AE028EC001AB58C /* mParticle_Apple_SDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mParticle_Apple_SDK.h; sourceTree = "<group>"; };
D3BA75152B614E3D008C3C65 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
D3CEDAB82C9B14BF001B32DF /* MPCCPAConsent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MPCCPAConsent.swift; sourceTree = "<group>"; };
D3CEDABD2C9C5B5B001B32DF /* MPGDPRConsent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPGDPRConsent.swift; sourceTree = "<group>"; };
D3CEDAC72CA2F214001B32DF /* MPLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPLogger.swift; sourceTree = "<group>"; };
D3CEDAC22C9DAC25001B32DF /* MPDateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPDateFormatter.swift; sourceTree = "<group>"; };
D3CEDAC72CA2F214001B32DF /* MPLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPLogger.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -1023,11 +1020,11 @@
children = (
5399DDB72CA727E1006526E1 /* MPZip.swift */,
53A79B0229CDFB1F00E7489F /* MPMessageBuilder.m */,
D3961CD52CB468DC003B3194 /* NSArray+MPCaseInsensitive.swift */,
53A79B0329CDFB1F00E7489F /* MPStateMachine.m */,
53A79B0429CDFB1F00E7489F /* MPIUserDefaults.h */,
53A79B0529CDFB1F00E7489F /* MPConvertJS.m */,
53A79B0629CDFB1F00E7489F /* MPStateMachine.h */,
53A79B0729CDFB1F00E7489F /* NSArray+MPCaseInsensitive.m */,
53A79B0929CDFB1F00E7489F /* NSDictionary+MPCaseInsensitive.m */,
53A79B0A29CDFB1F00E7489F /* MPResponseEvents.m */,
53A79B0C29CDFB1F00E7489F /* MPResponseConfig.h */,
Expand Down Expand Up @@ -1189,7 +1186,6 @@
53A79C3129CDFB4800E7489F /* MPIdentityApi.h */,
53A79C3329CDFB4800E7489F /* NSDictionary+MPCaseInsensitive.h */,
53A79C3429CDFB4800E7489F /* MParticleUser.h */,
53A79C3529CDFB4800E7489F /* NSArray+MPCaseInsensitive.h */,
53A79C3629CDFB4800E7489F /* MPCommerceEvent.h */,
53A79C3729CDFB4800E7489F /* MPAliasResponse.h */,
53A79C3929CDFB4800E7489F /* MPIdentityApiRequest.h */,
Expand Down Expand Up @@ -1332,7 +1328,6 @@
53A79C6529CDFB4800E7489F /* MPProduct.h in Headers */,
53A79C4A29CDFB4800E7489F /* MPExtensionProtocol.h in Headers */,
53A79C5B29CDFB4800E7489F /* MPIdentityApiRequest.h in Headers */,
53A79C5729CDFB4800E7489F /* NSArray+MPCaseInsensitive.h in Headers */,
53A79C4729CDFB4800E7489F /* MPForwardRecord.h in Headers */,
53A79C4B29CDFB4800E7489F /* FilteredMParticleUser.h in Headers */,
53A79C6129CDFB4800E7489F /* MPCommerceEvent+Dictionary.h in Headers */,
Expand Down Expand Up @@ -1434,7 +1429,6 @@
53A79D0B29CE23F700E7489F /* MPProduct.h in Headers */,
53A79D0C29CE23F700E7489F /* MPExtensionProtocol.h in Headers */,
53A79D0D29CE23F700E7489F /* MPIdentityApiRequest.h in Headers */,
53A79D0E29CE23F700E7489F /* NSArray+MPCaseInsensitive.h in Headers */,
53A79D0F29CE23F700E7489F /* MPForwardRecord.h in Headers */,
53A79D1029CE23F700E7489F /* FilteredMParticleUser.h in Headers */,
53A79D1129CE23F700E7489F /* MPCommerceEvent+Dictionary.h in Headers */,
Expand Down Expand Up @@ -1761,6 +1755,7 @@
53A79BEB29CDFB2000E7489F /* NSNumber+MPFormatter.swift in Sources */,
53A79B6D29CDFB2000E7489F /* FilteredMParticleUser.m in Sources */,
53A79C0729CDFB2100E7489F /* MPBaseEvent.m in Sources */,
D3961CD62CB468DC003B3194 /* NSArray+MPCaseInsensitive.swift in Sources */,
53A79C1829CDFB2100E7489F /* MPAttributeProjection.m in Sources */,
53A79B8E29CDFB2000E7489F /* MPConsumerInfo.m in Sources */,
53A79C0D29CDFB2100E7489F /* MPKitConfiguration.mm in Sources */,
Expand All @@ -1776,7 +1771,6 @@
53A79C0129CDFB2100E7489F /* MPCommerceEvent.mm in Sources */,
53A79BBF29CDFB2000E7489F /* MPConsentSerialization.m in Sources */,
53A79B6F29CDFB2000E7489F /* MPIdentityApi.m in Sources */,
53A79BCC29CDFB2000E7489F /* NSArray+MPCaseInsensitive.m in Sources */,
53A79B9329CDFB2000E7489F /* MPUpload.m in Sources */,
53A79BFD29CDFB2100E7489F /* MPAppDelegateProxy.m in Sources */,
D3CEDAB92C9B14BF001B32DF /* MPCCPAConsent.swift in Sources */,
Expand Down Expand Up @@ -1930,6 +1924,7 @@
53A79D7329CE23F700E7489F /* FilteredMParticleUser.m in Sources */,
53A79D7429CE23F700E7489F /* MPBaseEvent.m in Sources */,
53A79D7529CE23F700E7489F /* MPAttributeProjection.m in Sources */,
D3961CD72CB468DC003B3194 /* NSArray+MPCaseInsensitive.swift in Sources */,
53A79D7629CE23F700E7489F /* MPConsumerInfo.m in Sources */,
53A79D7729CE23F700E7489F /* MPKitConfiguration.mm in Sources */,
53A79D7829CE23F700E7489F /* MPConsentState.m in Sources */,
Expand All @@ -1945,7 +1940,6 @@
53A79D8229CE23F700E7489F /* MPCommerceEvent.mm in Sources */,
53A79D8329CE23F700E7489F /* MPConsentSerialization.m in Sources */,
53A79D8429CE23F700E7489F /* MPIdentityApi.m in Sources */,
53A79D8529CE23F700E7489F /* NSArray+MPCaseInsensitive.m in Sources */,
53A79D8629CE23F700E7489F /* MPUpload.m in Sources */,
53A79D8729CE23F700E7489F /* MPAppDelegateProxy.m in Sources */,
D3CEDABA2C9B14BF001B32DF /* MPCCPAConsent.swift in Sources */,
Expand Down
7 changes: 0 additions & 7 deletions mParticle-Apple-SDK/Include/NSArray+MPCaseInsensitive.h

This file was deleted.

1 change: 0 additions & 1 deletion mParticle-Apple-SDK/Include/mParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#import "MPPromotion.h"
#import "MPTransactionAttributes.h"
#import "MPTransactionAttributes+Dictionary.h"
#import "NSArray+MPCaseInsensitive.h"
#import "NSDictionary+MPCaseInsensitive.h"
#import "MPIdentityApi.h"
#import "MPKitAPI.h"
Expand Down
1 change: 0 additions & 1 deletion mParticle-Apple-SDK/Kits/MPKitContainer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#import "MPProduct.h"
#import "MPProduct+Dictionary.h"
#import "NSDictionary+MPCaseInsensitive.h"
#import "NSArray+MPCaseInsensitive.h"
#import "MPIUserDefaults.h"
#import "MPConsumerInfo.h"
#import "MPForwardQueueItem.h"
Expand Down
19 changes: 0 additions & 19 deletions mParticle-Apple-SDK/Utils/NSArray+MPCaseInsensitive.m

This file was deleted.

25 changes: 25 additions & 0 deletions mParticle-Apple-SDK/Utils/NSArray+MPCaseInsensitive.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// NSArray+MPCaseInsensitive.swift
// mParticle-Apple-SDK
//
// Created by Brandon Stalnaker on 10/7/24.
//

import Foundation

extension NSArray {

@objc public func caseInsensitiveContainsObject(_ object: String) -> Bool {
var result = false
self.forEach {obj in
if let stringObj = obj as? String {
if (stringObj.caseInsensitiveCompare(object) == ComparisonResult.orderedSame) {
result = true
return
}
}
}

return result;
}
}

0 comments on commit 270c050

Please sign in to comment.