Applozic UI Kit in Swift

Overview

Applozic's LOGO

Official iOS Swift SDK for Chat ๐Ÿ’ฌ

Platform Platform GitHub repo size GitHub contributors GitHub stars Twitter Follow

Introduction ๐ŸŒ€

Applozic brings real-time engagement with chat, video, and voice to your web, mobile, and conversational apps. We power emerging startups and established companies with the most scalable and powerful chat APIs, enabling application product teams to drive better user engagement, and reduce time-to-market.

Customers and developers from over 50+ countries use us and love us, from online marketplaces and eCommerce to on-demand services, to Education Tech, Health Tech, Gaming, Live-Streaming, and more.

Our feature-rich product includes robust client-side SDKs for iOS, Android, React Native, and Flutter. We also support popular server-side languages, a beautifully customizable UI kit, and flexible platform APIs.

Chat, video, and audio-calling have become the new norm in the post-COVID era, and we're bridging the gap between businesses and customers by delivering those exact solutions.

Table of Contents ๐Ÿ”ฐ

Prerequisites ๐Ÿ”ฎ

  • Install the following:
  • Make sure that your project meets these requirements:
  • Your project must target iOS 10 or later.
  • Set up a physical or simulator iOS device to run your app

Quick Start ๐Ÿš€

Setting up Xcode project

  • Open Xcode Create a new project Select App and Click Next
  • Set the Product Name as per your preference (we will name it as applozic-first-app) and click Next and Select folder then Create.

1. Setup

Include the ApplozicSwift SDK for iOS in an Existing Application

The iOS ApplozicSwift SDK can be installed using CocoaPods or Swift Package Manager, as you prefer.

Install ApplozicSwift with CocoaPods

ApplozicSwift is available through CocoaPods. To install it

  1. Open Terminal
  2. Navigate to the root directory of your Project (the directory where your *.xcodeproj file is)
  3. Run command
pod init

Again go to your Project's root directory, click on the "Podfile" to open. Copy-paste the following code in the file and Save

source 'https://github.com/CocoaPods/Specs'
use_frameworks!  # Required to add 
platform :ios, '10.0'

target 'TARGET_NAME' do
pod 'ApplozicSwift'  # Required to add 
end
  1. Go to your project directory where Podfile there run pod install or pod update from terminal to refresh the CocoaPods dependencies.

  2. Open your project newly generated *.xcworkspace or existing and build your project.

Install ApplozicSwift with Swift Package Manager

Install via Xcode

  1. In Xcode, install the ApplozicSwift SDK by navigating to File > Swift Packages > Add Package Dependencyโ€ฆ

  2. In the prompt that appears, select the ApplozicSwift GitHub repository:

https://github.com/AppLozic/ApplozicSwift.git
  1. Select the version of ApplozicSwift you want to use. For new projects, we recommend using the newest version of ApplozicSwift.

  2. Once you click the Next button Select the ApplozicSwift package product and it will look like below and click finish.

here

Add Permissions

App Store requires any app which accesses camera, contacts, gallery, location, a microphone to add the description of why does your app needs to access these features.

In the Info.plist file of your project. Please add the following permissions

<key>NSCameraUsageDescription</key>
<string>Allow Camera</string>
<key>NSContactsUsageDescription</key>
<string>Allow Contacts</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Allow location sharing!!</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allow MicroPhone</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Allow Photos</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Allow write access</string>

Importing Methods for Authentication

The method file that we need here is ALChatManager files.

  1. Download the ALChatManager.swift here
  2. Add the downloaded ALChatManager.swift in your project by clicking on Add Files option on any folder
  3. Open ALChatManager.swift file in your Xcode and Replace "applozic-sample-app" with your App ID from here

2. Register/Login the User

The authentication process allows you to create users or log them into chat whenever necessary. This is usually done along with the login or registration of users within your app i.e. within the login or register buttons in your app.

let alUser : ALUser =  ALUser()
alUser.applicationId = <PASS_YOUR_APP_ID_HERE>
alUser.userId = "demoUserId" // NOTE : +,*,? and space are not allowed chars in userId.
alUser.email = "[email protected]"
alUser.imageLink = ""  // User's profile image link.
alUser.displayName = "DemoUserName"  // User's Display Name
alUser.password = "testpassword" //User password

//Saving these details
ALUserDefaultsHandler.setUserAuthenticationTypeId(Int16(APPLOZIC.rawValue))

//Registering or Login in the User
ALChatManager.shared.connectUser(alUser, completion: { response, error in
    if error != nil {
        print("Error while logging \(String(describing: error))")
    } else {
        print("Successfull login")
    }
})

Note: Another thing you must understand is, in case of ApplozicSwift SDK both Registering a new user and loging in an existing user has the same process and code.

4. Opening a conversation and sending the first message

Implement the following code at the event or Button action designated for opening a one to one conversation for sending a message Pass the RECIPIENT-USERID

ALChatManager.shared.launchChatWith(contactId: <RECIPIENT-USERID>, from: self)

5. Launch chat list

Implement the following code at the event or Button action designated for showing chat list screen.

ALChatManager.shared.launchChatList(from: self)

5. Logout user

On logout of your app you need to logout the applozic user as well use the below method to logout the user:

ALChatManager.shared.logoutUser { _ in
   print("Logout successfully")
}

Documentation

We recommend to go through some basic documentation for ApplozicSwift Chat & Messaging SDK Documentation ๐Ÿ“

Announcements ๐Ÿ“ข

All updates to this library are documented in our releases. For any queries, feel free to reach out us at [email protected]

Roadmap ๐Ÿšฆ

If you are interested in the future direction of this project, please take a look at our open issues and pull requests.
We would โค๏ธ to hear your feedback.

Features ๐ŸŽŠ

  • One to one and Group Chat
  • Image capture
  • Photo sharing
  • Location sharing
  • Push notifications
  • In App notifications
  • Online presence
  • Last seen at
  • Unread message count
  • Typing indicator
  • Message sent
  • Read Recipients and Delivery report
  • Offline messaging
  • User block/unblock
  • Multi Device sync
  • Application to user messaging
  • Customized chat bubble
  • UI Customization Toolkit
  • Cross Platform Support(iOS, Android & Web)

About & Help/Support ๐ŸŒˆ

We provide support over at StackOverflow when you tag using applozic, ask us anything.

  • Applozic is the best iOS chat sdk for instant messaging, still not convinced?
  • Write to us at [email protected]
  • We will be happy to schedule a demo for you.
  • Special plans for startup and open source contributors.

License โœ”๏ธ

This code library fully developed and supported by Applozic's team of contributors ๐Ÿ˜Ž and licensed under the BSD-3 Clause License.

You might also like...
2048 for Swift

swift-2048 A working port of iOS-2048 to Apple's new Swift language. Like the original Objective-C version, swift-2048 does not rely upon SpriteKit. S

Learn Swift interactively on your iPhone.
Learn Swift interactively on your iPhone.

Unwrap is an app that helps you learn Swift faster and more effectively. At its core lies almost 100 video lessons that teach all the fundamentals of

โ–ถ๏ธ video player in Swift, simple way to play and stream media on iOS/tvOS

Player Player is a simple iOS video player library written in Swift. Looking for an obj-c video player? Check out PBJVideoPlayer (obj-c). Looking for

SushiMarketingApp - Sushi Marketing App Built With Swift
SushiMarketingApp - Sushi Marketing App Built With Swift

SushiMarketingApp Sushi E-Commerce App Language: Swift and Objective-C Database:

TwitchIRC - A Swift package for parsing/serializing Twitch IRC messages

TwitchIRC A Swift package to take of parsing/serializing Twitch IRC messages for

Elegant SVG animation kit for swift
Elegant SVG animation kit for swift

