UI kit for Applozic SDK, written completely in Swift.
Open source iOS Chat and Messaging SDK that lets you add real time messaging in your mobile (android, iOS) applications and website.
Signup at https://www.applozic.com/signup.html to get the application key.
There's a sample project in the Demo directory. To use it, run pod install
to download the required libraries. Have fun!
This project is actively under development.
For ApplozicSwift, use the following entry in your Podfile:
pod 'ApplozicSwift'
Then run pod install
.
In any file you'd like to use ApplozicSwift in, don't forget to
import the framework with import ApplozicSwift
.
- Open up Terminal,
cd
into your top-level project directory, and run the following command if your project is not initialized as a git repository:
$ git init
- Add ApplozicSwift, Applozic, Kingfisher & MGSwipeTableCell as a git submodule by running the following commands:
$ git submodule add https://github.com/AppLozic/ApplozicSwift
$ git submodule add https://github.com/AppLozic/Applozic-iOS-SDK
$ git submodule add https://github.com/onevcat/Kingfisher.git
$ git submodule add https://github.com/MortimerGoro/MGSwipeTableCell.git
- Open the new
ApplozicSwift
folder, and drag theApplozicSwift.xcodeproj
into the Project Navigator of your application's Xcode project. Do the same with theApplozic.xcodeproj
in theApplozic
folder,Kingfisher.xcodeproj
in theKingfisher
folder andMGSwipeTableCell.xcodeproj
in theMGSwipeTableCell
folder.
They should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter.
-
Verify that the deployment targets of the
xcodeproj
s match that of your application target in the Project Navigator. -
Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar.
-
In the tab bar at the top of that window, open the "General" panel.
-
Click on the
+
button under "Embedded Binaries" again and add the build target you need forApplozicSwift
. -
Click on the
+
button under "Embedded Binaries" again and add the build target you need forApplozic
. -
Click on the
+
button under "Embedded Binaries" again and add the build target you need forKingFisher
. -
Click on the
+
button again and add the correct build target forMGSwipeTableCell
. -
And that's it!
The four frameworks are automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device.
Add the ALChatManager file in your project. It contains the convenient methods required to handle the chat like registration, opening chat list etc.
// Use the same API for login
let alChatManager = ALChatManager(applicationKey: ALChatManager.applicationId as NSString)
alChatManager.registerUser(alUser, completion: {response, error in
if error == nil {
NSLog("[REGISTRATION] Applozic user registration was successful: %@ \(response?.isRegisteredSuccessfully())")
// Launch chat
} else {
NSLog("[REGISTRATION] Applozic user registration error: %@", error.debugDescription)
}
})
let alChatManager = ALChatManager(applicationKey: <Application key>, with: ALKConfiguration())
alChatManager.launchChatList(from: self)
let alChatManager = ALChatManager(applicationKey: <Application key>, configuration: ALKConfiguration())
alChatManager.launchGroupWith(clientGroupId: <groupId>, from: self)
let alChatManager = ALChatManager(applicationKey: <Application key>, configuration: ALKConfiguration())
alChatManager.launchChatWith(contactId: <userId>, from: self)
- iOS 9.0+
- Xcode 8.2+
- Swift 3.0+
We would love you for the contribution to ApplozicSwift, check the LICENSE file for more info.
ApplozicSwift is released under a BSD 3-Clause. See LICENSE for more information.