Skip to content

Landing Page Customization on iOS

To provide more engaging experience to the invited users, you can customize the content of the landing page for each Smart Invite sent from the client side.

Configuration

Possible configuration options:

  • Title: Title of the page.
  • Description: Short description.
  • Image: Landing page image. Can be an image URL or instance of UIImage.
  • Video: Landing page video to be displayed instead of an image. At the moment we support only YouTube video URLs.

Example:

  1. Customize content via Smart Link parameters:

    ```objc tab=”Objective-C”
    UIImage *landingPageImage = …; // get your image here

    NSMutableDictionary *linkParams = [NSMutableDictionary new];
    linkParams[GetSocial_Custom_Title] = @”Hey friend!”;
    linkParams[GetSocial_Custom_Description] = @”Check out this record!”;
    linkParams[GetSocial_Custom_Image] = landingPageImage;

    // Alternatively, you can add a YouTube video instead of an image:
    linkParams[GetSocial_Custom_YouTubeVideo] = @”https://www.youtube.com/watch?v=dQw4w9WgXcQ”;

    ```swift tab="Swift"
    let landingPageImage = ...; // get your image here
    var linkParams = [String : Any]()
    linkParams[GetSocial_Custom_Title] = "Hey friend!"
    linkParams[GetSocial_Custom_Description] = "Check out this record!"
    linkParams[GetSocial_Custom_Image] = landingPageImage
    
    // Alternatively, you can add a YouTube video instead of an image:
    linkParams[GetSocial_Custom_YouTubeVideo] = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    

  2. Send customized invitation via GetSocial Data API:

    ```objc tab=”Objective-C”
    GetSocialInviteContent *customInviteContent = …; // create invite message content
    [GetSocial sendInviteWithChannelId:GetSocial_InviteChannelPluginId_Email
    inviteContent:customInviteContent
    linkParams:linkParams
    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);
    }];

    ```swift tab="Swift"
    let customInviteContent = ... // create invite message content
    GetSocial.sendInviteWithChannelId(GetSocial_InviteChannelPluginId_Email,
        inviteContent: customInviteContent,
        linkParams: linkParams,
        success: { print("Customized invitation via EMAIL was sent") },
        cancel: { print("Customized invitation via EMAIL was cancelled") },
        failure: { (error: Error) in print("Customized invitation via EMAIL failed, error: \(error.description)") })
    

    Or via GetSocial UI:

    ```objc tab=”Objective-C”
    GetSocialUIInvitesView* invitesView = [GetSocialUI createInvitesView];
    [invitesView setLinkParams:linkParams];
    [invitesView show];

    ```swift tab="Swift"
    let invitesView = GetSocialUI.createInvitesView()
    invitesView.setLinkParams(linkParams)
    invitesView.show()
    

Next Steps

Give us your feedback! Was this article helpful?

😀 🙁