ios - iOS | 如何以编程方式打开谷歌课堂应用程序
问题描述
我想通过我现有的 iOS 应用程序单击按钮打开谷歌课堂应用程序(如果设备上提供课堂应用程序)。
谷歌教室的任何 URL 方案?
我没有在 URL 上找到任何 Google Classroom 应用程序 URL 方案: https ://gist.github.com/bartleby/6588aa4782dfb3f1d50c23ce9a4554e3 https://ios.gadgethacks.com/news/always-updated-list-ios-app-url -方案名称-0184033/
LSApplicationWorkspace 是一个私有 API,所以我不能使用它。
我可以打开 Google Classroom 应用程序的 AppStore 链接并从那里打开应用程序,但我正在寻找一种直接的方法,例如(URL Scheme、Bundle Identifier 等)。
提前致谢!
解决方案
如果您的 iPhone 上安装了课堂应用程序,则在 Safari 中打开您的 Classroom 课程 URL,它将打开您的 Classroom 应用程序,否则 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
推荐阅读
- java - 如何在 Kotlin 中自定义 CalendarView?
- r - R proc.time - for 循环中的奇怪行为
- python - 如何通过python从矩阵中删除上述元素
- python - 如何在字典中执行字符串格式化?
- spring-boot - 记录器拦截器未在 Spring Boot 安全项目中调用
- amazon-web-services - Prestosql/Amazon Athena:时区更改
- time-series - 从输入数据中选择输出数据的时间序列或文本回归模型
- windows - 在 Windows 上安全地读取内存
- android - 在android中延迟一段时间后如何使用后台服务和调用xml布局
- scala - Scala语言关键字可通过导入解锁?为什么?他们是否被弃用,气馁?