Skip to content

Commit

Permalink
Fix open URL on macOS with SwiftUI #114
Browse files Browse the repository at this point in the history
  • Loading branch information
vtourraine committed Jan 9, 2024
1 parent aa992c2 commit e3b6dca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Add `GitHubAPI` to get licenses from GitHub API
- Update `AcknowListViewController` to get missing licenses from GitHub API, with new `canFetchLicenseFromGitHub` property to disable this behavior
- Fix open URL on macOS with SwiftUI


## 3.0.1 (24 November 2022)
Expand Down
4 changes: 3 additions & 1 deletion Sources/AcknowList/AcknowListSwiftUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ public struct AcknowListRowSwiftUIView: View {
else if let repository = acknowledgement.repository,
canOpenRepository(for: repository) {
Button(action: {
#if os(iOS)
#if os(macOS)
NSWorkspace.shared.open(repository)
#elseif os(iOS)
UIApplication.shared.open(repository)
#endif
}) {
Expand Down

0 comments on commit e3b6dca

Please sign in to comment.