许可证 | 自定义 |
发布最后发布 | 2015年6月 |
由Shane Rogers维护。
依赖项 | |
AFNetworking | >= 0 |
JSONModel | >= 0 |
JSQMessagesViewController | >= 0 |
SocketRocket | >= 0 |
MBProgressHUD | >= 0 |
URBMediaFocusViewController | >= 0 |
FeedbackLoop iOS SDK支持iOS iOS 7.x。
将FeedbackLoop.framework
添加到Xcode项目(您可以从GitHub获取它)。在您的构建目标中,确保在其他链接器标志
下包含-ObjC
标志。
有时Xcode不会正确添加FeedbackLoop.bundle
,所以请确保将其添加到您的目标中,添加到Copy Bundle Resources的构建阶段。在Finder中展开FeedbackLoop.framework
,您将在FeedbackLoop.framework/Versions/A/Resources
文件夹中找到它。
使用以下#import <FeedbackLoop/FeedbackLoop.h>
语句导入FeedbackLoop。
<FeedbackLoop/FeedbackLoop.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Initialize FeedbackLoop
[FeedbackLoop initWithAppId:@"<#your-app-id#>"];
}
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];
很简单。