Open
Description
Describe the bug
I am using the generateInviteLink
method to shorten deeplink url and I want appsflyer to use brandDomain
when creating the invite link.
When I am not providing the brandDomain
property, appsflyer correctly shortens the url but the domain is https://xxxx-app-int.onelink.me
.
When I do provide the brandDomain
,it uses that brandDomain
but it does not shorten the url.
To Reproduce
Steps to reproduce the behavior:
Future<String> generateUserInviteLink(
Map<String?, String?> params, {
String path = '/',
}) {
final completer = Completer<String>();
var inviteUrl = '';
final queryParamEntries = params.entries;
final queryParamsStr =
queryParamEntries.map((q) => '${q.key}=${q.value}').join('&');
final map = {'deep_link_value': Uri.encodeFull('$path?$queryParamsStr')};
_appsflyerSdk.setAppInviteOneLinkID(_oneLinkTemplateId, (dynamic result) {
if (kDebugMode) {
debugPrint('OneLink ID was $result');
}
_appsflyerSdk.generateInviteLink(
AppsFlyerInviteLinkParams(
customParams: {
'deep_link_value': '/?notificationAnonymousInviteId=1234',
},
brandDomain: 'int.abcd.com',
),
(dynamic success) {
if (kDebugMode) {
debugPrint('Invite link generated successfully: $success');
}
final result = success as Map<dynamic, dynamic>;
final payload = result['payload'] as Map<String, dynamic>;
final link = payload['userInviteURL'] as String;
if (link.isNotEmpty) {
inviteUrl = link;
completer.complete(inviteUrl);
return;
}
},
(dynamic error) {
if (kDebugMode) {
debugPrint('Error generating invite link: $error');
}
final baseLink = Uri.parse(_baseLinkUrl);
inviteUrl =
Uri.https(baseLink.authority, baseLink.path, map).toString();
completer.complete(inviteUrl);
},
);
});
return completer.future;
}
Expected behavior
Appsflyer should use brandDomain provided and should shorten the invite link as well.
Smartphone (please complete the following information):
- Device: iPhone 15 pro max
- OS: iOS 17.5