gpt4 book ai didi

ios - 如何在 CXAnswerCallAction 之后推送 View Controller

转载 作者:行者123 更新时间:2023-11-30 11:39:40 24 4
gpt4 key购买 nike

一旦用户使用 CallKit 接听电话,我就会尝试显示特定的 View Controller 。目前,在 CXAnswerCallAction 中我尝试使用:

if UIApplication.shared.canOpenURL(URL(string: "URLgoesHERE://")!) {
UIApplication.shared.openURL(URL(字符串: "URLgoesHERE://")!)
}//替换我的问题的 URL 架构

但我收到以下错误:

URL 失败:“URLgoesHERE://” - 错误:“此应用程序不允许查询方案 URLgoesHERE”

还有其他想法吗?

最佳答案

您是否将 URL 方案添加到 info.plist 内的 LSApplicationQueriesSchemes 键中?

LSApplicationQueriesSchemes (Array - iOS) Specifies the URL schemes you want the app to be able to use with the canOpenURL: method of the UIApplication class. For each URL scheme you want your app to use with the canOpenURL: method, add it as a string in this array. Read the canOpenURL: method description for important information about declaring supported schemes and using that method.

来源:https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW14

关于ios - 如何在 CXAnswerCallAction 之后推送 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49394548/

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