Getting Started with GetSocial iOS SDK

Welcome to Getting Started section of GetSocial documentation. Here you’ll find guides that describe how to accomplish a specific task with code samples you can re-use in your app.

System Requirements

In order to use GetSocial SDK your execution and development environment should match following requirements:

  • Xcode 8 or above
  • iOS 8 or higher

Creating a GetSocial Account

To start using GetSocial you have to create an account and login to GetSocial Dashboard. Dashboard provides a web interface to manage all GetSocial services.

GetSocial Dashboard

Adding GetSocial to Your App

Integrating the Dynamic Framework

  1. Download the latest GetSocial frameworks from our GitHub repository.
  2. Copy GetSocial.framework and, if you plan to use GetSocial UI, GetSocialUI.framework into your project.
  3. Drag GetSocial.framework and optionally GetSocialUI.framework into the Embedded Binaries section of your target:

    Xcode Target Settings - Adding Embedded Binaries

  4. Add a new Run Script Phase in your target’s Build Phases. Paste the following line in this Run Script Phase’s script text field:


    Avoid App Store Rejections

    If an iOS framework contains a fat binary with simulator (i386/x86_64) and device (ARM) slices, any application that attempts to embed that framework will be rejected from App Store submission. This script works around an App Store submission bug triggered by universal binaries.

  5. Make sure Run Script Phase is below the Embed Frameworks build phase. You can drag and drop build phases to rearrange them:

    Xcode Target Settings - Setup Run Script Phase

Configuring Info.plist

The last step before using GetSocial is to add your GetSocial App Id to Info.plist.

  1. Get your GetSocial App Id from the “App settings” section on the GetSocial Dashboard:

    GetSocial App Id

  2. Open Info.plist.

  3. Add an element to the root of the Info.plist with the key im.getsocial.sdk.AppId and value of your GetSocial App Id:

    Info.plist - Adding App Id

GetSocial SDK Size

You might be wondering why the GetSocial.framework folder is over 150 MB large. This can be irritating at first, especially considering that Apple only allows downloading apps over cellular data if they are smaller than 100 MB. However, this is not the size that your users will get.

The SDK binary includes slices for i386, x64, armv7 and arm64. For armv7 and arm64, Bitcode is included as well, which basically results in six different slices. Each slice is a full and complete copy of the SDK, and only one slice is required for your users. Also, during integration a script runs that ensures that the Simulator slices (i386, x64) are stripped away from our SDK, resulting in a size reduction of about 30%.

At the end, GetSocial SDK adds around 12Mb to the application downloadable size.

Start Using GetSocial

If the previous steps were executed properly at this point you have to be able to start using GetSocial. Let’s try to send a GetSocial Smart Invite via Email.

To run the test, add the code below to any button callback:

[GetSocial sendInviteWithChannelId:GetSocial_InviteChannelPluginId_Email success:^{
    NSLog(@"Invitation via EMAIL was sent");

} cancel:^{
    NSLog(@"Invitation via EMAIL was cancelled");

} failure:^(NSError * _Nonnull error) {
    NSLog(@"Invitation via EMAIL failed, error: %@", error.localizedDescription);


After calling this method email client will be opened:

GetSocial Smart Invite over Email

Note about Simulator

Try this example on the device. On the simulator failure block will be invoked, as email client is not configured.

GetSocial UI

GetSocial UI library contains easy to customize views for all GetSocial features.

To start using GetSocial UI, create and show any of provided views, e.g. code below will create and show GetSocial Smart Invites view:

bool wasShown = [[GetSocialUI createInvitesView] show];
NSLog(@"GetSocial Smart Invites UI was shown %d", wasShown);
Code goes here

After invoking code above, GetSocial Smart Invites view will be shown:

GetSocial Smart Invites View


The list of Smart Invites Channels in the view above will contain all social apps that are enabled on the GetSocial Dashboard and installed on the device.

Next Steps

Well-done! GetSocial SDK is now set up and ready to rock, check what you can do next: