将应用商店启动到特定的应用列表
Launch app store to a specific app listing
我的应用要求用户安装 Apple Pages。如果没有安装,我会启动应用商店让他们安装页面。有什么我可以附加到 "com.apple.AppStore" 捆绑包 ID 以使其在应用程序商店页面列表中打开。
这是网页 url 应用商店中的 Pages
https://apps.apple.com/us/app/pages/id409201541?mt=12
if let appStoreURL = NSWorkspace.shared.urlForApplication(withBundleIdentifier: "com.apple.AppStore") {
NSWorkspace.shared.open(appStoreURL)
}
@IBAction func itunesClicked(_ sender: NSButton) {
let access = "macappstore://itunes.apple.com/app/id"
let appIdee = "409201541"
let more = "?mt=12"
let str: String = access + appIdee + more
if let urlStr = URL(string: str) {
NSWorkspace.shared.open(urlStr)
}
}
如果您想post评论...
@IBAction func itunesClicked(_ sender: NSButton) {
let access = "macappstore://itunes.apple.com/app/id"
let appIdee = "409201541"
let more = "?action=write-review&mt=8"
let str: String = access + appIdee + more
if let urlStr = URL(string: str) {
NSWorkspace.shared.open(urlStr)
}
}
我的应用要求用户安装 Apple Pages。如果没有安装,我会启动应用商店让他们安装页面。有什么我可以附加到 "com.apple.AppStore" 捆绑包 ID 以使其在应用程序商店页面列表中打开。
这是网页 url 应用商店中的 Pages https://apps.apple.com/us/app/pages/id409201541?mt=12
if let appStoreURL = NSWorkspace.shared.urlForApplication(withBundleIdentifier: "com.apple.AppStore") {
NSWorkspace.shared.open(appStoreURL)
}
@IBAction func itunesClicked(_ sender: NSButton) {
let access = "macappstore://itunes.apple.com/app/id"
let appIdee = "409201541"
let more = "?mt=12"
let str: String = access + appIdee + more
if let urlStr = URL(string: str) {
NSWorkspace.shared.open(urlStr)
}
}
如果您想post评论...
@IBAction func itunesClicked(_ sender: NSButton) {
let access = "macappstore://itunes.apple.com/app/id"
let appIdee = "409201541"
let more = "?action=write-review&mt=8"
let str: String = access + appIdee + more
if let urlStr = URL(string: str) {
NSWorkspace.shared.open(urlStr)
}
}