gpt4 book ai didi

ios - Swift - 评分应用

转载 作者:行者123 更新时间:2023-11-28 17:56:15 27 4
gpt4 key购买 nike

我正在尝试在我的 iOS 应用程序上添加一个 Rate App 按钮,我通过尝试不同的方法在网上到处查看,但都没有奏效。

这是我尝试过的

1.

let appId = 1040912970
@IBAction func btnRateApp(sender: UIButton) {
let url = "itunes.apple.com/app/id\(appId)"
UIApplication.sharedApplication().openURL(NSURL(string: url)!)
}

2.

let appId = 1040912970
@IBAction func btnRateApp(sender: UIButton) {
let urlString = "http://itunes.apple.com/app/id\(appId)?mt=8"
let url = NSURL(string: urlString)
UIApplication.sharedApplication().openURL(url!)
}

3.

@IBAction func btnRateApp(sender: UIButton) {
UIApplication.sharedApplication().openURL(NSURL(string: url)!)
UIApplication.sharedApplication().openURL(NSURL(string:"https://itunes.apple.com/us/app/wsw-song-chants/id1040912970?ls=1&mt=8")!);
}

4.

@IBAction func btnRateApp(sender: UIButton) {
UIApplication.sharedApplication().openURL(NSURL(string : "itms-apps://itunes.apple.com/app/id1040912970")!);
}

当执行上述操作并单击按钮时,输出控制台上会显示一条消息

ERROR: There is no registered handler for URL scheme itms-apps Message from debugger: Terminated due to signal 15

我还检查了 iTunes 连接上显示的我的应用程序 ID 是否正确。

最佳答案

首先,您必须使用 store-kit 才能真正获得应用内评分。

其次检查iRate GitHub Page

这是一个非常普遍的需求,这个库会处理它。

关于ios - Swift - 评分应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33004940/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com