Reputation: 31
We have been using firebase dynamic link on android for a while.It was working fine in android. We have decided to build our project on IOS platform also.Now we are facing some problems in dynamic link. On pressing the link our application does not open.We also following the tutorial to integrate dynamic link on IOS.
1.Added .Plist file.
2.Added associated Domain in capabilities.(applinks:domain-link)
3.Added URL Types in info.
4.Added Team ID.
Seems like we are following the exact steps in the documentation. And yet Dynamic link is not working for us. Can anyone help us in resolving this issue?
Upvotes: 3
Views: 3166
Reputation: 11
I had a same problem and i want help you. Firebase was setup in my project already. I use Unity and build app on android and ios. Android is work, but ios is big problem. You should check this:
add associated domain:
private static void AddAssociatedDomains(string path)
{
//This is the default path to the default pbxproj file. Yours might be different
string projectPath = "/Unity-iPhone.xcodeproj/project.pbxproj";
//Default target name. Yours might be different
string targetName = "Unity-iPhone";
//Set the entitlements file name to what you want but make sure it has this extension
string entitlementsFileName = "my_app.entitlements";
var entitlements = new ProjectCapabilityManager(path + projectPath, entitlementsFileName, targetName);
entitlements.AddAssociatedDomains(new string[] { "applinks:example.com/link" });
//Apply
entitlements.WriteToFile();
}
your domain's place in firebase console - dynamic links - left top corner blue font. whithout https:/// path in method is path of "Info.plist"
<key>FirebaseDynamicLinksCustomDomains</key> <array> <string>https://example.com/link</string> </array>
in Unity you can do this in this way:
private static void AddFirebaseDynamicLincsInfo(PlistDocument plist)
{
var customDomains = plist.root.CreateArray("FirebaseDynamicLinksCustomDomains");
customDomains.AddString("https://example.com/link>");
}
[super application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
It must like be this:
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *))restorationHandler {
[super application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
[[AppsFlyerAttribution shared] continueUserActivity:userActivity restorationHandler:restorationHandler];
return YES;
}
Upvotes: 1
Reputation: 79
i'm using a Flutter App and on Android i can read internal link with custom parameter, however, on iOS i can not, the App is opened but onLink.listen is never called. I did all iOS platform configuration posted on documentation.
The link used to open the App looks like (Long Dynamic Link): https://sample.page.link/?link=https://sample.page.link/test?CUSTOM_PARAM=fooBar&apn=br.com.test&isi=12345&ibi=br.com.test
The idea is to use only one dynamic link and pass dynamic data as custom parameter. Did anyone face that problem?
Upvotes: 1
Reputation: 41
check
Associated Domains
from your app Identifiersteam id
and bundle id
from https://{your set domain}.page.link/apple-app-site-association
https://xxx.page.link/ooo
test (not on browser)I hope I can help you
Upvotes: 2
Reputation: 37
please cross check associated domains : (it must not contain http or https e.g. applinks:myapp.page.link ) .and Dynamic link is easily work on iOS Simulator , I don't get any issues.
And if you creating dynamic link from firebase ios sdk then below code will be useful
guard let link = URL(string: "Write your link here and parameters") else { return }
let dynamicLinksDomainURIPrefix = "https://racematesios.page.link" //domain-link
let linkBuilder = DynamicLinkComponents(link: link, domainURIPrefix: dynamicLinksDomainURIPrefix )
linkBuilder!.iOSParameters = DynamicLinkIOSParameters(bundleID: "Bundle ID")
linkBuilder!.iOSParameters?.appStoreID = "App store ID"
guard let longDynamicLink = linkBuilder?.url else { return }
print("The long URL is: \(longDynamicLink)")
Upvotes: 0
Reputation: 317
You need to update your AppDelegate.m file as well. Follow from steps 4 mentioned in the section Open Dynamic Links in your app here
Upvotes: 0