简体   繁体   English

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

[英]iOS | how to open google classroom app programmatically

I want to open google classroom app through my existing iOS app on a button click (if classroom app available on the device).我想通过我现有的 iOS 应用程序单击按钮打开谷歌课堂应用程序(如果设备上提供课堂应用程序)。

Any URL scheme for google classroom?任何适用于谷歌教室的 URL 方案?

I haven't found any Google Classroom app URL Scheme on URLs: https://gist.github.com/bartleby/6588aa4782dfb3f1d50c23ce9a4554e3 https://ios.gadgethacks.com/news/always-updated-list-ios-app-url-scheme-names-0184033/ I haven't found any Google Classroom app URL Scheme on URLs: https://gist.github.com/bartleby/6588aa4782dfb3f1d50c23ce9a4554e3 https://ios.gadgethacks.com/news/always-updated-list-ios-app-url -方案名称-0184033/

LSApplicationWorkspace is a private API, so I cannot use it. LSApplicationWorkspace 是私有的 API,所以我不能使用它。

I can open the AppStore link for Google Classroom app and open the app from there but I am looking for a direct method like (URL Scheme, Bundle Identifier, etc).我可以打开 Google Classroom 应用程序的 AppStore 链接并从那里打开应用程序,但我正在寻找一种直接的方法,例如(URL Scheme、Bundle Identifier 等)。

Thanks in advance!提前致谢!

Open your Classroom course URL in Safari if the classroom app is installed on your iPhone it will open your Classroom app else safari will give you an option to View App on AppStore.在 Safari 中打开您的课堂课程 URL 如果您的 iPhone 上安装了课堂应用程序,它将打开您的课堂应用程序,否则 safari 将为您提供在 AppStore 上查看应用程序的选项。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM