Chat APIs and In-app Messaging SDKs for Developers

Applozic provides Chat APIs and In-app Messaging SDKs for Android, iOS and Web apps to power cross-device, multi-platform rich messaging.
Find comprehensive guides and platform-specific Chat API documentation to get started with In-app Messaging.

Get Started    

iOS

Install Chat on iOS

The following documentation is built to help you with installing our iOS SDK into your project.

We provide 2 iOS SDKs:

  • One is our core (Applozic SDK) SDK which is written in Objective-C. In this SDK, we provide pre-built UI as well as the APIs required to build your own UI from scratch.
  • Another is a complete UI kit(ApplozicSwift SDK) written in Swift and it's built on top of Applozic SDK. This SDK cannot be used to build your own UI from scratch.

Let's see the difference between both these SDKs.

Features
Applozic SDK
ApplozicSwift SDK

Objective-C Support

YES

YES(Using a swift wrapper file)

Swift Support

YES

YES

Rich messaging support

NO

YES

User-Block feature in UI

YES

NO (APIs are available to build block feature)

Profanity filter

YES

No

Customizations

YES (See this link)

YES (See this link)

Build message UI from scratch using APIs

YES

NO

Modern UI

NO

YES

Support for our upcoming features

NO

YES

Check ApplozicSwift section to use Swift SDK and Applozic section to use Objective-C SDK.

Applozic SDK

Before we begin, please do make sure that

  • Your application is built on iOS 9.0 or above. Since Applozic SDK as of now only supports Version 9.0 or higher
  • You have Xcode 10.2 or later as your IDE to install and run Applozic SDK on iOS.

The Applozic SDK can be installed using the following method

Automated Installation using CocoaPods

In case you are already using Cocoapods, Jump to point 4 of the installation process mentioned below.

For the rest of us, please follow the instructions below

  1. Open Terminal
  2. Navigate to the root directory of your Project
  3. Run command

pod init

  1. Again go to your Project's root directory, click on the "Podfile" to open.

Copy paste the following code anywhere in the file and Save

target 'MyTargetName' do
    use_frameworks!
    pod 'Applozic', '~> 6.15.0'
end
  1. Once done, Run pod install or pod update to refresh the CocoaPods dependencies.
  2. Your installation is now complete.

As a reference, you can download our sample project here ---> ApplozicCocoaPodDemo

This has the pod already installed, feel free to compare it with your project to confirm the same.

Add Framework Manually

This step is needed only when you are not using CocoaPods

Download the latest Applozic Chat framework here and add it to your project.

Framework folder has two frameworks.

  1. Universal framework: Complied for both simulator and real devices.
  2. Archive framework: Complied for real device only. When archiving your app, please use the archive framework.

Add framework to your project:

i) Paste Applozic framework to root folder of your project.

ii) Go to Build Phase.

Expand Embedded frameworks and add the Applozic framework.

dashboard-blank-content

iii) Make sure Always Embed Swift Standard Libraries is YES in the build settings of your project.

Add Permissions

App Store requires any app which accesses camera, contacts, gallery, location, a microphone to add the description of why does your app need 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>
 

This being a mandate from Apple, please do make sure that the following permissions are added to the info.plist file of your project.

Framework generating

This below steps will guild you to generate framework manually for Applozic-iOS-SDK. it has two frameworks
a) Universal framework
b) Archive framework

Universal framework

The universal framework which can run on the simulator and real device but it is not used for uploading to App store

  1. Download Applozic iOS SDK latest version from here:
  2. Open applozicdemo.xcodeproj in Xcode
  3. Select Applozic.xcodeproj from Project Navigator
  4. Select Applozic Framework from Targets list
    a) Find Build Identifier in Identity Section.
  5. Append Your app bundle ID after com.applozic.framework.
    a) i.e. com.applozic.framework.your.bundle.id
  6. Select “Applozic” in Active Schemes.
    a). Select Generic iOS Device while building
  7. Click Edit Scheme... --> Change build Configuration under Run --> Select info section and make it to Debug
  8. Skip install to No in Build settings
  9. Copy the script from link https://raw.githubusercontent.com/AppLozic/Applozic-iOS-SDK/master/universal-framework.sh
    a)Paste this script by selecting Applozic.xcodeproj--> Applozic TARGETS --> Build Phases -->Expand Run script.
  10. Clean & Build.
  11. After build success, it will open folder as per this below image select Applozic.framework and use it in your project

Archive framework

The archive framework which only runs on the real device and this archive framework is used for uploading to App store

  1. Download Applozic iOS SDK latest version from here:
  2. Open applozicdemo.xcodeproj in Xcode
  3. Select Applozic.xcodeproj from Project Navigator
  4. Select Applozic Framework from Targets list
    a) Find Build Identifier in Identity Section.
  5. Append Your app bundle ID after com.applozic.framework.
    a) i.e. com.applozic.framework.your.bundle.id
  6. Select “Applozic” in Active Schemes.
    a). Select Generic iOS Device while building
  7. Click Edit Scheme... --> Change build Configuration under Run --> Select info section and make it to Release
  8. Make Skip install to No in Build settings.
  9. Delete the DerivedData folder from
    a) Go to Xcode preference > Locations
    b) Tap on Derived data arrow and delete the DerivedData folder
  10. Clean & Build.
  11. Go to Xcode preference > Locations
    a) Tap on Derived data arrow.
    b) Find Framework in the directory as per this image

What's Next

Authentication

Applozic Swift UIKit

Before we begin, please do make sure that

  • Your application is built on iOS 10.0 or above. Since ApplozicSwift SDK as of now only supports Version 10.0 or higher
  • You have Xcode 10.2+ or later as your IDE to install and run ApplozicSwift SDK on iOS.
  • For Swift versions :: < 4.0 - Use SDK version below 1.1.0 and For Swift version >= 4.0 - Use framework version starting from 1.1.0

Installation using CocoaPods

  1. Open Terminal
  2. Navigate to the root directory of your Project
  3. Run command

pod init

  1. Again go to your Project's root directory, click on the "Podfile" to open.

Copy paste the following code anywhere in the file and Save

target 'MyTargetName' do
    use_frameworks!
    pod 'ApplozicSwift'
end
  1. Once done, Run pod install or pod update to refresh the CocoaPods dependencies.
  2. Add these permissions in the Info.plist file.
  3. Your installation is now complete.

What's Next

Authentication

iOS


Install Chat on iOS

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.