Apple maps can open routing apps when it can't provide a route:
I want to open a few of those apps from my app. I am aware that I have to whitelist each app that I want to open. This is not the problem.
How can I find out the url schemes of those Apps that are installed on my iPhone?
One idea is to make a backup via iTunes and at the info.plist of the app.
In this plist, the url schemes should be defined with the cfbundleurlschemes key.
I think I found such an app in a backup, but I don't know how to extract the file to get the info.plist file. adding .zip and extracting doesn't work.
Other ways to get the URL scheme are also welcome, especially ways to get example parameters of the URL scheme of an app. So looking at Apple Maps how it opens a specific routing app would be nice.
Yes I know how to open Google Maps. I want to know how to open those where I can't find a documentation.
So how can I find out URL schemes of routing apps on my iPhone?
There is an answer that suggests to extract the .ipa file, but there aren't .ipa files with iOSA 11 any more.
This article was incredibly helpful:
https://www.amerhukic.com/finding-the-custom-url-scheme-of-an-ios-app
Basically:
Download the app to your phone
Install the program iMazing on your mac
Connect your phone to your mac
Download the ipa file from your phone to your mac
Then
Make the ipa file a zip (rename) and extract
Show the package content from the .app file in the Payload folder
Search and open the Info.plist file
Search for CFBundleURLSchemes. Here are your url schemes.
The way I do it. Download the app "Iconical". It's an app used to create other icons to access an app. Once installed, tap "Select App" then hit refresh and you get a list of urls of all the apps with a url Scheme set up.
If the app I want is not in the list. Than I open the iPhone console, go to the AppStore, find the app and open it from there. Then look for its bundle identifier in the iPhone console and use the last part as url scheme.
Ex.: com.cie.appName. This always worked for me. Hope this helps.
UIApplication.shared.open("appName://", options: [:], completionHandler: nil)
Get yourself a copy of the "enterprise" version of iTunes that lets you download .ipa files direct from the App Store. (Mentioned, for example, here.) Now you can open the .ipa and examine its components.
You can find URL scheme of any app in device Console if you connect your device to your computer and open the app. SpringBoard logs a lot of actions to the console, showing URL scheme every time.
e.g.
URL scheme for Firefox: org.mozilla.ios.Firefox
default 15:34:38.460964 +0100 SpringBoard [org.mozilla.ios.Firefox] Setting badge to (null) [ old badge: (null) ]
I am providing a feed which is consumed by both desktop and mobile apps which contains links to images, users, and tags on Instagram. When these links are clicked on iOS, I want them to open in the Instagram app.
Currently if I have a link like this:
https://www.instagram.com/p/BK8f1rigadE/
If I click it in iOS, the Instagram app does open, just briefly. It then seems to launch Safari to the page, which includes an "open in app" link to open it back up in the app. That link uses the "instagram://" protocol to trigger the app to open. I'm aware of that method, but that's not what I'm after.
I'm on iOS 10 with the latest Instagram app. I feel like this used to work, so I'm wondering if it's just a bug in iOS or Instagram that will be fixed eventually.
Links to twitter.com open properly in the Twitter app... that's the kind of behavior I'm after.
I found a service called URL Genius (via this blog post) that solves this exact problem, and provides click metrics, too.
I don't like relying on an external service for such an important link, but it's easy, works well, and the basic service is free. I will probably set a reminder for myself to check that this still works every month or so...
Links like this work to open the app:
instagram://media?id=1346423547953773636_401375631
However I want a regular http link, which opens a browser on desktop, and the app on mobile. Not sure if it exists.
From my knowledge, the only supported links into Instagram are described here
I'm not sure what the link you're attempting to use represents: /p/id_here seems like a post? You likely need to use:
https://www.instagram.com/media?id=id_here
The documentation I linked shows the "deeplink" approach (instagram://) which I understand you're avoiding, but the same paths should work through the Universal Link approach, at least from my experience.
Had the same problem. For me was solved by simply uninstalling and reinstalling the problematic app.
(Instagram 171.0 - iOS 14.3 - iPhone 11 Pro)
On iOS you must first add the instagram url scheme in the LSApplicationQueriesSchemes key of the info.plist file:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>instagram</string>
</array>
then you can open the url of the post using the link:
instagram://media?id=POST_MEDIA_ID
POST_MEDIA_ID can be found by looking at the page source, you will find a tag like this:
<meta property="al:ios:url" content="instagram://media?id=POST_MEDIA_ID"/>
Obviously, the Instagram app must be installed on the device, otherwise the link will not work.
So I'm trying to add a custom URL scheme to my app. Everything works. The confusing part is that when a user gets redirected it puts up a dialog box that says:
Open in "(null)"?
I can't figure out why it says null and not the name of the app. The only other spot I've been able to see this issue mentioned is here:
'Open this page in "null"' Modal appearing from FacebookSDK login after iOS9 and Swift 2 upgrade
but that talks about updating to the latest SDK. It does mention whitelisting the scheme which I tried doing using LSApplicationQueriesSchemes but that doesn't seem to fix it either.
So in my case it ended up being that the following had gotten added to my Info.plist:
<key>CFBundleDisplayName</key>
<string></string>
Either removing this key or giving it a non empty string value fixes the issue and causes it to give: Open in "name of app"?.
The value in that dialog is specified in Build Settings -> Packaging -> Product Name. By any chance, is that field somehow blank? Usually the build should fail if so, and presumably you'd have also noted something wrong on the homescreen, but who knows!
As a side note, URL schemes are not a fool-proof way to handle deep linking anymore, and are actually actively discouraged by Apple. At minimum, you also need to implement Universal Links, but even that is not a complete solution because of variations in how other apps (Facebook, etc) handle outbound links. You may want to consider a tool like Branch.io (full disclosure: I'm on the Branch team) to give a hand with all the logistics.
I found this about whitelisting urlschemes for iOS 9 (found answer here)
Any app built with SDK 9 needs to provide a LSApplicationQueriesSchemes entry in its plist file, declaring which schemes it attempts to query.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>urlscheme</string>
<string>urlscheme2</string>
<string>urlscheme3</string>
<string>urlscheme4</string>
</array>
This worked for me in getting rid of that.
I have developed & installed an iOS app locally on my device.
And have set custom scheme in the info.plist as mydlink
Set associated domains as weel: applinks:<myapp>.app.goo.gl
Created dynamic link on firebase as:
https://<myapp>.app.goo.gl/?link=http://<mysite.com>/&ibi=<app bundle id>&ius=mydlink&ifl=https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id%3D<app store id>%26mt%3D8&pt=<app store id>
When I open or click on dynamic link, it opens app page in the "App Store" app and not opening app itself though its installed.
What am I missing here?
sometimes we make a mistake in Associated Domains entitlements. There have to be no spaces
applinks:mydomain.page.link
If you are on iOS 9, universal links will be used. Universal links don't work in a lot of cases, like:
If you use a simulator
If you try to open the link directly in safari on a device (typing it into the address field in the browser)
I spent a lot of time trying this and could never get it to work on a simulator in a reliable way. What I end up doing is emailing the link to me and opening it from Inbox. Then it works every time!
I had an issue using iOS 14, running on device in debug mode.
Link has always redirected me to the AppStore app not to my app.
The solution was to enable "Associated Domains Development" on iPhone Settings>Developer>Associated Domains Development
(found it here: https://stackoverflow.com/a/63939770/6689321 ).
I'm sorry for the late reply - I hope your issue has been resolved and that this is helpful to others who may be experiencing the same problem.
There could actually be one or more issues here for iOS 9+; Dynamic Links relies on Apple's Universal Links to open the app on iOS 9+ and these suggestions are aimed at resolving issues with Universal Links and Firebase and have nothing to do with the SDK directly.
Verify that the assoc file is correct at https://app_id.app.goo.gl/apple-app-site-association - it should look similar to https://maps.app.goo.gl/apple-app-site-association but with only one element in "details."
As pointed out by another answer, verify that your team ID is properly set in the Firebase console.
If you've long-pressed the link and then clicked "Open in Safari" or you have clicked the "goo.gl>" button on the status bar of your app after the app opens via a Universal Link, then iOS defaults to opening Universal Links in Safari. This can be fixed by pulling down on the paged opened in Safari and clicking "Open in App" (or similar) on the smart banner.
The "ibi" parameter is not involved in opening the app in a post-install click on iOS 9+, but is in prior versions when the "ius" param is not set.
Regarding iOS 8, can you try running the app and then clicking a link after the app is installed? On versions prior to iOS 9, you can test by copy/pasting the link into safari.
https://firebase.google.com/docs/dynamic-links/ios
Just in case there is still someone out there having this issue, please note the following
Dynamic links now opens on simulator, please copy your link and paste on safari in your emulator.
Chrome and safari opens dynamic differently, safari uses only universal linking while chrome uses both url scheme and universal linking to open dynamic link. Ultimately you should try to get dynamic linking opening via universal link in your app.
If your dynamic link routes to App Store instead of opening your app. there is an issue with your universal link. You can temporarily test using chrome.
To set up opening dynamic link via universal link, please check the following
Ensure your Team id is correctly set In firebase console, get your team id from your membership detail in https://developer.apple.com
Ensure your domain is listed in your associated domain as shown below, no space between the domain
Ensure Associated domain is turned on in your apple developer account
if you are using a custom domain, ensure you add it to the info.plist as shown below.
I make a mistake that not setup Associated Domains for DEBUG, so make sure you setup Associated Domains all both DEBUG & RELEASE
I experienced same problem. Interestingly if you open the dynamic link in Chrome, app starts directly and successfully. But in Safari always it tries to open AppStore although the app is installed. I have no idea why Safari doesn't work in this case.
If none of the above workarounds work for you, please check if you have added activitycontinuation in associated domains or not.
Firebase dynamic links were not working for us (on iOS9 where they use universal links) due to a problem in Firebase's assumptions during setup. Here's how we fixed the problem on our app:
Firebase asks for your "Team ID" when adding your iOS app to Firebase Console Project Settings, and it assumes that your unique app ID will be in the format TeamID.com.foo.bar
However, in our case, that was NOT our unique app ID. When I looked at our provisioning profile (on developer.apple.com I found our provisioning profile and clicked "edit"), I saw that our unique app ID was actually SomethingElse.com.foo.bar
I had to go into Firebase Console and enter that "SomethingElse" in the spot where it asked for Team ID, even though that was NOT our team ID. Once I made that change, Firebase Dynamic Links started working correctly.
It appears Firebase is making an assumption that your unique app ID will always start with your Team ID, which is apparently not always the case.
Note that changing your Team ID can take a significant amount of time to take effect. You can see that the change has happened by checking the appropriate link for your app_id (https://app_id.app.goo.gl/apple-app-site-association).
After integrating Firebase Dynamic links, the sample link started working immediately on a device with iOS 8. For iOS 9 devices Universal links mechanism is used, as mentioned by other answers. This means Apple needs to update the entitlement data used to verify deep link dual authentication. This may take 48 hours, according to Apple's App Search API Validation Tool.
There are more Universal links troubleshooting tips here.
Experienced the same problem.
The solution for me was to use the
Identifiers -> App IDs -> 'my.app.ID' -> Prefix
You can find it on: https://developer.apple.com/account/ios/identifier/bundle
Instead of the 'DevelopmentTeam' number from the .pbxproj which I used and add it to the Team ID for my iOS app in the Firebase console.
And don't forget to download and add a new .plist to the project.
i had same issue with latest flutter sdk and firebase dynamic links plugin.
Tried all solutions the only fix was to manually insert com.apple.developer.associated-domains key to ios/Runner/Running.entitlements file
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:abc.page.link</string>
</array>
I have great news.
I always hear that it's IMPOSSIBLE to test a dynamic link on simulator.
But now WE CAN test firebase dynamic link on simulator
https://stackoverflow.com/a/56385506/6273003
When link is open in safari, It shows a "open (project name)"button. If this button is pressed for 2-3 second, It asks for opening that into different apps for first time.It also shows your app name. If you select your app, It opens your app. After doing that if you again open this link and press button in safari, it always work fine.
This fixed the problem for me.
After completing the setup in Firebase and in the Xcode project.
Add below code inside SceneDelegate instead AppDelegate.
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
if let incomingURL = userActivity.webpageURL {
print("Incoming URL is \(incomingURL)")
let linkHandled = DynamicLinks.dynamicLinks().handleUniversalLink(incomingURL) { (dynamicLink, error) in
guard error == nil else{
print("Found an error! \(error!.localizedDescription)")
return
}
if let dynamicLink = dynamicLink {
self.handleIncomingDynamicLink(dynamicLink)
}
}
}
Set on your Xcode project the correct form to declare Associated Domain, you must to include applinks:
Make sure you have a Team Id set in the firebase console for you app. (you will then need to download and import the .plist file).
This fixed the problem for me.
We had a similar problem. The issue in our case was that the software that generated the emails with the links generated a new link that had a 304-redirect to our deep link. This did not work in Safari (but in Chrome).
Check that your deep link is actually the first link opened when you click the link in the email.
i had same case and it fixed with after defined ios app on deeplink url;
Dynamic Links -> choose your link -> Edit
make sure that you have defined ios app;
I had the problem, that the AASA file was different at the locations
[domain]/.well-known/apple-app-site-association
[domain]/apple-app-site-association
The validator from branch always checks the file on the non well known path. It was confusing because it always said it was all fine even though is was not.
For Firebase, check your hosting and search in the public dir for a .well-known folder. In my case, I could just delete it, run firebase deploy --only hosting and let Firebase generate all AASA files for me.
https://branch.io/resources/aasa-validator/
If you are sure all your dynamic links config in xcode is correct, link is good, but it still opens Appstore you can try this trick:
Copy the link and paste it into the notes app
Long press on the link in notes to see context menu
If you see button "Open in YourAppName" - try pressing it.
please check associated domains as well: applinks:.app.goo.gl is correct or not? and Dynamic link is easily work on iOS Simulater , I don't get any issues.
Before iOS9, a Facebook post could successfully redirect an user to an installed app via short URL (like bet365://). Now, in iOS 9, bet365:// gives invalid link. From Safari it redirects fine, but not from Facebook browser. This is just an example, there are other apps that can't be opened from FB.
What do I need to do in order to open an installed iOS app from a Facebook post (in iOS9)?
PS: I understood that now, in iOS9, if Myapp1 wants to open Myapp2, it will need to populate info.plist with LSApplicationQueriesSchemes like this:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>url_to_Myapp2</string>
</array>
but it's strage to belive that Facebook will have to do the same with the apps he wants to open.
Many thanks!
There are some changes you need to make in your plist and add a few urls to whitelist Facebook urls. Try adding all of them. It should work then.
Facebook iOS 9 integration
There are various ways you could go about achieving the same:
1. Use a platform like Branch or DeepLink.me
Use links generated by these platforms which will be opened in Safari and then redirected to your app.
2. Facebook App Links
This is the deeplinking solution provided by Facebook itself. Instead of generating static app url scheme links, you should generate applinks for sharing in Facebook. These can then redirect to your app or even the app store page if the app is not installed.
3. Support Universal Links in iOS 9
You can have iOS recognize universal links for your application. These will be in the form of http://yourWebsite/path/to/content and will result in your app being opened directly.
From the documentation:
Universal links let iOS 9 users open your app when they tap links to
your website within WKWebView and UIWebView views and Safari pages, in
addition to links that result in a call to openURL:, such as those
that occur in Mail, Messages, and other apps.
Have a look here on how to configure the same.
I would suggest configuring all of the above for your application, as it will provide various ways for you to direct users directly to your app, each suitable for certain situations.