Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.markdown
                       .__  .__ __           

__ __ ______ ___________| | || | __ __
| | \/ // _ _ __ \ | | | |/ // __ \ | | /_ \ /| | \/ || | <\ __/ |_//____ >___ >| |__/||_ \___ > \/ \/ \/ \/

(c) 2011, Userlike - david@userlike.com - http://userlike.com

Tutorial

This tutorial shows you in detail how to create sample application with the Userlike chat integrated.

  1. Start a new project in ‘Xcode’ and create a ‘Simple view application’.

  2. Create a sample project and Use Storyboard.

  3. Now go to the Userlike Github project and download the UserlikeClient.framework

  4. Untar the framework.tar.gz

  5. Go into Xcode and add the following frameworks to the built target.

  • UserlikeClient.framework
  • libz.dylib
  • libicucore.dylib
  • libxml2.dylib
  • MobileCoreServices.framework
  • CFNetwork.framework
  • SystemConfiguration.framework
  • CoreLocation.framework.

  1. Now go to the MainStoryboard.storyboard and add a button to the view.

  2. Go into the ViewControler header file and add UserlikeChatControler include, implement UserlikeChatDelegate control, and add UserlikeChatController property.

@interface ViewController : UIViewController <UserlikeChatDelegate> {

    UserlikeChatController *userlikeChatController;
}

@property (nonatomic, retain) UserlikeChatController *userlikeChatController;

  1. Now add an IBaction with the name ‘startChat’, and connect it to the button.
- (IBAction)startChat:(id)sender;
  1. Go to the ViewControler implementation file and implement the IBaction ‘startChat’
- (IBAction)startChat:(id)sender {
    if (userlikeChatController!=nil){
        [userlikeChatController release];
    }
    userlikeChatController = [[UserlikeChatController alloc] init]; 
    userlikeChatController.delegate = self;    
    [self presentModalViewController:userlikeChatController animated:YES];
}
  1. You can optionally implement the UserlikeChat delegate method: chatDidFinish, to receive a callback when the chat ends.

  2. Now go to userlike.com and log into your dashboard.

  3. Go to the ‘widgets’ section > ‘iOS integration’ and download your unique Plist.

  4. Drag and drop the Plist into the Xcode project.

  5. Also drag and drop the UserlikeClient.bundle, which was included in the framework download, into the Xcode project.

  6. Check in the ‘Build phases’ whether the UserlikeClient.bundle is present in the Copy Bundle Resources.(if not, add it)

  7. Now you can compile and run the app.

  8. When clicking on the chat button inside your app, the Userlike chat starts.

Something went wrong with that request. Please try again.