我正在尝试找到一种使用
snapchat://
方案打开 snapchat 的方法,以便我可以将链接传递到共享屏幕(参见附图),但我总是收到“出了问题”警报。
这是我尝试过的:
let shareString = "snapchat://text=\(text)&url=https://www.google.com"
let escapedShareString = shareString.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
let shareString = "snapchat://url=https://www.google.com"
let escapedShareString = shareString.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
let shareString = "snapchat://text=https://www.google.com"
let escapedShareString = shareString.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
我认为
snapchat://share?url=uriEncodeURLHere
应该有效