cordova-plugin-firebase-dynamiclinks
cordova-plugin-firebase-dynamiclinks copied to clipboard
iOS error when opening link in APP_DOMAIN
I'm doing a basic proof-of-concept in iOS simulator. I've created my dynamic link as follows (anonymizing my app name here): https://example.page.link/abc => https://example.com/123
If I open the link "https://example.page.link/abc", then the link opens my app and I can get the url data via the onDynamicLink link. All is good in this case.
But if I open the link "https://example.com/123" (app installed), then the app also does open, but I don't get the event. Even worse, I get an EXC_BAD_ACCESS error with an infinite recursion loop on the AppDelegate(FirebaseDynamicLinksPlugin) identity_application function going over 40,000 stack frames deep. See attached screenshots of stacktrace below. Now, perhaps that isn't supported, but then why does the plugin.xml add an entitlement for applinks:APP_DOMAIN? And certainly it shouldn't crash like this.
Am I doing something wrong?
I think the recursion loop may be due to GoogleUtilities also swizzling the selector:
@selector(application:continueUserActivity:restorationHandler:);
So there's a 3 way infinite recursion loop of swizzling.
Perhaps this is a regression from a more recent version of Firebase/Core?
Here is a page that explains how to register an interceptor which relies on GoogleUtilities swizzling: https://github.com/firebase/firebase-ios-sdk/tree/master/GoogleUtilities/AppDelegateSwizzler
It seems that the swizzling should be removed, and AppDelegate selector declared straight up. Are you concerned about another plugin also using that delegate selector? I don't think that would work anyway with the way the Firebase SDK does its own swizzling.
Also, I'm still wondering how you would support posting an APP_DOMAIN url to javascript, since this plugin does declare its capability?
Hi @jacobg any updates on this issue? Thanks!
I pulled this plugin into my own application repo, and changed it to remove swizzling and to also handle links that firebase does not handle. If @chemerisuk will accept PR's for those changes, I'll submit them.
Any chance you can share the updated plugin?
On 25 Apr 2019, at 08:33, jacobg [email protected] wrote:
I pulled this plugin into my own application repo, and changed it to remove swizzling and to also handle links that firebase does not handle. If @chemerisuk will accept PR's for those changes, I'll submit them.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
I'd rather just submit a PR if @chemerisuk will accept them. It affects both iOS and Android.
Hi @jacobg any updates on this?
Waiting on @chemerisuk to say if he'll accept a PR.
Is your fork public?
On Fri, May 24, 2019 at 3:28 PM jacobg [email protected] wrote:
Waiting on @chemerisuk https://github.com/chemerisuk to say if he'll accept a PR.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks/issues/28?email_source=notifications&email_token=AAIDQH3YTI7LRBQ4B67TKBTPXAXUVA5CNFSM4GUAZSHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWGHKPY#issuecomment-495744319, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIDQH43SPCBKDIRRYUPMALPXAXUVANCNFSM4GUAZSHA .
I have solved the same problem. If you use custom domain, how about you try checking "FirebaseDynamicLinksCustomDomains" in YourApp-info.plist.
more info: https://firebase.google.com/docs/dynamic-links/ios/receive#open-dynamic-links-in-your-app
Hi @takedasoft do dynamic links work for you on iOS cold starts? In my case the deepLink result is lost because of handleOpenUrl being called after the initial resolveDeepLink
Same issue here
When using custom domains for Dynamic Links you could adjust this plugin.xml and add:
<config-file target="*-Info.plist" parent="FirebaseDynamicLinksCustomDomains">
<array>
<string>https://$PAGE_LINK_DOMAIN</string>
<string>http://$PAGE_LINK_DOMAIN</string>
</array>
</config-file>