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!
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/demo#gmail.com/w/nbmbms8709s/t/all
Related
I used to have a UIButton that would load an URL in the form of itms://example.com this when pressed would load the relevant item within the AppStore application on iOS (rather than in the browser).
However that is no longer working for me. If I switch the URL to https:// then the relevant page opens in the browser but if I use itms or itms-apps then it does nothing. Any ideas why or if there’s a new way of doing this?
The use case is to refer people from one app to download another from the AppStore.
Using the http link should open directly into App Store app via universal links.
// open Google Earth in the app store
UIApplication.shared.open(URL(string: "http://itunes.apple.com/us/app/google-earth/id293622097?mt=8")!, options: [:], completionHandler: nil)
If you wish to keep the experience inside of your app, then use SKStoreProductViewController as pointed out by rmaddy
Scenario is user will get a link to his email. If user clicks on the link, If app is already installed, app should open and if app is not installed it should redirect to app store.
I've seen deeplinks implementation, but I believe it needs some more implementation in backend too. Can any one help on this?
Redirect to application if installed, otherwise to App Store
gone through this. Is there any better way?
added gif for one more scenario:
in the below gif, from email to app it navigates directly? how?
I'm assuming the link you want to pass by email is an https link. If that's the case, for iOS to be able to redirect it to your app, you'll need to implement universal links. This implementation requires you to register the domain you want to respond to on your entitlements file and add an apple-app-site-association file to your backend. This way Apple can verify the domain you're trying to respond to is really yours.
As a result, when the app gets installed, it can be invoked by your domain links via deeplinking.
Now when there's no installed app able to respond to a specific https domain link, the system will simply open it on a web browser. Consequently, you cannot force iOS to open such links on AppStore directly. What you can do is to check whether the running device is iOS when your website gets accessed and ask the system to show your app on AppStore.
And to request iOS to launch AppStore from a website you can use itms-apps:
const iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
if (iOS) {
// Just replace `https://` with `itms://` on your app's AppStore link.
window.location.href = "itms://itunes.apple.com/us/app/google-maps-transit-food/id585027354?mt=8";
}
// In this example I'm redirecting to Google Maps app page on AppStore.
Note: This is just a simple example used to demonstrate the concept. For a real application, you may want to use a device detection library for browsers, like mobile-detect.js
My suggestion is check iOS version
here Example
let url = URL(string: "www.stackoverflow.com")!
if #available(iOS 10.0, *) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
} else {
UIApplication.shared.openURL(url)
}
I have an application in the Apple app store that streams a live radio station and provides a list of tracks that have been played. The user can navigate to specific track in that list, tap a Spotify button and the user is directed into Spotify via Deeplinking, using the Spotify search route (example below):
spotify://search/artistName
This feature was working great (about 85% accuracy search on artist name) until recently. Spotify opens, but I receive a native alert:
Couldn't Open Link
Spotify can't open this type of link on this device.
Did the search route change?
Did Spotify disable this feature?
Removing the // from the URL works for me: spotify:search:artistName. Example in Swift:
UIApplication.shared.open(URL(string: "spotify:search:pink+floyd")!, options: [:], completionHandler: nil)
I am trying to integrate More Apps button inside my app. When user press this, I want to navigate to App Store and open my developer's app page. Expecting to work iOS 8 and above. If anyone did this before, please give me solution. Thank you in advance.
This can be done by simply having the app open a link. Now this link depends on your developer account. I cannot tell you what your link will be. However, it will look something link this:
https://itunes.apple.com/us/developer/id(some id here)
Note that the id is NOT your developer team ID. I really don't know what this id is. You can find it by navigating to one of your apps on the website version of the App Store called iTunes Preview. Simply go to google and search up one of your app's names like so:
AppName by Muzammil
Once you have opened this page, you will see the link "more by this developer". Click this, and copy the link of that page. Then you can just have your app open that link to show your list of apps on the App Store.
Here is the code to open a link just in case your need it:
let yourDeveloperURL = URL(string: "https://itunes.apple.com/us/developer/id(some id here)")!
UIApplication.shared.open(yourDeveloperURL, options: [:], completionHandler: nil)
Hope this helps!
What I want to do is,
We have having one product info on Website.
That product is available on store.
what we have on website is that, Product info and one button for that product.
I want to take two actions on that button.
When User opens website on iPad or iPhone on Safari (browser) and click on GetProduct button, then following two actions must be taken place.
1. If user is already having product installed on device then directly open the app in device.
2. If user is not having the app on device then link user to the app on store, so he can download from there.
I already handled second condition,
but how to handle the first condition.
If I am already having the app then how to open it on action of button click in browser.
You can achieve what you're asking for by using a URL scheme. This will enable you to call the openUrl: method with your application's url scheme which will then launch your app.
Here's how you setup a custom url scheme:
Open your app's Info.plist and add a row with a key called URL Types.
Expand the URL Types item, and Item 0 under it and you'll see URL Identifier
Enter your app's bundle identifier (e.g. com.myCompany.myApp) as the URL Identifier value.
Add another row to Item 0 and enter URL Schemes.
Expand the URL Schemes and under Item 0 type in the name for your custom scheme (e.g. myScheme).
You should now be able to open your app from Safari by typing myScheme:// in the address bar.
Alternatively, from your app, you can launch the other app like this:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"myScheme://"]];
Note that you can also send parameters to the app you're launching with the url scheme (more on that here).
With iOS9 Apple introduced a way to open installed app from Links. Here is the official link for this : Apple universal links