Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more explicit about what URL.init we want to map to in RollbarReport #358

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Unreleased

- Be more explicit about overloaded usage of `URL.init` that cannot be resolved in certain configurations when using the Rollbar React Native SDK.
- Updated Cocoapods examples to use the latest SDK version, 3.3.2.

### 3.3.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct BinaryImage: RawRepresentable {
init(rawValue: Report.Map) {
self.rawValue = rawValue

self.path = rawValue[any: "name"].flatMap(URL.init) ?? URL(string: "/")!
self.path = rawValue[any: "name"].flatMap(URL.init(string:)) ?? URL(string: "/")!
self.uuid = rawValue[any: "uuid"].flatMap(UUID.init) ?? .empty
self.version = (
major: rawValue[any: "major_version", default: 0],
Expand Down
2 changes: 1 addition & 1 deletion RollbarNotifier/Sources/RollbarReport/Report/Report.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ extension Report {
var bundleIdentifier: String? { self[any: "CFBundleIdentifier"] }
var bundleVersion: String? { self[any: "CFBundleVersion"] }
var bundleShortVersion: String? { self[any: "CFBundleShortVersionString"] }
var bundleExecutablePath: URL? { self[any: "CFBundleExecutablePath"].flatMap(URL.init) }
var bundleExecutablePath: URL? { self[any: "CFBundleExecutablePath"].flatMap(URL.init(string:)) }

var processName: String { self[any: "process_name", default: "unknown"] }
var processId: Int? { self[any: "process_id"] }
Expand Down