Git Product home page Git Product logo

swift-chat-demo's Introduction

Skygear Swift Chat Demo

This demo shows you how to create a chat app using Skygear Server with the chat plugin. Using the chat plugin allows you to focus on making your app great rather than backend implementation details.

This demo is implemented in Swift. In this demo, you will see how a Swift app can make use of the SKYKitChat framework to make a simple chat app.

Demonstrated Features

  • User sign-up and log-in using Skygear user account
  • Search for other users using username
  • Create a direct messaging conversation with other users
  • Create a multi-user conversation
  • Add and remove participants
  • Send messages in a conversation
  • Receive messages
  • Show whether messages are received by other users
  • Display a typing indicator when other users are typing

If you want to get an idea of how these features are implemented, you can take a look at MessagesViewController.swift to get an idea. It is where most of the features of the chat demo are implemented.

Getting Started

Before you start, make sure you have Xcode 8 installed. You can get a copy of Xcode from the Mac App Store or from Apple Developer website.

You also need to configure your Skygear Server with the chat plugin. The easiest way to get started is to sign up an account on Skygear Portal. See documentation for details.

To try out this demo:

  1. Clone this repository
  2. Open Swift Chat Demo.xcworkspace using Xcode (do not open with .xcodeproj)
  3. Find and open AppDelegate.swift
  4. In application(_:,didFinishLaunchingWithOptions:), replace the Skygear endpoint address and API key
  5. Run the project to build and run the app

Here is how AppDelegate.swift should look like when you have configured your app with the Skygear Server endpoint and API key:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    // Override point for customization after application launch.

    SKYContainer.default().configAddress("https://your-app-name.skygeario.com")
    SKYContainer.default().configure(withAPIKey: "c4b998d3f2064fc9881db8822fbcd5d7")
    return true
}

swift-chat-demo's People

Contributors

cheungpat avatar david90 avatar mayyuen318 avatar

Watchers

 avatar  avatar

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.