iOS |如何以编程方式打开谷歌类应用程序

标签 ios swift xcode google-classroom ios-urlsheme

我想通过我现有的 iOS 应用程序点击按钮打开谷歌类应用程序(如果类应用程序在设备上可用)。

google classroom 有 URL scheme 吗?

我没有在 URL 上找到任何 Google Classroom 应用 URL Scheme: https://gist.github.com/bartleby/6588aa4782dfb3f1d50c23ce9a4554e3 https://ios.gadgethacks.com/news/always-updated-list-ios-app-url-scheme-names-0184033/

LSApplicationWorkspace 是一个私有(private) API,所以我不能使用它。

我可以打开 Google Classroom 应用程序的 AppStore 链接并从那里打开该应用程序,但我正在寻找一种直接方法,例如(URL 方案、捆绑标识符等)。

提前致谢!

最佳答案

如果您的 iPhone 上安装了类应用程序,则在 Safari 中打开您的类类(class) URL,它将打开您的类应用程序,否则 safari 将为您提供在 AppStore 上查看应用程序的选项。

UIApplication.shared.open(URL(string: "your_url_str")!, options: [:], completionHandler: nil)

确保将登录 ID 号替换为实际的电子邮件 ID。

Ex: 
https://classroom.google.com/u/<EMAIL_ID HAVING COURSE ACCESS>/w/<Course Id>/t/all

虚拟网址:

https://classroom.google.com/u/demo@gmail.com/w/nbmbms8709s/t/all

关于iOS |如何以编程方式打开谷歌类应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58236124/

相关文章:

iphone - 密码强度库 - Objective C

security - 如何加密/解密核心数据中的数据?

ios - AFNetworking setImageWithURLRequest 不更新 UIImageView

ios - 无法将类型 'to_do_list.AddItemViewController' (0x1009f3970) 的值转换为 'to_do_list.ListDetailViewController' (0x1009f3850)

ios - 如何更改 iPad 的导航项字体大小?

ios - Xcode 将 iOS 应用归档为 Mac 应用

iOS Build 在 Xcode 中运行良好,但 Appcenter.ms 失败

ios - 圆形 UITableViewCell 仅底部或顶部角,但它不适用于 Swift iOS 10

ios - CNContact 获取联系人并将其导入 App 的示例

ios - 自定义 Moya 插件