Opening specific iOS settings page using React Native's Linking function [duplicate] - ios

This question already has answers here:
Link to app manage subscriptions in app store
(10 answers)
Closed last month.
Out of all the other posts about this topic I still fail to find how to properly execute this.
I have many apps from the iOS App Store that has button to "Manage my subscription" which links directly to Settings -> iCloud -> Subscriptions page.
I'm trying to use React Native's Linking function to do so ie.
import { Linking } from 'react-native';
Linking.openURL('App-prefs:root=APPLE_ACCOUNT&path=SUBSCRIPTIONS');
But it only opens the main Settings page. I tried several different URLs to test if I could open other pages of the Settings app without any luck. (Got the Settings app's URLs from https://github.com/FifiTheBulldog/ios-settings-urls)
I read in a few posts that I need to tweak my XCode project's settings to add a custom URL handler but those answers seem outdated. I have also read that my app could get rejected because of this but as I said, I have many apps that I use that does specific pages of the iOS Settings app so I don't think it's a problem for Apple.
I'm looking for a definitive answer to this.

For iOS 14 and over the URL format has changed. The root= part should be removed.
For iOS 14 the new format is:
Linking.openURL('App-prefs:APPLE_ACCOUNT&path=SUBSCRIPTIONS');
And for iOS 13 the format was:
Linking.openURL('App-prefs:root=APPLE_ACCOUNT&path=SUBSCRIPTIONS');
Found the answer in this comment here: Opening the Settings app from another app

Related

Firebase Dynamic Links for iOS work for my device and simulators, but do not work for users after release

So I have implemented Firebase Dynamic Links in my app. I thought that I had them set up correctly, because they work for my own personal device and the simulators perfectly. I released the update to the app, but when two of my friends tried to open them after updating to the new version, it takes them to the Firebase website citing an error. I click the same link and it opens my app and handles the link.
Firebase has added the apple app site association to my domain prefix, I have added the a--link in my app's capabilities, I am truly at a loss as to why this may be. Even if they click the link from notes, it does not give them the option to open the link with my app like it will for me.
Is there anything that I could be overlooking? Happy to supply any relevant details but I feel like I have to be missing something.
App Links:
applinks:share.***.app
URL Type is set up in Target Info.
Custom Dynamic Domain is set in info.plist.
For others that come across this, it seems to be an open Apple bug: http://www.openradar.me/radar?id=4999496467480576
After several days, the user's apps downloaded the proper AASA and the deep links began to work. There doesn't seem to be a workaround with Google Dynamic Links, but Branch.io offers forced URI redirect mode to avoid this issue.

How to link to app reviews in App Store in iOS 11

Of course I know about the new guidelines and SKStoreReviewController to prompt users for reviews. But this is not about asking for new review but about quickly accessing reviews of different apps.
The Problem:
Previously I used the following format to link from an iOS App directly to the reviews tab of an app in the App Store:
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=APP_ID&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8
This worked fine, but in iOS 11 it shows just an empty page within the App Store app. The obvious reason is, that in iOS 11 the app pages do not have a Review Tab anymore, but the reviews are located under the app description and screenshots.
So using the following format still brings the user to the apps store page but one has to manually scroll down to the review.
https://itunes.apple.com/app/idAPP_ID
This works of course but one has to scroll down to the reviews manually. Is it still some how possible to directly link to the review section (just like using an anchor on a normal HTML page)?
This link format will work in iOS 11:
itms-apps://itunes.apple.com/us/app/itunes-u/id123456789?action=write-review
It also compatible with iOS 10.3.
The older versions I didn't test.
There is a country/region abbreviation ‘us’ in the URL. But it doesn't matter. It will always open the app store in the current region. No need to change it. Without these two letters, it can’t find your app.
Add &action=write-review to the end of the url.
http link:
https://itunes.apple.com/us/app/appName/id1234567?mt=8&action=write-review
itms link:
itms-apps://itunes.apple.com/us/app/appName/id1234567?action=write-review
Update:
You'll need a country code and appName for this to work, looks like they can be anything as it's not actually used.
Actually my app (iOS 11) is working with this link :
itms-apps://itunes.apple.com/app/id{appStoreId}?action=write-review
If you are using iRate library you can override the link :
iRate.sharedInstance().ratingsURL = URL(string: "itms-apps://itunes.apple.com/app/id{appStoreId}?action=write-review")

Firebase iOS is not opening my app from Safari

I tested the dynamic links Firebase. Configured everything in the project, the implementation did exactly like the Google documentation and created links on the console. When I test in Safari it does not open the application.
Thank you
iOS 9+
Due to the limitations on the iOS platform, Firebase Dynamic Links must rely on Apple's Universal Link system to open the app directly from a link when it is installed. One of the constraints placed on Universal Links is that the app-open behavior is only triggered from a user's click and not by a redirect or copy/paste into Safari.
We have found it very challenging to test Universal Links in the simulator and pretty much always use a real device for this type of thing. Basic steps: install app > SMS link to your test device > click link > observe app open.
iOS 8 and prior
iOS versions prior to 9 handle opening the app from a Dynamic Link through Safari, so if the app is not opening when you copy/paste the link into Safari then some setup is incomplete. Please review your Firebase project for information and confirm that your bundle IDs/custom schemes match on the project page, in your link, and in your app; be sure that the bundle ID is listed in URL Types in your Xcode project setup along with any custom scheme you wish to use.
Other Info
Here is a link to a prior answer that may be helpful as well.
Firebase dynamic link not opening the app iOS

iOS Deep linking and Universal link, how to deep link in ios

I read that from iOS 9, Universal links are introduced. Please explain the different between Deep-linking and universal links.
My objective is, a link will be sent in mail to customers. Let the mail says there is an offer for item A, and a link. On clicking the link
If the app is installed then, open the app and launch specific screen showing item A
If app is not installed then, download it from App Store and open it and launch specific screen showing item A
What if there is a user login feature?
If app is installed and user is not logged in then,
open the app
Launch login screen
After login is success launch specific screen showing item A.
How can these be implemented? How the links are configured for these?
As of iOS 9.2, released December 8th, 2015, Apple has sounded the death knell for URI scheme based redirects, the standard for deep linking for the last seven years. They’ve decided that Universal Links are the future.
Earlier in order to use a URI scheme, you have to manually handle the case of the app not being installed.The problem with this is that when the app is not installed, it shows a ‘Cannot Open Page’ error. I’m sure you’ve all seen it. It’s the bane of deep linking.We were able to bypass this in iOS 7 and iOS 8, but it is not possible now from iOS 9.
Get more details form this link
To clarify, 'deep links' are simply links that, when clicked, cause your app to open directly to content. Universal Links are a type of deep link, as are URL scheme links, but neither is a perfectly bulletproof solution right now so to cover all edge cases, you'll want to implement both.
Fortunately Branch can handle all of that complexity behind the scenes so you don't have to worry about it! As mentioned in the answer above, the guide here will get you up and running with exactly the implementation you described!
I found a usable link here . It gives step by step details about deep linking using Branch.io

Google app invites on iOS deep link only opens app store

I am working on adding Google App Invites deep linking to an iOS app and I followed all the steps for Adding App invites to iOS but the deep link just opens the app store to my app page even if the app is installed.
To recap, I...
Installed the Cocoapod
Generated and added the config file using the appropriate app store ID and bundle ID
Included the code for application:openURL:... and didFinishLaunchingWithOptions:
Added the URL Scheme for google and inputted the REVERSED_CLIENT_ID
I'm not sure how to debug this considering I did all that Google told me to do. Their only help link on the Google Developers site was to Stack Overflow. Has anyone tried implementing these deep links on iOS and succeeded?
EDIT: This was done using iOS 8.x. #Caio pointed out the problem still persists on iOS 9 but not on iOS 7.x.
We need to set the value "applinks:{your_app_link}.app.goo.gl" to Associated Domains on Capabilities tab of Xcode.

Resources