Skip to content

Commit

Permalink
feat: add openAppsByMe func.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Dec 5, 2024
1 parent 659fb46 commit beb70b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ List {

Button("More Apps by Me") {
MyAppList.openURL(url: URL(string: MyAppList.appsByMe)!)
// or
MyAppList.openAppsByMe()
}
```

Expand Down
5 changes: 5 additions & 0 deletions Sources/MyAppListKit/MyAppListKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,17 @@ public struct MyAppList {
}
#endif
}

public static func openURL(string: String) {
if let url = URL(string: string) {
openURL(url: url)
}
}

public static func openAppsByMe() {
openURL(string: appsByMe)
}

public static var appsByMe: String {
#if os(macOS)
"macappstore://apps.apple.com/developer/id1714265259"
Expand Down

0 comments on commit beb70b9

Please sign in to comment.