Skip to content

Commit

Permalink
Merge pull request #115 from vtourraine/fix-macos-open-url
Browse files Browse the repository at this point in the history
Fix open URL on macOS with SwiftUI
  • Loading branch information
vtourraine authored Jan 18, 2024
2 parents c24c4a7 + e3b6dca commit c4842fb
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 c4842fb

Please sign in to comment.