FeedbackLoop 0.1.68

FeedbackLoop 0.1.68

许可证 自定义
发布最后发布2015年6月

Shane Rogers维护。



 
依赖项
AFNetworking>= 0
JSONModel>= 0
JSQMessagesViewController>= 0
SocketRocket>= 0
MBProgressHUD>= 0
URBMediaFocusViewController>= 0
 

  • 作者
  • Shane Rogers

要求

FeedbackLoop iOS SDK支持iOS iOS 7.x。

安装

手动安装

  1. FeedbackLoop.framework添加到Xcode项目(您可以从GitHub获取它)。在您的构建目标中,确保其他链接器标志下包含-ObjC标志。

  2. 有时Xcode不会正确添加FeedbackLoop.bundle,所以请确保将其添加到您的目标中,添加到Copy Bundle Resources的构建阶段。在Finder中展开FeedbackLoop.framework,您将在FeedbackLoop.framework/Versions/A/Resources文件夹中找到它。

  3. 使用以下#import <FeedbackLoop/FeedbackLoop.h>语句导入FeedbackLoop。

如何在应用程序中使用FeedbackLoop SDK?

  • 在必要时导入<FeedbackLoop/FeedbackLoop.h>
  • 在AppDelegate.m中使用您的FeedbackLoop AppId初始化库
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
            // Initialize FeedbackLoop
        [FeedbackLoop initWithAppId:@"<#your-app-id#>"];
    }
  • 创建包含相关用户数据的字典
  • 使用FeedbackLoop库注册此用户
  • 展示聊天通道
NSDictionary *user = @{
  @"email": @"<%= current_user.email %>",
  @"user_name": @"<%= current_user.name %>",
  @"user_link": @"http://www.yourwebsitehere.com/users/user_id",
  @"created_at": @"<%= current_user.created_at.to_i %>",
  @"links": @{ // Any metadata you want to include about the user
        @"model": [UIDevice currentDevice].model
  }
};

// Pass the user to the register method
[FeedbackLoop registerAuthenticatedUser:user];

// Present the chat channel
[FeedbackLoop presentChatChannel];

很简单。