Skip to content

Instantly share code, notes, and snippets.

@grantmiller
grantmiller / lp-native-ios-strings
Created February 12, 2013 00:12
LP Mobile Native iOS Strings to be translated
"LIOEmailPlaceholder" = "[email protected]";
"LIOAltChatViewController.EmailChatButton" = "Email Chat";
"LIOAltChatViewController.EndSessionButton" = "End Session";
"LIOAltChatViewController.ReconnectionLabel" = "Reconnecting...";
"LIOAltChatViewController.ReconnectionHideButton" = "Hide";
"LIOAltChatViewController.LocalNameLabel" = "Me";
"LIOAltChatViewController.AgentTypingNotification" = "Agent is typing...";
"LIOChatBubbleView.LinkAlert" = "Are you sure you want to leave the app and visit \"%@\"?";
@grantmiller
grantmiller / lp-mobile-unsupported-basic.html
Last active December 14, 2015 07:29
for basic html async integrations... please add the "chatDisabled : true" to your configuration
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "YOUR_MOBILE_SITE_ID",
options : {
chatDisabled : true
}
};
/* End of Configuration */
</script>
{
"Client.All.AgentTyping": "Agent is Typing...",
"Client.All.Close": "Close",
"Client.All.ConfirmEndSession": "Would you like to end this chat session?",
"Client.All.EmailChat": "Email Chat",
"Client.All.EndSession": "End Session",
"Client.All.ErrorNoEmail": "Please enter an email address.",
"Client.All.ErrorNoMessage": "Please enter a message.",
"Client.All.ErrorUndefined": "Sorry, something went wrong!",
"Client.All.FailedReconnect": "Reconnect failed",
{
"Client.All.AgentTyping": "担当者がメッセージを入力中です...",
"Client.All.Close": "閉じる",
"Client.All.ConfirmEndSession": "このチャットを終了されますか?",
"Client.All.EmailChat": "チャットをEメールで送信",
"Client.All.EndSession": "チャットを終了する",
"Client.All.ErrorNoEmail": "Please enter an email address.",
"Client.All.ErrorNoMessage": "Please enter a message.",
"Client.All.ErrorUndefined": "申し訳ございません。問題が発生しました。",
"Client.All.FailedReconnect": "Reconnect failed",
-(void)viewWillAppear:(BOOL)animated
{
[[LIOLookIOManager sharedLookIOManager] setSkill:@"YOUR NEW SKILL"];
// YOUR CODE
}
-(UInt32)lookIOManagerEnabledCollaborationComponents:(LIOLookIOManager *)aManager {
return kLPCollaborationComponentPhoto;
}
// For apps supporting iOS 6.0 and above
-(BOOL)shouldAutorotate {
LIOLookIOManager* lookIOManager = [LIOLookIOManager sharedLookIOManager];
if ([lookIOManager shouldLockInterfaceOrientation])
return NO;
return YES;
}
// For apps supporting iOS < 6.0
@interface MyNavigationController : UINavigationController
@end
@implementation MyNavigationController
-(BOOL)shouldAutorotate {
LIOLookIOManager* lookIOManager = [LIOLookIOManager sharedLookIOManager];
if ([lookIOManager shouldLockInterfaceOrientation])
return NO;
// Use the following to report an event.
- (void)reportEvent:(NSString *)anEvent;
- (void)reportEvent:(NSString *)anEvent withData:(id<NSObject>)someData;
// Use the following constants for reporting common events.
NSString *kLPEventConversion;
NSString *kLPEventPageView;
NSString *kLPEventSignUp;
NSString *kLPEventSignIn;
NSString *kLPEventAddedToCart;
LIOLookIOManager *lookIO = [LIOLookIOManager sharedLookIOManager];
[lookIO addCustomVariables:[NSDictionary dictionaryWithObjectsAndKeys:
@"[email protected]", @"email_address",
@"123456", @"customer_id",
nil];