+ All Categories
Home > Documents > Tutorial - C2Call iOS SDK - C2Call SDK Reference

Tutorial - C2Call iOS SDK - C2Call SDK Reference

Date post: 09-Feb-2022
Category:
Upload: others
View: 28 times
Download: 0 times
Share this document with a friend
24
Tutorial Make Your Own Simple Chat App Using C2Call SDK
Transcript
Page 1: Tutorial - C2Call iOS SDK - C2Call SDK Reference

                 

     

   

Tutorial  Make  Your  Own  Simple  Chat  App  Using  C2Call  SDK  

                                 

Page 2: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  2  

     Requirements  a. XCode  b. Sample  code  c. Socialcommunication.framework  d. Socialcommunication.resources  

   1.  Open  Xcode    

       2.  Create  a  new  XCode  project    

   

Page 3: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  3  

 3.  Choose  “Tabbed  Application”      

       4.  Enter  the  product  name,  organization  name,  company  identifier,  class  prefix  and  device.  Check  only  “Use  storyboards”  and  “Use  automatic  reference  counting”    

 

Page 4: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  4  

 5.  Save  the  project  wherever  you  want    

       6.  Open  one  of  the  sample  project    

 

Page 5: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  5  

 7.  Select  the  entire  framework  inside  SDK-­‐Frameworks  folder,  drag  and  drop  them  to  your  project      

     And  press  finish  on  this  window    

 

Page 6: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  6  

 8.  Your  framework  folder  will  look  like  this    

 

Page 7: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  7  

 9.  Delete  the  SocialCommunication.framework,  open  SDK  folder  and  drag  and  drop  to  your  project  (SocialCommunication.framework  into  Frameworks  folder  and  SocialCommunication.ressources  into  Supporting  Files  folder)    

       Your  folder  will  look  like  this    

     

Page 8: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  8  

10.    Click  on  “Build  Setting”  tab    

     11.  Search  for  “header  search  path”  and  set  it  to:  /usr/include/libxml2    

     12.  Search  for  “other  linker”  and  set  it  to:  -­‐lxml2  and  –lstdc++    

   13.  Change  the  Architectures  and  Valid  Architectures  to:  armv7    

   

Page 9: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  9  

 14.  Click  on  MainStoryboard  and  uncheck  Use  Autolayout    

       15.  Delete  all  existing  controller    

 

Page 10: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  10  

16.  Open  SocialCommunication.ressources  folder  and  find  SCStoryboard    

       17.  Copy  the  Friend  List  controller    

 

Page 11: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  11  

 18.  Paste  into  your  MainStoryboard    

     19.  Do  step  17  and  18  again  for  Board,Find  Friends,  Profile  and  Offerwall    

 

Page 12: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  12  

 20.  Your  MainStoryboard  will  look  like  this:    

       21.  Put  navigation  controller  from  pallet    

 

Page 13: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  13  

 22.  Connect  it  to  Friend  List  Controller    

     23.  Do  step  22  for  Board  Controller    

           

Page 14: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  14  

24.  Add  another  navigation  controller    

   25.  Select  on  the  table  view  and  change  the  content  to  static    

   

 

Page 15: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  15  

 26.Select  on  Table  View  Section  and  change  the  Rows  values  to  4    

     27.  Click  on  one  table  cell  and  change  the  style  to  Basic    

   

Page 16: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  16  

     28.  Your  table  view  controller  will  look  like  this:    

   

Page 17: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  17  

 29.  Change  all  the  label  text    

       30.  Connect  each  table  view  cell  to  each  controller  (selection)    

   

Page 18: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  18  

 31.  Copy  logout  class  from  sample  project    

     32.  Check  Add  to  target  and  then  press  Finish    

 

Page 19: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  19  

 33.  Copy  logout  controller  from  sample  project    

   34.  Connect  the  last  table  view  cell  to  logout  controller,  now  your  storyboard  will  look  like  this:    

 

Page 20: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  20  

 35.  Connect  root  controller  to  all  navigation  controller  and  dial  pad  controller    

       

 

Page 21: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  21  

36.  Click  on  AppDelegate.h  and  change  the  content  to  this  

 37.  Click  on  AppDelegate.m  and  change  to  content  to  this  

#import <UIKit/UIKit.h> #import <SocialCommunication/SocialCommunication.h> @interface SPAppDelegate : C2CallAppDelegate @property (strong, nonatomic) UIWindow *window; @end  

#import "SPAppDelegate.h" @implementation SPAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.affiliateid = @"1F3E9213F51427D53"; self.secret = @"1bc8c212de4251d53e5f1a414dbc3151"; return [super application:application didFinishLaunchingWithOptions:launchOptions]; } - (void)applicationWillResignActive:(UIApplication *)application { [super applicationWillResignActive:application]; } - (void)applicationDidEnterBackground:(UIApplication *)application { [super applicationDidEnterBackground:application]; } - (void)applicationWillEnterForeground:(UIApplication *)application { [super applicationWillEnterForeground:application]; } - (void)applicationDidBecomeActive:(UIApplication *)application { [super applicationDidBecomeActive:application]; } - (void)applicationWillTerminate:(UIApplication *)application { [super applicationWillTerminate:application]; } @end  

Page 22: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  22  

38.  Click  on  SCStoryboard  and  copy  the  launch  screen  controller    

     39.    Connect  root  controller  to  launch  screen  controller  (manual)    

 

Page 23: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  23  

 40.  Click  on  the  connection  (segue)  and  change  the  identifier  into  SCLaunchScreenControllerSegue.  This  will  let  the  AddDelegate  to  run  the  launch  screen  when  the  user  is  not  logged  in    

     41.  Save  your  project,  and  run  it.  You  can  test  login  with    Username:  [email protected]  and  password:  123456    

 

Page 24: Tutorial - C2Call iOS SDK - C2Call SDK Reference

C2Call  SDK  Tutorial  V1.0  

  24  

 If  the  your  project  cannot  run  and  throw  NSInvalidArgument  exception,  then  follow  this  steps:    

1. Search  for  C2CallDataModel  

     

2. Change  the  Current  value  to  C2CallDataModel  11  

   Please  visit  our  forum  for  support  or  any  feedback.  


Recommended