Elephant This is SVG animation presentation kit for iOS. Example You can run example app. Please open Example-iOS/Elephant-iOS.xcworkspace! Usage You

A Swift Formatter Kit
A Swift Formatter Kit

Format A Swift formatter kit. Simple formatting syntax for decimal numbers, currency, mass, addresses, ordinal numbers and hexadecimal colors. Usage I

A Lightweight But Powerful Color Kit (Swift)
A Lightweight But Powerful Color Kit (Swift)

BCColor A lightweight but powerful color kit (Swift) Features Pick Colors From Image Generate Monochrome Image Support Hex Color Style Lighten / Darke

A Swift Reactive Programming Kit
A Swift Reactive Programming Kit

ReactiveKit is a lightweight Swift framework for reactive and functional reactive programming that enables you to get into the reactive world today. T

Small swift events kit

CoreEvents Small Swift events kit that provides some base types of events: FutureEvent PresentEvent PastEvent FutureEvent Simple event. Provides class

Swift UI Kit to present clean modal/alert
Swift UI Kit to present clean modal/alert

CleanyModal is a good way to use UI-Customised alerts with ease Features Present some kind of clean alerts (With same API as UIAlertViewController) Ad

Swift Starter Kit with Firebase & Facebook Login Onboarding
Swift Starter Kit with Firebase & Facebook Login Onboarding

iOS Swift Starter Kit ๐Ÿš€ ๐Ÿš€ ๐Ÿ”ฅ ๐Ÿ”ฅ Boilerplate Onboarding App in Swift with Firebase Integration, Facebook Login and Push Notifications. Save days of a

VEditorKit - Lightweight and Powerful Editor Kit built on Texture(AsyncDisplayKit)
VEditorKit - Lightweight and Powerful Editor Kit built on Texture(AsyncDisplayKit)

VEditorKit provides the most core functionality needed for the editor. Unfortunately, When combined words are entered then UITextView selectedRange will changed and typingAttribute will cleared. So, In combined words case, Users can't continue typing the style they want.

Kit for building custom gauges + easy reproducible Apple's style ring gauges.
Kit for building custom gauges + easy reproducible Apple's style ring gauges.

GaugeKit ##Kit for building custom gauges + easy reproducible Apple's style ring gauges. - Example Usage Open GaugeKit.xcworkspace and change the sch

iOS SwiftUI starter kit based on Sketch Elements.
iOS SwiftUI starter kit based on Sketch Elements.

iOS Sketch Elements iOS Sketch Elements is iOS SwiftUI starter kit based on Sketch Elements. More information and screenshots here. Roadmap General Na

App Design Kit is a collection of beautifully designed, ready-to-use, iOS app template screens.
App Design Kit is a collection of beautifully designed, ready-to-use, iOS app template screens.

App Design Kit is a collection of beautifully designed, ready-to-use, iOS app template screens. This well-structured, Swift coded, UI Kit bundle helps you to create your own application much faster than starting from scratch, using a simple design file.

EU Digital COVID Certificate Kit for the Apple Platform ๏ฃฟ (unofficial)
EU Digital COVID Certificate Kit for the Apple Platform ๏ฃฟ (unofficial)

EU Digital COVID Certificate Kit A Swift Package to decode, verify and validate EU Digital COVID Certificates for iOS, tvOS, watchOS and macOS Disclai

a custom language construction kit

Swifties a custom language construction kit intro Swifties aims to provide a flexible toolkit for creating custom languages in Swift. demo A custom Li

a collectionView made for Sprite Kit
a collectionView made for Sprite Kit

CollectionNode A collectionView made for Sprite Kit installation Carthage Carthage is a dependency manager that provides binary frameworks for your pr

