Code Monkey home page Code Monkey logo

skygearchat-ios-demo's Introduction

Skygear Chat iOS Demo

This iOS Demo is written in Swift and is powered by Skygear and Skygear Chat.

Skygear Introduction

Skygear is an open source back-end-as-a-service that speeds up app development. SkyChat is a module under Skygear and has all the messaging features a chat app usually needs.

Screenshot

Features Demonstrated

User athentication

  • User sign up and login
  • User logout

Conversation creation

  • Create 1 to 1 conversation
  • Create Group conversation

Conversation list

  • Get all conversations of a users
  • Show unread counts of a conversation

Conversation view (from UI kit)

  • Load messages from conversations (chat history)
  • Send text messages
  • Message receipt status
  • Typing indicator
  • Send photo messages
  • Send voice messages
  • Edit messages
  • Delete messages

Conversation setting

  • Leave Conversations
  • Add Users to Conversations
  • Remove Users from Conversations
  • Add admin
  • Remove admin

Notification

  • Push notification for new messages
  • Mute conversation's notification

Installation Guide

  1. Clone the project

    git clone [email protected]:skygear-demo/SkygearChat-iOS-Demo.git
    

    If you are using Xcode 8, please clone the xcode-8 branch.

    git clone -b xcode-8 [email protected]:skygear-demo/SkygearChat-iOS-Demo.git
    
  2. Install dependancies

    pod install
    
  3. Open Swift Chat Demo 2.xcworkspace

skygearchat-ios-demo's People

Contributors

carmenlau avatar cheungpat avatar howawong avatar mayyuen318 avatar rickmak avatar steven-chan avatar tensiuyan avatar tszkanlo avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

skygearchat-ios-demo's Issues

Duplicated user conversation

screen shot 2017-10-17 at 12 54 29 am

User A (testfrommay) has a conversation with user B(maytest). When he/she once again click on user B, new conversation should not be created but direct he/she to the original chat room

App Crash after clicking user's conversation

App crashing after clicking user's conversation. (This bug has been seen after the commit 'Rename file and remove unnecessary file' ><)

