Installation

The following documentation is built to help you with installing our iOS SDK into your project. iOS SDK can be installed through either CocoaPods Or Swift package manager

We provide 2 iOS SDKs:
A complete UI kit (ApplozicSwift SDK) written in Swift and it's built on top of ApplozicCore SDK. This SDK cannot be used to build your own UI from scratch.
One is our core (ApplozicCore) SDK. In this SDK, we provide Core APIs required 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

Get Your AppID from Applozic console

Sign Up or Sign in to Applozic console website here to get your own AppID that will be used for integrating Applozic in your own Project

You can get the Application ID from setting section of console here.

Applozic Swift UIKit

This installation is for the Pre-build UIKit of ApplozicSwift iOS SDK.

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

Prerequisites

Install the following:

  • Xcode 13.0 or later
  • CocoaPods 1.9.0 or later

Make sure that your project meets these requirements:

  • Your project must target iOS 12 or later.
  • Set up a physical or simulator iOS device to run your app.

Automated Installation using 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
  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

source 'https://github.com/CocoaPods/Specs'
     use_frameworks!  # Required to add 
     platform :ios, '12.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.

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

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

Installation using Swift Package Manager

🚧

This step is needed only when you are not using CocoaPods.

Make sure to use only one either CocoaPods or Swift Package Manager don't use both that can cause issues.

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

  3. Select the version of ApplozicSwift you want to use. For new projects, we recommend using the newest version of ApplozicSwift.

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

Installation using ApplozicSwift iOS SDK import

Use the below import for accessing the methods and class inside the ApplozicSwift iOS SDK

@import ApplozicSwift;
import ApplozicSwift

Add Permissions

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

📘

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

Applozic Core Custom UI

This installation is for the custom UI of Applozic Core SDK.

The iOS Applozic Core SDK can be installed using CocoaPods or Swift package manager, as you prefer.

Prerequisites

Install the following:

  • Xcode 12.0 or later
  • CocoaPods 1.9.0 or later
    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.

Installation using Cocoapods

ApplozicCore 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
  1. 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 'ApplozicCore'  # 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.
    Open your project newly generated *.xcworkspace or existing and build your project.

Installation using Swift Package Manager

🚧

This step is needed only when you are not using CocoaPods.

Make sure to use only one either CocoaPods or Swift Package Manager don't use both that can cause issues.

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 ApplozicCore GitHub repository:
    https://github.com/AppLozic/Applozic-Chat-iOS-Framework.git

  3. Select the version of ApplozicCore you want to use. For new projects, we recommend using the newest version of ApplozicCore.

  4. Once you click the Next button Select the ApplozicCore package product and it will look like below screenshot and click finish.

Installation using ApplozicCore iOS SDK import

Use the below import for accessing the methods and class inside the ApplozicCore iOS SDK

import ApplozicCore
@import ApplozicCore;

Did this page help you?