Skip to content

Commit

Permalink
chore: rm StatsigInternalObjC (#291)
Browse files Browse the repository at this point in the history
ErrorBoundary has never been hit since it was implemented because Swift
doesn't support try/catch.

The StatsigInternalObjC has lead to issues with peoples build systems
and is providing no value, so I am removing it.
  • Loading branch information
daniel-statsig authored Aug 6, 2024
1 parent ee0c395 commit 55cace5
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 382 deletions.
10 changes: 1 addition & 9 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,9 @@ let package = Package(
targets: [
.target(
name: "Statsig",
dependencies: [.target(name: "StatsigInternalObjC")],
dependencies: [],
path: "Sources/Statsig"
),
.target(name: "StatsigInternalObjC",
path: "Sources/StatsigInternalObjC",
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("."),
.headerSearchPath("Private"),
]
),
.testTarget(
name: "StatsigTests",
dependencies: ["Statsig", "Quick", "Nimble", "OHHTTPStubs", .product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs")]
Expand Down
6 changes: 1 addition & 5 deletions Sources/Statsig/NetworkService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,7 @@ class NetworkService {
taskCapture: taskCapture
)
} else {
Statsig.errorBoundary.capture("sendRequest:response") {
completion(responseData, response, error)
} withRecovery: {
completion(nil, nil, StatsigError.unexpectedError("Response Handling"))
}
completion(responseData, response, error)
}
}

Expand Down
10 changes: 0 additions & 10 deletions Sources/Statsig/SDKKeyValidator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ class SDKKeyValidator {
return true
}

let exception = NSException(
name: NSExceptionName("StatsigSDKKeyMismatchError"),
reason: "The SDK key provided does not match the one used to generate values.", userInfo: nil
)

Statsig.errorBoundary.logException(
"SDKKeyValidator",
exception: exception
)

return false
}
}
Loading

0 comments on commit 55cace5

Please sign in to comment.