2017-10-20 00:56:03.216808+0800 Swift Chat Demo 2[12966:1132882] [MC] Lazy loading NSBundle MobileCoreServices.framework
2017-10-20 00:56:03.219186+0800 Swift Chat Demo 2[12966:1132882] [MC] Loaded MobileCoreServices.framework
2017-10-20 00:56:03.278304+0800 Swift Chat Demo 2[12966:1132882] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/mayyeung/Library/Developer/CoreSimulator/Devices/92BEB4D0-8E51-4760-9457-33A8174A0E2F/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-10-20 00:56:03.293732+0800 Swift Chat Demo 2[12966:1132882] [Warning] Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a tableview cell's content view. We're considering the collapse unintentional and using standard height instead.
2017-10-20 00:56:04.056805+0800 Swift Chat Demo 2[12966:1132882] [MC] Reading from private effective user settings.
2017-10-20 00:56:13.138948+0800 Swift Chat Demo 2[12966:1138420] User logged in with UserRecordID 3ade1b07-9a5f-46e5-a518-ca2e2bcc8143.
2017-10-20 00:56:14.408910+0800 Swift Chat Demo 2[12966:1132882] Received response = {
    conversations =     (
                {
            "_access" =             (
                                {
                    level = write;
                    role = "conversation-admin-ff57eceb-41ec-41ec-a8c6-0cc1fbf1534e";
                },
                                {
                    level = read;
                    role = "conversation-participant-ff57eceb-41ec-41ec-a8c6-0cc1fbf1534e";
                }
            );
            "_created_at" = "2017-10-18T10:12:44.528524Z";
            "_created_by" = "cb301e92-e324-42a9-8683-34c36fa5289f";
            "_id" = "conversation/ff57eceb-41ec-41ec-a8c6-0cc1fbf1534e";
            "_ownerID" = "cb301e92-e324-42a9-8683-34c36fa5289f";
            "_updated_at" = "2017-10-18T10:12:44.528524Z";
            "_updated_by" = "cb301e92-e324-42a9-8683-34c36fa5289f";
            "admin_ids" =             (
                "cb301e92-e324-42a9-8683-34c36fa5289f"
            );
            "distinct_by_participants" = 1;
            "last_message" = "<null>";
            "last_message_ref" = "<null>";
            "last_read_message" = "<null>";
            "last_read_message_ref" = "<null>";
            "participant_ids" =             (
                "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143",
                "cb301e92-e324-42a9-8683-34c36fa5289f"
            );
            title = may;
            "unread_count" = 0;
        },
                {
            "_access" =             (
                                {
                    level = write;
                    role = "conversation-admin-33cb0d39-5ac2-498c-bf23-d46ff75394a3";
                },
                                {
                    level = read;
                    role = "conversation-participant-33cb0d39-5ac2-498c-bf23-d46ff75394a3";
                }
            );
            "_created_at" = "2017-10-18T10:05:35.729515Z";
            "_created_by" = "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143";
            "_id" = "conversation/33cb0d39-5ac2-498c-bf23-d46ff75394a3";
            "_ownerID" = "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143";
            "_updated_at" = "2017-10-18T10:05:35.729515Z";
            "_updated_by" = "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143";
            "admin_ids" =             (
                "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143"
            );
            "distinct_by_participants" = 1;
            "last_message" = "<null>";
            "last_message_ref" = "<null>";
            "last_read_message" = "<null>";
            "last_read_message_ref" = "<null>";
            "participant_ids" =             (
                "1533baec-f9a9-49a7-9421-88ea18324724",
                "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143"
            );
            title = david;
            "unread_count" = 0;
        },
                {
            "_access" =             (
                                {
                    level = write;
                    role = "conversation-admin-e5ac2683-35a6-404b-afb8-cd50cf71fdcf";
                },
                                {
                    level = read;
                    role = "conversation-participant-e5ac2683-35a6-404b-afb8-cd50cf71fdcf";
                }
            );
            "_created_at" = "2017-10-18T07:27:33.835647Z";
            "_created_by" = "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143";
            "_id" = "conversation/e5ac2683-35a6-404b-afb8-cd50cf71fdcf";
            "_ownerID" = "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143";
            "_updated_at" = "2017-10-18T07:27:33.835647Z";
            "_updated_by" = "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143";
            "admin_ids" =             (
                "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143"
            );
            "distinct_by_participants" = 1;
            "last_message" = "<null>";
            "last_message_ref" = "<null>";
            "last_read_message" = "<null>";
            "last_read_message_ref" = "<null>";
            "participant_ids" =             (
                "6213ecb8-fc1d-421f-b1b5-b312f223f9b1",
                "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143"
            );
            title = ten;
            "unread_count" = 0;
        }
    );
}
Fetched Conversations
2017-10-20 00:56:14.468436+0800 Swift Chat Demo 2[12966:1132882] Received response = {
    conversations =     (
                {
            "_access" =             (
                                {
                    level = write;
                    role = "conversation-admin-ff57eceb-41ec-41ec-a8c6-0cc1fbf1534e";
                },
                                {
                    level = read;
                    role = "conversation-participant-ff57eceb-41ec-41ec-a8c6-0cc1fbf1534e";
                }
            );
            "_created_at" = "2017-10-18T10:12:44.528524Z";
            "_created_by" = "cb301e92-e324-42a9-8683-34c36fa5289f";
            "_id" = "conversation/ff57eceb-41ec-41ec-a8c6-0cc1fbf1534e";
            "_ownerID" = "cb301e92-e324-42a9-8683-34c36fa5289f";
            "_updated_at" = "2017-10-18T10:12:44.528524Z";
            "_updated_by" = "cb301e92-e324-42a9-8683-34c36fa5289f";
            "admin_ids" =             (
                "cb301e92-e324-42a9-8683-34c36fa5289f"
            );
            "distinct_by_participants" = 1;
            "last_message" = "<null>";
            "last_message_ref" = "<null>";
            "last_read_message" = "<null>";
            "last_read_message_ref" = "<null>";
            "participant_ids" =             (
                "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143",
                "cb301e92-e324-42a9-8683-34c36fa5289f"
            );
            title = may;
            "unread_count" = 0;
        },
                {
            "_access" =             (
                                {
                    level = write;
                    role = "conversation-admin-33cb0d39-5ac2-498c-bf23-d46ff75394a3";
                },
                                {
                    level = read;
                    role = "conversation-participant-33cb0d39-5ac2-498c-bf23-d46ff75394a3";
                }
            );
            "_created_at" = "2017-10-18T10:05:35.729515Z";
            "_created_by" = "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143";
            "_id" = "conversation/33cb0d39-5ac2-498c-bf23-d46ff75394a3";
            "_ownerID" = "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143";
            "_updated_at" = "2017-10-18T10:05:35.729515Z";
            "_updated_by" = "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143";
            "admin_ids" =             (
                "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143"
            );
            "distinct_by_participants" = 1;
            "last_message" = "<null>";
            "last_message_ref" = "<null>";
            "last_read_message" = "<null>";
            "last_read_message_ref" = "<null>";
            "participant_ids" =             (
                "1533baec-f9a9-49a7-9421-88ea18324724",
                "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143"
            );
            title = david;
            "unread_count" = 0;
        },
                {
            "_access" =             (
                                {
                    level = write;
                    role = "conversation-admin-e5ac2683-35a6-404b-afb8-cd50cf71fdcf";
                },
                                {
                    level = read;
                    role = "conversation-participant-e5ac2683-35a6-404b-afb8-cd50cf71fdcf";
                }
            );
            "_created_at" = "2017-10-18T07:27:33.835647Z";
            "_created_by" = "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143";
            "_id" = "conversation/e5ac2683-35a6-404b-afb8-cd50cf71fdcf";
            "_ownerID" = "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143";
            "_updated_at" = "2017-10-18T07:27:33.835647Z";
            "_updated_by" = "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143";
            "admin_ids" =             (
                "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143"
            );
            "distinct_by_participants" = 1;
            "last_message" = "<null>";
            "last_message_ref" = "<null>";
            "last_read_message" = "<null>";
            "last_read_message_ref" = "<null>";
            "participant_ids" =             (
                "6213ecb8-fc1d-421f-b1b5-b312f223f9b1",
                "3ade1b07-9a5f-46e5-a518-ca2e2bcc8143"
            );
            title = ten;
            "unread_count" = 0;
        }
    );
}
Fetched Conversations
2017-10-20 00:56:16.142377+0800 Swift Chat Demo 2[12966:1132882] Unknown class _TtC17Swift_Chat_Demo_214ViewController in Interface Builder file.
Could not cast value of type 'UIViewController' (0x10920abe0) to 'Swift_Chat_Demo_2.CustomSKYChatConversationViewController' (0x105ee9ad8).
2017-10-20 00:56:16.152723+0800 Swift Chat Demo 2[12966:1132882] Could not cast value of type 'UIViewController' (0x10920abe0) to 'Swift_Chat_Demo_2.CustomSKYChatConversationViewController' (0x105ee9ad8).
(lldb) 

