iOS | how to open google classroom app programmatically

508 Views Asked by At

I want to open google classroom app through my existing iOS app on a button click (if classroom app available on the device).

Any URL scheme for google classroom?

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/

LSApplicationWorkspace is a private API, so I cannot use it.

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).

Thanks in advance!

1

There are 1 best solutions below

0
On

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.

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

Make sure you replace the login ID number with the actual email id.

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

Dummy Url:

https://classroom.google.com/u/[email protected]/w/nbmbms8709s/t/all