Skip to content

GetSocial iOS Installer Script Reference

Introduction

GetSocial iOS Installer Script simplifies GetSocial integration process. Script automates adding of the frameworks (CocoaPods supported) and project configuration to use GetSocial SDK.

On the Xcode project build the script will:

  1. Download GetSocial Frameworks and add them to the project.
  2. Configure URL Schemes for Invite Channels.
  3. Configure Deep Linking.
  4. Configure Push Notifications.

Adding Script To Project

  1. Download and unzip GetSocial iOS Installer.
  2. Copy the unzipped getsocial.sh script to the Xcode project root folder, so you can add it to source control.
  3. In your Xcode project go to Project Settings → select target you want to modify → Build Phases tab.
  4. Create new or use existing Run Script phase → move it before Compile Sources phase.
  5. Add getsocial.sh script to the Run Script build phase:

    1
    "$PROJECT_DIR/getsocial.sh" --app-id="your-getsocial-app-id"
    
  6. Resulting Xcode configuration should look like this:

    Xcode Script configuration

  7. Build your project.

Supported Configuration Parameters

GetSocial Installer script supports multiple configuration parameters, for instance to enable SDK debug mode:

1
"$PROJECT_DIR/getsocial.sh" --app-id="your-getsocial-app-id" --debug="true"

Complete list of supported parameters:

Property Required Default Min SDK version Description
app-id + empty string 6.0.0 GetSocial App Id from the GetSocial Dashboard. More.
framework-version - empty string 6.0.0 GetSocial SDK version to use. See available versions here. If version is not specified the latest GetSocial SDK is used.
installer-version - empty string 6.0.0 Version of installer script. If not specified the latest available version will be used.
auto-init - true 6.10.0 Automatically initialize GetSocial SDK. More about Manual Initialization.
autoregister-push - true 6.0.0 Automatically register for Push Notifications. More.
debug - false 6.0.0 If debug mode with extra logging should be enabled for GetSocial SDK.
use-ui - true 6.0.0 If GetSocial UI framework should be added to project. More.
ui-config - empty string 6.4.0 Custom UI configuration file. If not specified default UI configuration will be used. More.
foreground-notifications - false 6.17.0 Show GetSocial notifications while app is in foreground on iOS 10+. More.
ignore-cocoapods - false 6.0.0 If your project uses CocoaPods to manage dependecies, by default installer script does not download GetSocial frameworks. Set this parameter to true if you want to override this behaviour.

Project Backups

Every time you build Xcode project with GetSocial Installer script, it creates a backup file of the project file inside .xcodeproj folder. This way you always have a backup if something goes wrong, like you get The file couldn’t be opened. error message after executing a build.

To recover your project:

  1. Find invalid .xcodeproj file
  2. Right click and press Show Package Contents
  3. Here you should see file project.pbxproj_*.backup
  4. Now delete project.pbxproj file and rename file from step 3 to project.pbxproj

We are here to help

If you will have any questions or encounter any problems with GetSocial Installer script, do not hesitate to reach us at support@getsocial.im or via the Intercom.

Give us your feedback! Was this article helpful?

😀 🙁