Skip to content

Commit cf5bcc6

Browse files
Release 0.1.3
1 parent 0b9c360 commit cf5bcc6

File tree

2 files changed

+202
-22
lines changed

2 files changed

+202
-22
lines changed

Package.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,5 @@ let package = Package(
4242
"QuickBloxData",
4343
"QuickBloxLog"],
4444
resources: [.process("Resources")]),
45-
.testTarget(
46-
name: "QuickBloxUIKitIntegrationTests",
47-
dependencies: ["QuickBloxUIKit",
48-
"QuickBloxData",
49-
"QuickBloxLog",
50-
.product(name: "Quickblox",
51-
package: "ios-quickblox-sdk")],
52-
resources: [.process("Resources")]),
5345
]
5446
)

README.md

Lines changed: 202 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
<div align="center">
2-
3-
<p>
4-
<a href="https://discord.gg/c6bxq9BC"><img src="https://img.shields.io/discord/1042743094833065985?color=5865F2&logo=discord&logoColor=white&label=QuickBlox%20Discord%20server&style=for-the-badge" alt="Discord server" /></a>
5-
</p>
6-
7-
</div>
8-
91
# Overview
102

113
The QuickBlox UIKit for iOS is a comprehensive user interface kit specifically designed for building chat applications. It provides a collection of pre-built components, modules, and utilities that simplify the process of creating chat applications.
@@ -14,10 +6,9 @@ The main goal of the QuickBlox UIKit for iOS is to offer developers a streamline
146

157
The QuickBlox UIKit for iOS offers modules that encapsulate complex chat functionalities, such as dialogs and chat management and real-time updates. These modules provide a simplified interface for integrating chat features into applications without the need for extensive knowledge of the underlying protocols or server-side infrastructure.
168