Releases(6.5.0)
  • 6.5.0(Feb 2, 2022)

    Enhancements

    • Send Post Submitted Data As Message.
    • Added Support for RTL Languages.
    • Added support for text areas in the rich message.
    • Updated the ApplozicCore pod version to 8.4.1 for nullability support.
    Source code(tar.gz)
    Source code(zip)
  • 6.4.0(Sep 28, 2021)

    Project

    • Changed Minimum deployment target version to iOS 12. Minimum Xcode version to Xcode 13 https://github.com/AppLozic/ApplozicSwift/pull/403

    Enhancements

    • Added support for iOS 15.

    Fixes

    • Fixed build issues https://github.com/AppLozic/ApplozicSwift/issues/416 and https://github.com/AppLozic/ApplozicSwift/issues/417 for Xcode 13.
    Source code(tar.gz)
    Source code(zip)
  • 6.3.0(Aug 25, 2021)

    Note: This is an important update because of the MQTT client changes. Please make sure you update.

    Fixes

    • Fixed a potential MQTT retry issue where it was causing an outage on servers.
    Source code(tar.gz)
    Source code(zip)
  • 6.2.1(Aug 19, 2021)

  • 6.2.0(Aug 19, 2021)

  • 6.1.2(Jul 7, 2021)

  • 6.1.1(Jun 22, 2021)

  • 6.1.0(Jun 1, 2021)

    Enhancements

    • Added the group description support.
    • Added the support for showing video thumbnail.

    Fixes

    • Fixed an issue where the back button was not visible for the direct launch of one-to-one or group chat.
    Source code(tar.gz)
    Source code(zip)
  • 6.0.0(Apr 12, 2021)

    Enhancements

    • Added the support for Swift Package Manager.
    • Replaced Applozic with ApplozicCore framework.

    Fixes

    • Fixed the date-time format issue where the calendar submission format for iOS was not same as the web one.
    Source code(tar.gz)
    Source code(zip)
  • 5.15.0(Mar 24, 2021)

  • 5.14.0(Feb 27, 2021)

    Enhancements

    • Added an option to change the number of lines of the card template's description label. Add this line in the didFinishLaunchingWithOptions function of the AppDelegate file and change the line number:
      ALKGenericCardCell.Config.descriptionMaxLines = 5
      
    Source code(tar.gz)
    Source code(zip)
  • 5.13.0(Feb 16, 2021)

  • 5.12.1(Feb 1, 2021)

  • 5.12.0(Jan 18, 2021)

    Enhancements

    • Added an option to show/hide different message menu options.
    • Now, chat bar's attachment color config will be applied to the bottom part of the chat bar as well.
    Source code(tar.gz)
    Source code(zip)
  • 5.11.1(Dec 1, 2020)

    Enhancements

    • Now, time and state will be shown in the 'all buttons' rich message template.
    • Enabled screen transition animations in all the screens.

    Fixes

    • Fixed an issue where back button action in the conversation screen was not opening the correct screen.
    • Fixed an issue where in some cases conversation was not switching when we open it through notification from background.
    Source code(tar.gz)
    Source code(zip)
  • 5.11.0(Oct 27, 2020)

    Enhancements

    • Added config options for changing textviewโ€™s text and placeholder style.
    • Added date picker and text validation support in form template.
    • Added support for setting a pre filled message before launching a chat.
    • New Photos UI for iOS 14+ devices to send images/videos without giving full access to the library.
    Source code(tar.gz)
    Source code(zip)
  • 5.10.2(Oct 6, 2020)

    Fixes

    • Fixed an issue where button tap in form template was not working in iOS 14.
    • Now, sender's profile image and name will be shown in all buttons rich message template.
    Source code(tar.gz)
    Source code(zip)
  • 5.10.1(Sep 25, 2020)

  • 5.10.0(Sep 8, 2020)

    Enhancements

    • Added support for sharing photos saved on iCloud.

    Fixes

    • Fixed an issue where file download/upload was not working when custom service is enabled.
    Source code(tar.gz)
    Source code(zip)
  • 5.9.2(Aug 21, 2020)

  • 5.9.1(Aug 18, 2020)

    Enhancements

    • Increased the line limit of form selection items.

    Fixes

    • Fixed the issue where message metadata was coming as nil in some cases.
    Source code(tar.gz)
    Source code(zip)
  • 5.9.0(Aug 13, 2020)

    Enhancements

    • Added document sharing support.

    Fixes

    • Fixed a crash that occurred in iOS 13.5 after going back from the group detail or document viewer to a conversation thread.
    Source code(tar.gz)
    Source code(zip)
  • 5.8.2(Jul 23, 2020)

  • 5.8.1(Jul 23, 2020)

  • 5.8.0(Jul 15, 2020)

  • 5.7.1(Jul 6, 2020)

  • 5.7.0(Jun 23, 2020)

  • 5.6.0(Jun 8, 2020)

  • 5.5.0(May 25, 2020)

  • 5.4.0(May 7, 2020)

    Enhancements

    • Added support for link preview in chat. See CHANGELOG for more details.

    Fixes

    • Fixed an issue where back button was not present when opening a conversation through search.
    • Fixed a crash that could happen when some message updates are delayed.
    • Fixed an issue where group profile was getting removed on group name update.
    Source code(tar.gz)
    Source code(zip)
