Skip to content

Commit

Permalink
Be more explicit about what URL.init we want to map to (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
matux authored Oct 25, 2024
1 parent 9b2217e commit ff72e5f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
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

0 comments on commit ff72e5f

Please sign in to comment.