Latest 0.0.3
Homepage https://github.com/l900416/LTChat
License MIT
Platforms ios 9.0, requires ARC
Dependencies XMPPFramework, WebRTC
Frameworks Foundation, UIKit, CFNetwork, CoreData, CoreLocation, Security, SystemConfiguration
Authors

Chat use XMPP framework and WebRTC framework

Usage

Setup

Installation with CocoaPods

LTChat is available in CocoaPods, specify it in your Podfile:

    pod ‘LTChat’ , '~> 0.0.3’
Drag Code

Drag LTChat code into your project ,and also do not forget WebRTC and XMPP

    pod 'XMPPFramework', '~> 3.7.0'
    pod 'GoogleWebRTC'

Configuration

    [LTChatConfig sharedInstance].xmppHost = @"192.168.1.75";
    [LTChatConfig sharedInstance].xmppPort = 8810;
    [LTChatConfig sharedInstance].xmppDomain = @"ms-linuxuat";
    [LTChatConfig sharedInstance].xmppResource = @"iOS";

Messaging

XMPP Messaging

// Message Send
-(void)sendMessage:(NSString*)msg{
    XMPPMessage *message = [XMPPMessage messageWithType:@"chat" to:self.chatJid];
    [message addBody:msg];
    [[LTChatXMPPClient sharedInstance].xmppStream sendElement:message];
}
    // Message Observer
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadChatData) name:kLTCHAT_XMPP_MESSAGE_CHANGE object:nil];

WebRTC Messaging

- (void)didPressWebRTCButton:(UIButton *)sender{
    LTChatWebRTCClient *client = [LTChatWebRTCClient sharedInstance];
    client.myJID = [LTChatXMPPClient sharedInstance].xmppStream.myJID.full;
    client.remoteJID = self.chatJID.full;
    [client showRTCViewByRemoteName:self.chatJID.full isVideo:YES isCaller:YES];
}

Upcoming features

  • Pod support
  • Chat Message UI
  • Video Call UI

Screenshots

LTChat
LTChat

Release Log

  • v0.0.2
    • 2017/10/20 Pod Support
  • v0.0.1
    • 2017/10/16 Project Initialization

License

MIT License

Copyright (c) 2017 liangtong

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Latest podspec

{
    "name": "LTChat",
    "version": "0.0.3",
    "summary": "Chat use XMPP framework and WebRTC framework.",
    "description": "Base on XMPP framework and WebRTC framework. First release.",
    "homepage": "https://github.com/l900416/LTChat",
    "license": "MIT",
    "authors": {
        "liangtong": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/l900416/LTChat.git",
        "tag": "0.0.3"
    },
    "source_files": [
        "LTChat",
        "LTChat/**/*.{h,m}"
    ],
    "public_header_files": "LTChat/**/*.h",
    "resources": [
        "LTChat/LTChat.bundle",
        "LTChat/**/*.{xib}"
    ],
    "frameworks": [
        "Foundation",
        "UIKit",
        "CFNetwork",
        "CoreData",
        "CoreLocation",
        "Security",
        "SystemConfiguration"
    ],
    "requires_arc": true,
    "dependencies": {
        "XMPPFramework": [
            "~> 3.7.0"
        ],
        "WebRTC": [
            "~> 61.5.19063"
        ]
    },
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This