Skip to content

Commit 5482438

Browse files
Quickblox SDK 2.20.0 (#1373)
* QuickBlox iOS SDK 2.20.0 Added: - AI Translate - AI Answer Assist - Mac Catalyst support * Update LICENSE format * LICENSE * Update README.md * Update Quickblox_LICENSE.md
1 parent e31b792 commit 5482438

File tree

125 files changed

+7323
-42
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+7323
-42
lines changed

Framework/Quickblox.xcframework/Info.plist

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@
55
<key>AvailableLibraries</key>
66
<array>
77
<dict>
8+
<key>BinaryPath</key>
9+
<string>Quickblox.framework/Quickblox</string>
10+
<key>LibraryIdentifier</key>
11+
<string>ios-arm64_x86_64-simulator</string>
12+
<key>LibraryPath</key>
13+
<string>Quickblox.framework</string>
14+
<key>SupportedArchitectures</key>
15+
<array>
16+
<string>arm64</string>
17+
<string>x86_64</string>
18+
</array>
19+
<key>SupportedPlatform</key>
20+
<string>ios</string>
21+
<key>SupportedPlatformVariant</key>
22+
<string>simulator</string>
23+
</dict>
24+
<dict>
25+
<key>BinaryPath</key>
26+
<string>Quickblox.framework/Quickblox</string>
827
<key>LibraryIdentifier</key>
928
<string>ios-arm64</string>
1029
<key>LibraryPath</key>
@@ -17,8 +36,10 @@
1736
<string>ios</string>
1837
</dict>
1938
<dict>
39+
<key>BinaryPath</key>
40+
<string>Quickblox.framework/Versions/A/Quickblox</string>
2041
<key>LibraryIdentifier</key>
21-
<string>ios-arm64_x86_64-simulator</string>
42+
<string>ios-arm64_x86_64-maccatalyst</string>
2243
<key>LibraryPath</key>
2344
<string>Quickblox.framework</string>
2445
<key>SupportedArchitectures</key>
@@ -29,7 +50,7 @@
2950
<key>SupportedPlatform</key>
3051
<string>ios</string>
3152
<key>SupportedPlatformVariant</key>
32-
<string>simulator</string>
53+
<string>maccatalyst</string>
3354
</dict>
3455
</array>
3556
<key>CFBundlePackageType</key>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
//
2+
// AI.h
3+
//
4+
// Created by QuickBlox team
5+
// Copyright (c) 2017 QuickBlox. All rights reserved.
6+
//
7+
8+
#import <Foundation/Foundation.h>
9+
10+
NS_ASSUME_NONNULL_BEGIN
11+
12+
@protocol QBAIAnswerAssistHistoryMessageProtocol;
13+
@protocol QBAIAnswerAssistResultProtocol;
14+
@protocol QBAITranslateResultProtocol;
15+
16+
@interface AI : NSObject
17+
/**
18+
Create answer assist request
19+
20+
@param answerAssist answer assist instance
21+
22+
@return An answer from AI'.
23+
*/
24+
- (void)answerAssistWithSmartChatAssistantId:(NSString *)smartChatAssistantId
25+
messageToAssist:(NSString *)messageToAssist
26+
history:(NSArray<id<QBAIAnswerAssistHistoryMessageProtocol>> *)history
27+
completion:(void (^) (id<QBAIAnswerAssistResultProtocol>result, NSError * _Nullable error))completion;
28+
29+
/**
30+
Create translate request
31+
32+
@param translate translate message instance
33+
34+
@return An answer from AI'.
35+
*/
36+
- (void)translateWithSmartChatAssistantId:(NSString *)smartChatAssistantId
37+
textToTranslate:(NSString *)textToTranslate
38+
languageCode:(NSString *)languageCode
39+
completion:(void (^) (id<QBAITranslateResultProtocol>result, NSError * _Nullable error))completion;
40+
41+
@end
42+
43+
NS_ASSUME_NONNULL_END
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//
2+
// QBAIAnswerAssistHistoryMessage.h
3+
//
4+
// Created by QuickBlox team
5+
// Copyright (c) 2017 QuickBlox. All rights reserved.
6+
//
7+
8+
#import <QuickBlox/QBAIAnswerAssistHistoryMessageProtocol.h>
9+
#import <QuickBlox/QBCEntity.h>
10+
#import <QuickBlox/QBAIRoleType.h>
11+
12+
NS_ASSUME_NONNULL_BEGIN
13+
14+
@protocol QBAIAnswerAssistHistoryMessageProtocol;
15+
16+
/**
17+
QBAIAnswerAssistHistoryMessage class interface.
18+
This class represents QuickBlox Answer Assist History.
19+
*/
20+
@interface QBAIAnswerAssistHistoryMessage : QBCEntity <QBAIAnswerAssistHistoryMessageProtocol, NSCoding, NSCopying>
21+
22+
/**
23+
The role of the message sender. Can be a user or assistant.
24+
*/
25+
@property (readonly) QBAIRoleType role;
26+
27+
/**
28+
Message text in conversation history.
29+
*/
30+
@property (readonly) NSString *message;
31+
32+
// Unavailable initializers
33+
- (id)init NS_UNAVAILABLE;
34+
+ (id)new NS_UNAVAILABLE;
35+
36+
- (instancetype)initWithRole:(QBAIRoleType)role
37+
message:(NSString *)message;
38+
39+
@end
40+
41+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//
2+
// QBAIAnswerAssistHistoryMessageProtocol.h
3+
//
4+
// Created by QuickBlox team
5+
// Copyright (c) 2017 QuickBlox. All rights reserved.
6+
//
7+
8+
#import <QuickBlox/QBAIRoleType.h>
9+
10+
NS_ASSUME_NONNULL_BEGIN
11+
12+
@protocol QBAIAnswerAssistHistoryMessageProtocol <NSObject>
13+
14+
@required
15+
/**
16+
The role of the message sender. Can be a user or assistant.
17+
*/
18+
@property (readonly) QBAIRoleType role;
19+
20+
/**
21+
Message text in conversation history.
22+
*/
23+
@property (readonly) NSString *message;
24+
25+
@end
26+
27+
NS_ASSUME_NONNULL_END
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
//
2+
// QBAIAnswerAssistMessage.h
3+
//
4+
// Created by QuickBlox team
5+
// Copyright (c) 2017 QuickBlox. All rights reserved.
6+
//
7+
8+
#import <QuickBlox/QBCEntity.h>
9+
#import <QuickBlox/QBAIAnswerAssistMessageProtocol.h>
10+
11+
NS_ASSUME_NONNULL_BEGIN
12+
13+
@protocol QBAIAnswerAssistHistoryMessageProtocol;
14+
15+
/**
16+
QBAnswerAssist class interface.
17+
This class represents QuickBlox Answer Assist Message.
18+
*/
19+
@interface QBAIAnswerAssistMessage : QBCEntity <QBAIAnswerAssistMessageProtocol, NSCoding, NSCopying>
20+
21+
/**
22+
ID of Smart Chat Assistan of Your Application in QuickBlox Dashboard.
23+
*/
24+
@property (readonly) NSString *smartChatAssistantId;
25+
26+
/**
27+
Message you want to get answer for.
28+
*/
29+
@property (readonly) NSString *message;
30+
31+
/**
32+
Conversation history. Used to add context.
33+
*/
34+
@property (readonly) NSArray<id<QBAIAnswerAssistHistoryMessageProtocol>> *history;
35+
36+
// Unavailable initializers
37+
- (id)init NS_UNAVAILABLE;
38+
+ (id)new NS_UNAVAILABLE;
39+
40+
- (instancetype)initWithMessage:(NSString *)message
41+
smartChatAssistantId:(NSString *)smartChatAssistantId
42+
history:(NSArray<id<QBAIAnswerAssistHistoryMessageProtocol>> *)history;
43+
44+
- (instancetype)initWithMessage:(NSString *)message
45+
smartChatAssistantId:(NSString *)smartChatAssistantId;
46+
47+
@end
48+
49+
NS_ASSUME_NONNULL_END
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
//
2+
// QBAIAnswerAssistMessageProtocol.h
3+
//
4+
// Created by QuickBlox team
5+
// Copyright (c) 2017 QuickBlox. All rights reserved.
6+
//
7+
8+
#import <Foundation/Foundation.h>
9+
10+
NS_ASSUME_NONNULL_BEGIN
11+
12+
@protocol QBAIAnswerAssistHistoryMessageProtocol;
13+
14+
@protocol QBAIAnswerAssistMessageProtocol <NSObject>
15+
16+
@required
17+
/**
18+
ID of Smart Chat Assistan of Your Application in QuickBlox Dashboard.
19+
*/
20+
@property (readonly) NSString *smartChatAssistantId;
21+
22+
/**
23+
Message you want to get answer for.
24+
*/
25+
@property (readonly) NSString *message;
26+
27+
/**
28+
Conversation history. Used to add context.
29+
*/
30+
@property (readonly) NSArray<id<QBAIAnswerAssistHistoryMessageProtocol>> *history;
31+
32+
@end
33+
34+
NS_ASSUME_NONNULL_END
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//
2+
// QBAIAnswerAssistResult.h
3+
//
4+
// Created by QuickBlox team
5+
// Copyright (c) 2017 QuickBlox. All rights reserved.
6+
//
7+
8+
#import <Quickblox/Quickblox.h>
9+
10+
NS_ASSUME_NONNULL_BEGIN
11+
12+
@protocol QBAIAnswerAssistResultProtocol;
13+
14+
@interface QBAIAnswerAssistResult : QBCEntity <QBAIAnswerAssistResultProtocol, NSCoding, NSCopying>
15+
/**
16+
An answer from AI.
17+
*/
18+
@property (readonly) NSString *answer;
19+
20+
// Unavailable initializers
21+
- (id)init NS_UNAVAILABLE;
22+
+ (id)new NS_UNAVAILABLE;
23+
24+
- (instancetype)initWithAnswer:(NSString *)answer;
25+
26+
@end
27+
28+
NS_ASSUME_NONNULL_END
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// QBAIAnswerAssistResultProtocol.h
3+
//
4+
// Created by QuickBlox team
5+
// Copyright (c) 2017 QuickBlox. All rights reserved.
6+
//
7+
8+
#import <Foundation/Foundation.h>
9+
10+
NS_ASSUME_NONNULL_BEGIN
11+
12+
@protocol QBAIAnswerAssistResultProtocol <NSObject>
13+
14+
@required
15+
/**
16+
An answer from AI.
17+
*/
18+
@property (readonly) NSString *answer;
19+
20+
@end
21+
22+
NS_ASSUME_NONNULL_END
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
//
2+
// QBAILanguage.h
3+
//
4+
// Created by QuickBlox team
5+
// Copyright (c) 2017 QuickBlox. All rights reserved.
6+
//
7+
8+
#import <Foundation/Foundation.h>
9+
10+
typedef NSString *QBAILanguage NS_TYPED_ENUM;
11+
extern QBAILanguage const _Nullable QBAILanguageEnglish;
12+
extern QBAILanguage const _Nullable QBAILanguageSpanish;
13+
extern QBAILanguage const _Nullable QBAILanguageChineseSimplified;
14+
extern QBAILanguage const _Nullable QBAILanguageChineseTraditional;
15+
extern QBAILanguage const _Nullable QBAILanguageFrench;
16+
extern QBAILanguage const _Nullable QBAILanguageGerman;
17+
extern QBAILanguage const _Nullable QBAILanguageJapanese;
18+
extern QBAILanguage const _Nullable QBAILanguageKorean;
19+
extern QBAILanguage const _Nullable QBAILanguageItalian;
20+
extern QBAILanguage const _Nullable QBAILanguageRussian;
21+
extern QBAILanguage const _Nullable QBAILanguagePortuguese;
22+
extern QBAILanguage const _Nullable QBAILanguageArabic;
23+
extern QBAILanguage const _Nullable QBAILanguageHindi;
24+
extern QBAILanguage const _Nullable QBAILanguageTurkish;
25+
extern QBAILanguage const _Nullable QBAILanguageDutch;
26+
extern QBAILanguage const _Nullable QBAILanguagePolish;
27+
extern QBAILanguage const _Nullable QBAILanguageUkrainian;
28+
extern QBAILanguage const _Nullable QBAILanguageAlbanian;
29+
extern QBAILanguage const _Nullable QBAILanguageArmenian;
30+
extern QBAILanguage const _Nullable QBAILanguageAzerbaijani;
31+
extern QBAILanguage const _Nullable QBAILanguageBasque;
32+
extern QBAILanguage const _Nullable QBAILanguageBelarusian;
33+
extern QBAILanguage const _Nullable QBAILanguageBengali;
34+
extern QBAILanguage const _Nullable QBAILanguageBosnian;
35+
extern QBAILanguage const _Nullable QBAILanguageBulgarian;
36+
extern QBAILanguage const _Nullable QBAILanguageCatalan;
37+
extern QBAILanguage const _Nullable QBAILanguageCroatian;
38+
extern QBAILanguage const _Nullable QBAILanguageCzech;
39+
extern QBAILanguage const _Nullable QBAILanguageDanish;
40+
extern QBAILanguage const _Nullable QBAILanguageEstonian;
41+
extern QBAILanguage const _Nullable QBAILanguageFinnish;
42+
extern QBAILanguage const _Nullable QBAILanguageGalician;
43+
extern QBAILanguage const _Nullable QBAILanguageGeorgian;
44+
extern QBAILanguage const _Nullable QBAILanguageGreek;
45+
extern QBAILanguage const _Nullable QBAILanguageGujarati;
46+
extern QBAILanguage const _Nullable QBAILanguageHungarian;
47+
extern QBAILanguage const _Nullable QBAILanguageIndonesian;
48+
extern QBAILanguage const _Nullable QBAILanguageIrish;
49+
extern QBAILanguage const _Nullable QBAILanguageKannada;
50+
extern QBAILanguage const _Nullable QBAILanguageKazakh;
51+
extern QBAILanguage const _Nullable QBAILanguageLatvian;
52+
extern QBAILanguage const _Nullable QBAILanguageLithuanian;
53+
extern QBAILanguage const _Nullable QBAILanguageMacedonian;
54+
extern QBAILanguage const _Nullable QBAILanguageMalay;
55+
extern QBAILanguage const _Nullable QBAILanguageMaltese;
56+
extern QBAILanguage const _Nullable QBAILanguageMongolian;
57+
extern QBAILanguage const _Nullable QBAILanguageNepali;
58+
extern QBAILanguage const _Nullable QBAILanguageNorwegian;
59+
extern QBAILanguage const _Nullable QBAILanguagePashto;
60+
extern QBAILanguage const _Nullable QBAILanguagePersian;
61+
extern QBAILanguage const _Nullable QBAILanguagePunjabi;
62+
extern QBAILanguage const _Nullable QBAILanguageRomanian;
63+
extern QBAILanguage const _Nullable QBAILanguageSanskrit;
64+
extern QBAILanguage const _Nullable QBAILanguageSerbian;
65+
extern QBAILanguage const _Nullable QBAILanguageSindhi;
66+
extern QBAILanguage const _Nullable QBAILanguageSinhala;
67+
extern QBAILanguage const _Nullable QBAILanguageSlovak;
68+
extern QBAILanguage const _Nullable QBAILanguageSlovenian;
69+
extern QBAILanguage const _Nullable QBAILanguageUzbek;
70+
extern QBAILanguage const _Nullable QBAILanguageVietnamese;
71+
extern QBAILanguage const _Nullable QBAILanguageWelsh;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// QBAIRoleType.h
3+
//
4+
// Created by QuickBlox team
5+
// Copyright (c) 2017 QuickBlox. All rights reserved.
6+
//
7+
8+
#import <Foundation/Foundation.h>
9+
10+
NS_ASSUME_NONNULL_BEGIN
11+
12+
/**
13+
QBAIRoleType emun interface.
14+
This emun represents the role of the message sender. Can be a user or assistant.
15+
*/
16+
typedef NSString *QBAIRoleType NS_TYPED_ENUM;
17+
extern QBAIRoleType const QBAIRoleTypeUser;
18+
extern QBAIRoleType const QBAIRoleTypeAssistant;
19+
20+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)