Code Monkey home page Code Monkey logo

intercom-ios's Introduction

Developer's Guide for the Intercom iOS SDK

Requirements

The Intercom iOS SDK supports iOS 7.x and iOS 8.x.

Remark: If you have an app that supports iOS 6, you can use the old version of the Intercom iOS SDK.

Quick Install

Option 1: Using cocoapods

Add the Intercom pod into your Podfile

pod 'Intercom'

Option 2: Manual Installation

  • Add Intercom.h and libIntercom.a to your Xcode project (you can get them from GitHub). In your build target, include the -ObjC flag under Other Linker Flags.
  • Make sure you are linking the following frameworks: ImageIO, MobileCoreServices, SystemConfiguration, AVFoundation. If you get errors, check out our Troubleshooting section here.

Initialize Intercom and Begin Session

  • You'll need your Intercom App Id and the SDK API key and you can get them from your Intercom App Settings -> API keys. The SDK API key should start with 'ios_sdk...'. If you only see keys starting with 'ios-...', check out our Troubleshooting section here.
  • Initialize Intercom by calling: [Intercom setApiKey:@"ios_sdk-..." forAppId:@"your_app_id"];
  • Start a session by either calling
    [Intercom beginSessionForUserWithEmail:self.dataSource.email
        completion:^(NSError *error) {
            // check the error object: only if we have no error, we have an active session and we can
            // allow other Intercom calls (such as updating a user)
            if (!error) {
                // handleBeginSessionOK
            } else {
                // handleBeginSessionWithError:error
            }
    }];

or

    [Intercom beginSessionForUserWithUserId:self.dataSource.userId
        completion:^(NSError *error) {
            // check the error object: only if we have no error, we have an active session and we can
            // allow other Intercom calls (such as updating a user)
            if (!error) {
                // handleBeginSessionOK
            } else {
                // handleBeginSessionWithError:error
            }
    }];

And that's it.

Was that too fast? For more detailed instructions read the step by step install instructions here.

Developer's Advanced Guide

If you want to learn about the following topics, you find detailed information here. You also find the Intercom docset on cocoadocs.

  • Session control
  • Updating a user
  • Working with attributes
  • Company Data
  • Custom Attributes
  • Events
  • Messaging
  • Using Push notifications
  • Intercom iOS SDK Architecture and Prerequisites
  • How to configure Secure Mode in the SDK

Logging

By default the Intercom iOS SDK only logs errors. By calling the class method enableLogging, you can increase the log level. It is recommended to use this only for debugging purposes, not the App Store build.

intercom-ios's People

Contributors

roland9 avatar jtreanor avatar erskingardner avatar eoghanintercom avatar idcuesta avatar

Stargazers

Phillip Ressler avatar

Watchers

James Cloos avatar Phillip Ressler avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.