17-
## Screenshots
18-
![ios-doc](https://github.com/QuickBlox/ios-ui-kit/assets/42934399/c3431110-a92e-41f2-90eb-89238869e6cc)
199
## Features
2010

11+
- QuickBlox UIKit for iOS provides next functionality:
2112
- List of dialogs
2213
- Create dialog(Private or Group)
2314
- Dialog screen
@@ -96,9 +87,9 @@ The QuickBlox UIKit for iOS allows you to create your own unique view of the UIK
9687

9788
The QuickBlox UIKit for iOS by default supports Light and Dark themes, which theme will be applied depending on device settings.
9889

99-
## Use your own theme
90+
## Use your own Color theme
10091

101-
You can create and use your own theme. To do this you need to create class that implements QuickBloxUIKit.ThemeColorProtocol
92+
You can create and use your own color theme. To do this you need to create class that implements QuickBloxUIKit.ThemeColorProtocol
10293

10394
```
10495
class CustomThemeColor: QuickBloxUIKit.ThemeColorProtocol {
@@ -125,13 +116,210 @@ class CustomThemeColor: QuickBloxUIKit.ThemeColorProtocol {
125116
init() {}
126117
}
127118
```
119+
## Use your own String theme
120+
121+
You can create and use your own string theme. To do this you need to create class that implements QuickBloxUIKit.ThemeStringProtocol
122+
123+
```
124+
public class CustomThemeString: ThemeStringProtocol {
125+
public var dialogsEmpty: String = String(localized: "dialog.items.empty")
126+
public var usersEmpty: String = String(localized: "dialog.members.empty")
127+
public var messegesEmpty: String = String(localized: "dialog.messages.empty")
128+
129+
public var privateDialog: String = String(localized: "dialog.type.private")
130+
public var groupDialog: String = String(localized: "dialog.type.group")
131+
public var publicDialog: String = String(localized: "dialog.type.group")
132+
133+
public var typingOne: String = String(localized: "dialog.typing.one")
134+
public var typingTwo: String = String(localized: "dialog.typing.two")
135+
public var typingFour: String = String(localized: "dialog.typing.four")
136+
137+
public var enterName: String = String(localized: "alert.actions.enterName")
138+
public var nameHint: String = String(localized: "dialog.name.hint")
139+
public var create: String = String(localized: "dialog.name.create")
140+
public var next: String = String(localized: "dialog.name.next")
141+
public var search: String = String(localized: "dialog.name.search")
142+
public var edit: String = String(localized: "dialog.info.edit")
143+
public var members: String = String(localized: "dialog.info.members")
144+
public var notification: String = String(localized: "dialog.info.notification")
145+
public var searchInDialog: String = String(localized: "dialog.info.searchInDialog")
146+
public var leaveDialog: String = String(localized: "dialog.info.leaveDialog")
147+
148+
public var you: String = String(localized: "dialog.info.you")
149+
public var admin: String = String(localized: "dialog.info.admin")
150+
public var typeMessage: String = String(localized: "dialog.action.typeMessage")
151+
152+
public var dialogs: String = String(localized: "screen.title.dialogs")
153+
public var dialog: String = String(localized: "screen.title.dialog")
154+
public var dialogType: String = String(localized: "screen.title.dialogType")
155+
public var newDialog: String = String(localized: "screen.title.newDialog")
156+
public var createDialog: String = String(localized: "screen.title.createDialog")
157+
public var addMembers: String = String(localized: "screen.title.addMembers")
158+
public var dialogInformation: String = String(localized: "screen.title.dialogInformation")
159+
160+
public var add: String = String(localized: "alert.actions.add")
161+
public var dialogName: String = String(localized: "alert.actions.dialogName")
162+
public var changeImage: String = String(localized: "alert.actions.changeImage")
163+
public var changeDialogName: String = String(localized: "alert.actions.changeDialogName")
164+
165+
public var photo: String = String(localized: "alert.actions.photo")
166+
public var removePhoto: String = String(localized: "alert.actions.removePhoto")
167+
public var camera: String = String(localized: "alert.actions.camera")
168+
public var gallery: String = String(localized: "alert.actions.gallery")
169+
public var file: String = String(localized: "alert.actions.file")
170+
171+
public var remove: String = String(localized: "alert.actions.remove")
172+
public var cancel: String = String(localized: "alert.actions.cancel")
173+
public var ok: String = String(localized: "alert.actions.ok")
174+
public var removeUser: String = String(localized: "alert.message.removeUser")
175+
public var questionMark: String = String(localized: "alert.message.questionMark")
176+
public var errorValidation: String = String(localized: "alert.message.errorValidation")
177+
public var addUser: String = String(localized: "alert.message.addUser")
178+
public var toDialog: String = String(localized: "alert.message.toDialog")
179+
180+
public var maxSize: String = String(localized: "attachment.maxSize.title")
181+
public var maxSizeHint: String = String(localized: "attachment.maxSize.hint")
182+
public var fileTitle: String = String(localized: "attachment.title.file")
183+
public var gif: String = String(localized: "attachment.title.gif")
184+
185+
public init() {}
186+
}
187+
```
188+
with such default strings:
189+
190+
```
191+
"dialog.items.empty" = "You don’t have any dialogs.";
192+
"dialog.members.empty" = "You don’t have any users.";
193+
"dialog.messages.empty" = "You don’t have any messages.";
194+
"dialog.type.private" = "Private";
195+
"dialog.type.group" = "Group";
196+
"dialog.type.public" = "Public";
197+
"dialog.typing.one" = " is typing...";
198+
"dialog.typing.two" = " are typing...";
199+
"dialog.typing.four" = " and 2 others are typing...";
200+
"dialog.name.hint" = "Use alphanumeric characters and spaces in a range from 3 to 60. Cannot contain more than one space in a row.";
201+
"dialog.name.create" = "Create";
202+
"dialog.name.next" = "Next";
203+
"dialog.name.search" = "Search";
204+
"dialog.name.cancel" = "Cancel";
205+
"dialog.info.edit" = "Edit";
206+
"dialog.info.members" = "Members";
207+
"dialog.info.notification" = "Notification";
208+
"dialog.info.searchInDialog" = "Search in dialog";
209+
"dialog.info.leaveDialog" = "Leave dialog";
210+
"dialog.info.you" = " (You)";
211+
"dialog.info.admin" = "Admin";
212+
"dialog.action.typeMessage" = "Type message";
213+
214+
"screen.title.dialogs" = "Dialogs";
215+
"screen.title.dialog" = "Dialog";
216+
"screen.title.dialogType" = "Dialog type";
217+
"screen.title.newDialog" = "New Dialog";
218+
"screen.title.createDialog" = "Create Dialog";
219+
"screen.title.addMembers" = "Add Members";
220+
"screen.title.dialogInformation" = "Dialog information";
221+
222+
"alert.actions.add" = "Add";
223+
"alert.actions.dialogName" = "Dialog name";
224+
"alert.actions.enterName" = "Enter name";
225+
"alert.actions.changeImage" = "Change image";
226+
"alert.actions.changeDialogName" = "Change dialog name";
227+
"alert.actions.photo" = "Photo";
228+
"alert.actions.removePhoto" = "Remove photo";
229+
"alert.actions.camera" = "Camera";
230+
"alert.actions.gallery" = "Gallery";
231+
"alert.actions.file" = "File";
232+
"alert.actions.remove" = "Remove";
233+
"alert.actions.cancel" = "Cancel";
234+
"alert.actions.ok" = "Ok";
235+
"alert.message.removeUser" = "Are you sure you want to remove ";
236+
"alert.message.questionMark" = "?";
237+
"alert.message.errorValidation" = "Error Validation";
238+
"alert.message.addUser" = "Are you sure you want to add ";
239+
"alert.message.toDialog" = " to this dialog?";
240+
241+
"attachment.maxSize.title" = "The uploaded file exceeds maximum file size (10MB)";
242+
"attachment.maxSize.hint" = "Please select a smaller attachment.";
243+
"attachment.title.file" = "file";
244+
"attachment.title.gif" = "GIF";
245+
```
246+
247+
#### Use Localization to expand the capabilities of your application.
248+
249+
For custom localization, customize your application by adding the necessary localization files. You can learn more about how to do this at the [Apple Documentation](https://developer.apple.com/documentation/xcode/localization).
250+
251+
1. Copy and add to the localization file in your project the necessary string constants from QuickBlox iOS UI Kit. If you do not have a localization file yet, then create it following the guide from [Apple Documentation](https://developer.apple.com/documentation/xcode/localization).
252+
2. [Customize](https://docs.quickblox.com/docs/ios-uikit-customization#use-your-own-string-theme) these constants as you need for your purposes.
253+
3. Create and add the necessary localization files to your project
254+
255+
For example, add a localization file for Spanish to your project:
256+
257+
```
258+
"dialog.items.empty" = "No tiene ningún cuadro de diálogo.";
259+
"dialog.members.empty" = "No tiene ningún usuario.";
260+
"dialog.messages.empty" = "No tiene ningún mensaje.";
261+
"dialog.type.private" = "Privado";
262+
"dialog.type.group" = "Grupo";
263+
"dialog.type.public" = "Público";
264+
"dialog.typing.one" = " está escribiendo...";
265+
"dialog.typing.two" = " están escribiendo...";
266+
"dialog.typing.four" = " y otros 2 están escribiendo...";
267+
"dialog.name.hint" = "Use caracteres alfanuméricos y espacios en un rango de 3 a 60. No puede contener más de un espacio en una fila.";
268+
"dialog.name.create" = "Crear";
269+
"dialog.name.next" = "Siguiente";
270+
"dialog.name.search" = "Buscar";
271+
"dialog.name.cancel" = "Cancelar";
272+
"dialog.info.edit" = "Editar";
273+
"dialog.info.members" = "Miembros";
274+
"dialog.info.notification" = "Notificación";
275+
"dialog.info.searchInDialog" = "Buscar en diálogo";
276+
"dialog.info.leaveDialog" = "Salir del cuadro de diálogo";
277+
"dialog.info.you" = " (usted)";
278+
"dialog.info.admin" = "Admin";
279+
"dialog.action.typeMessage" = "Escribir mensaje";
280+
281+
"screen.title.dialogs" = "Diálogos";
282+
"screen.title.dialog" = "Diálogo";
283+
"screen.title.dialogType" = "Tipo de diálogo";
284+
"screen.title.newDialog" = "Diálogo nuevo";
285+
"screen.title.createDialog" = "Crear diálogo";
286+
"screen.title.addMembers" = "Agregar miembros";
287+
"screen.title.dialogInformation" = "Información de diálogo";
288+
289+
"alert.actions.add" = "Agregar";
290+
"alert.actions.dialogName" = "Nombre del diálogo";
291+
"alert.actions.enterName" = "Ingrese el nombre";
292+
"alert.actions.changeImage" = "Cambiar imagen";
293+
"alert.actions.changeDialogName" = "Cambiar nombre de diálogo";
294+
"alert.actions.photo" = "Foto";
295+
"alert.actions.removePhoto" = "Eliminar foto";
296+
"alert.actions.camera" = "Cámara";
297+
"alert.actions.gallery" = "Galería";
298+
"alert.actions.file" = "Archivo";
299+
"alert.actions.remove" = "Eliminar";
300+
"alert.actions.cancel" = "Cancelar";
301+
"alert.actions.ok" = "Ok";
302+
"alert.message.removeUser" = "¿Está seguro de que desea eliminar ";
303+
"alert.message.questionMark" = "?";
304+
"alert.message.errorValidation" = "Error de validación";
305+
"alert.message.addUser" = "¿Está seguro de que desea agregar ";
306+
"alert.message.toDialog" = "¿a este cuadro de diálogo?";
307+
308+
"attachment.maxSize.title" = "El archivo cargado supera el tamaño máximo de archivo (10 MB)";
309+
"attachment.maxSize.hint" = "Seleccione un archivo adjunto más pequeño.";
310+
"attachment.title.file" = "archivo";
311+
"attachment.title.gif" = "GIF";
312+
```
313+
128314

129315
And use it later to create your own theme
130316

131317
```
132318
var customTheme: CustomTheme = CustomTheme(color: CustomThemeColor(),
133-
font: QuickBloxUIKit.ThemeFont(),
134-
image: QuickBloxUIKit.ThemeImage())
319+
font: QuickBloxUIKit.ThemeFont(),
320+
image: QuickBloxUIKit.ThemeImage(),
321+
string: CustomThemeString())
322+
135323
QuickBloxUIKit.settings.theme = customTheme
136324
```
137325

0 commit comments

Comments
 (0)