Skip to content

Customizing Smart Invites on iOS

To provide better user experience, you can customize Smart Invite message, an order of invite channels in Smart Invites view, Smart Link domain, and landing page. This guide shows the ways how it is possible to do.

Prerequisite

Content Customizations

Unfortunately not all invite channels allow the same level of customization, for instance, Twitter allows only custom message text and image, but not subject. Check the whole list of supported customizations.

To enable dynamic Smart Invite content generation GetSocial provide client side API for content customization.

  1. The first step is to create InviteContent object:

    1
    2
    3
    4
    GetSocialMutableInviteContent* customInviteContent = [GetSocialMutableInviteContent new];
    [customInviteContent setSubject:@"Hey mate, look what I've found"];
    [customInviteContent setText:@"Check this game [APP_INVITE_URL]. It’s amazing!"];
    [customInviteContent setImageUrl:@"https://api.adorable.io/avatars/250/documentation_app.png"];
    
  2. Note, that you can use placeholder [APP_INVITE_URL] to customize position of the invite url in setText: ... method. All available placeholders are defined in GetSocialConstants.h header file with GetSocial_InviteContentPlaceholder_ prefix.

  3. Next, send customized invitation via GetSocial Data API:

    1
    2
    3
    4
    5
    6
    7
    [GetSocial sendInviteWithChannelId:GetSocial_InviteChannelPluginId_Email inviteContent:customInviteContent success:^{
        NSLog(@"Customized invitation via EMAIL was sent");
    } cancel:^{
        NSLog(@"Customized invitation via EMAIL was cancelled");
    } failure:^(NSError * _Nonnull error) {
        NSLog(@"Customized invitation via EMAIL failed, error: %@", error.description);
    }];
    

    Or via GetSocial UI:

    1
    2
    3
    GetSocialUIInvitesView* invitesView = [GetSocialUI createInvitesView];
    [invitesView setCustomInviteContent:customInviteContent];
    [invitesView show];
    

If you want to attach UIImage to the invitation on the client side, you can use setImage method instead of withImageUrl() method. Recommended resolution is 1200x1080px. Bigger images will be automatically downscaled on the backend:

1
2
3
4
5
UIImage *inviteImage = ...; // get your image here
GetSocialMutableInviteContent* customInviteContent = [GetSocialMutableInviteContent new];
[customInviteContent setSubject:@"Hey mate, look what I've found"];
[customInviteContent setText:@"Check this game [APP_INVITE_URL]. It’s amazing!"];
[customInviteContent setImage:inviteImage];

Invite Channels Order Customization

To improve organic user acquisition we recommend to adjust the order of Invite Channels according to your audience, e.g. if your app is mostly used in Asia, it makes sense to put Kik and Kakao on the top; on the other hand if your app is popular in the US - WhatsApp and Facebook Messenger provide better results.

Check how to customize the order of Invite Channels via Dashboard.

On the client side Invite Channel order property is available on InviteChannel object:

1
2
3
4
5
6
7
8
NSArray* inviteChannels = [GetSocial inviteChannels];

[inviteChannels enumerateObjectsUsingBlock:^(GetSocialInviteChannel* inviteChannel, NSUInteger idx, BOOL * _Nonnull stop) {
    NSString* channelId = [inviteChannel channelId];
    NSInteger displayOrder = [inviteChannel displayOrder];

    NSLog(@"%@ , order: %ld", channelId, (long)displayOrder);
}];

Next Steps

Give us your feedback! Was this article helpful?

πŸ˜€ πŸ™