Add a 'setting page' to group conversation

In a group conversation 'setting page', users can

  • View group name and group photo
  • View all users in the group. Admins will have a star next to his name.
  • Mute notification (on-off switch)
  • Leave group

Admin specific:

  • Add participant to the group
  • Delete a participant
  • Mark a participant as an admin

Wireframes:
skygeatchat.pdf

Update unread counts

The unread counts bugs has been fixed. Upgrade the app to 1.1.2 at the developer portal to get the latest release.

Message status is shown as "Failed" for a few seconds after sending new messages

This is a bug after updating the chat SDK that has local cache for messages. Before this sdk update, the conversation view does not show "Failed" message status.

  • the "Failed" status only stays for a few seconds
  • the "Failed" status is real, i.e. server DID return error for the send message request, but the message is actually added to the db

App info at this moment:
app endpoint: https://chatdemoapp.skygeario.com/
version: 1.1.3 (The update to latest version button is available)

Push notification

Users should receive a push notification when there is new message.

Grouping to be implemented later.

Conversation view incorrect top spacing a few seconds after messages are fetched

This is a bug after updating the chat SDK that has local cache for messages.

This is different with #23.

  • only happens the first time after entering the page, i.e. not happening in load more
  • not happening in chat sdk example, i suspect its because this project is using storyboard, and the content inset of the collection view is different in the two projects

screen shot 2017-12-01 at 4 35 38 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.