Owner
Applozic
Chat & Messaging SDK for Web, Mobile and Conversational Apps
Applozic
Swift Library based on AVFoundation that allow to easily add camera feature with custom UI into your project.

Would you like to create your camera same as Snapchat or Instagram? I think this library could help you. Basicly it is a wrapper above AVFoundation th

Taras Chernyshenko 14 Sep 21, 2022
Fully open source text editor for iOS written in Swift.

Edhita Fully open source text editor for iOS written in Swift. http://edhita.bornneet.com/ What Edhita means? Edhita (Romaji) == ใ‚จใƒ‡ใ‚ฃใ‚ฟ (Katakana) == Ed

Tatsuya Tobioka 1.2k Jan 7, 2023
30 mini Swift Apps for self-study

Swift 30 Projects Contents This repo is updated with Swift 5 and compatible with iPhone X: Simple UIKit components UIScrollView, UITableView, UICollec

Soap 7.5k Jan 3, 2023
A Hacker News reader in Swift

SwiftHN A Hacker News reader in Swift using the best features of both the language and iOS 8 latest API (well, that's the end goal) SwiftHN is now ava

Thomas Ricouard 1.7k Dec 24, 2022
Build a Swift App as a designer

DesignerNewsApp Simple iOS client for Designer News, by the creator of Design+Code and the team, written in Swift. Usage Download the repository $ git

Meng To 2.4k Dec 24, 2022
swift implementation of flappy bird. More at fullstackedu.com

FlappySwift An implementation of Flappy Bird in Swift for iOS 8. Notes We're launching a course Game Programming with Swift If you are interested in e

newline (formerly Fullstack.io) 9.5k Dec 29, 2022
Basic app to show how to login with Facebook, Google, Twitter. Created for learning purpose :) using Xcode 9 and Swift 4.0

Social Logins iOS Basic app to show how to login with Facebook, Google, Twitter. Created for learning purpose :) using Xcode 9 and Swift 4.0 Note: Bef

Jogendra 12 Nov 4, 2022
Simple sample of using the VIP (Clean Swift) architecture for iOS

MyAnimeList Simple sample of using the VIP (Clean Swift) architecture for iOS. ViewController: controls the event handling, view life cycle and displa

null 24 Oct 12, 2022
Swift audio synthesis, processing, & analysis platform for iOS, macOS and tvOS

AudioKit AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS (including Catalyst), and tvOS. Installation To add AudioKit

AudioKit 9.5k Jan 5, 2023
A Swift mailing list client for iPhone and iPad

Due to costs and lack of interest, Iโ€™ve had to take down the Charter service. If youโ€™re interested in running your own copy, get in touch and I can se

Matthew Palmer 526 Dec 24, 2022