我有一个Share-Extension,我想将用户重定向到主应用程序。这是我尝试过的:
let signInAction = UIAlertAction(title: "Anmelden", style: .default) { (alert) in
let myAppUrl = NSURL(string: "open://")!
self.extensionContext?.open(myAppUrl as URL, completionHandler: { (success) in
if (!success) {
// let the user know it failed
print("fail!")
}
})
}和我的info-plist:

现在它正在打印“失败!”。我在这里做错了什么?
发布于 2020-07-10 04:03:19
在xcode中查看您的项目设置。您是否在应用程序目标的" url -Types“设置中设置了自定义URL方案?
https://stackoverflow.com/questions/62819915
复制相似问题