Skip to content

Commit e7903a0

Browse files
committed
Quickblox.framework v 2.13
1 parent 15900d6 commit e7903a0

File tree

4 files changed

+163
-152
lines changed

4 files changed

+163
-152
lines changed

Framework/Quickblox.framework/Headers/QBSettings.h

Lines changed: 162 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -11,145 +11,108 @@
1111

1212
NS_ASSUME_NONNULL_BEGIN
1313

14-
typedef NS_ENUM(NSUInteger, QBConnectionZoneType) {
15-
16-
QBConnectionZoneTypeAutomatic = 1, //Default. Endpoints are loaded from QuickBlox
17-
QBConnectionZoneTypeProduction = 2,
18-
QBConnectionZoneTypeDevelopment = 3,
19-
QBConnectionZoneTypeStage = 4
20-
};
21-
2214
/**
23-
* QBSettings class interface.
24-
* Class for framework setup.
15+
QBSettings class interface.
16+
Class for framework setup.
2517
*/
2618
@interface QBSettings : NSObject
2719

28-
/**
29-
* Allows to set api endpoint and chat endpoint for service zone.
30-
*
31-
* @note QBConnectionZoneTypeAutomatic is used by default.
32-
* If you are using shared server and you are migrating to enterprise account,
33-
* then you don't need to resubmit your application, endpoints will be updated automatically.
34-
35-
* To set custom endpoints use QBConnectionZoneTypeProduction or QBConnectionZoneTypeDevelopment service zone.
36-
* Then you should manually activate your service zone by calling setServiceZone:
37-
*
38-
* @param apiEndpoint apiEndpoint - Endpoint for service i.e. http://my_custom_endpoint.com. Possible to pass nil to return to default settings
39-
* @param chatEndpoint chat endpoint
40-
* @param zone QBConnectionZoneType - service zone
41-
*/
42-
+ (void)setApiEndpoint:(nullable NSString *)apiEndpoint chatEndpoint:(nullable NSString *)chatEndpoint forServiceZone:(QBConnectionZoneType)zone;
20+
/** Storing Application ID */
21+
@property (nonatomic, class) NSUInteger applicationID;
22+
/** Setting API Key for Quickblox API */
23+
@property (nonatomic, class, nullable) NSString *authKey;
4324

44-
//MARK: - Chat settings
25+
/** Setting API Secret for Quickblox API */
26+
@property (nonatomic, class, nullable) NSString *authSecret;
4527

46-
/**
47-
* Enable or disable chat auto reconnect
48-
*
49-
* @param autoReconnectEnabled The default value is NO
50-
*/
51-
+ (void)setAutoReconnectEnabled:(BOOL)autoReconnectEnabled;
28+
/**Set account key (from admin.quickblox.com). This parameter is skipped for custom endpoints. */
29+
@property (nonatomic, class, nullable) NSString *accountKey;
5230

53-
/**
54-
* Enable or disable message carbons
55-
*
56-
* @note Call this method after chat connection has been established
57-
* @param carbonsEnabled BOOL value
58-
*/
59-
+ (void)setCarbonsEnabled:(BOOL)carbonsEnabled;
31+
/** Setting application group identifier */
32+
@property (nonatomic, class, nullable) NSString *applicationGroupIdentifier;
6033

61-
/// Set timeout value for Stream Management send a message operation
62-
+ (void)setStreamManagementSendMessageTimeout:(NSUInteger)streamManagementSendMessageTimeout;
34+
/** Setting Api Endpoint. Default - https://api.quickblox.com*/
35+
@property (nonatomic, class, null_resettable) NSString *apiEndpoint;
6336

64-
/** A reconnect timer may optionally be used to attempt a reconnect periodically.
65-
Default value is 5 seconds */
66-
+ (void)setReconnectTimerInterval:(NSTimeInterval)reconnectTimerInterval;
37+
/** Setting Chat endpoint. Default - chat.quickblox.com */
38+
@property (nonatomic, class, null_resettable) NSString *chatEndpoint;
6739

6840
/**
69-
* Many routers will teardown a socket mapping if there is no activity on the socket.
70-
* For this reason, the stream supports sending keep-alive data.
71-
* This is simply whitespace, which is ignored by the protocol.
72-
*
73-
* Keep-alive data is only sent in the absence of any other data being sent/received.
74-
*
75-
* The default value is 20s.
76-
* The minimum value for TARGET_OS_IPHONE is 10s, else 20s.
77-
*
78-
* To disable keep-alive, set the interval to zero (or any non-positive number).
79-
*
80-
* The keep-alive timer (if enabled) fires every (keepAliveInterval / 4) seconds.
81-
* Upon firing it checks when data was last sent/received,
82-
* and sends keep-alive data if the elapsed time has exceeded the keepAliveInterval.
83-
* Thus the effective resolution of the keepalive timer is based on the interval.
84-
*/
85-
+ (void)setKeepAliveInterval:(NSTimeInterval)keepAliveInterval;
86-
87-
//MARK: - Credentials
88-
89-
/// Storing Application ID
90-
+ (void)setApplicationID:(NSUInteger)applicationID;
41+
Load QuickBlox application settings from QBSettings-Info.plist.
42+
43+
@warning This method should be used only for Continuous Integration (CI), because of security reasons
44+
45+
@discussion Raises an exception if any configuration step fails.
46+
@note This method should be called after the app is launched and before using Quickblox services.
47+
48+
@code
49+
Required keys:
9150
92-
/**
93-
Set account key
51+
applicationID : Number
52+
authorizationKey : String
53+
authorizationSecret : String
54+
accountKey : String
55+
56+
Optional keys:
9457
95-
@param accountKey Account key - from admin.quickblox.com
58+
apiEndpoint : String
59+
chatEndpoint : String
60+
autoReconnectEnabled : BOOL
61+
carbonsEnabled : BOOL
62+
streamManagementSendMessageTimeout : Integer
63+
reconnectTimerInterval : Double
64+
keepAliveInterval : Double
65+
chatEndpointPort : Integer
66+
@endcode
9667
*/
97-
+ (void)setAccountKey:(NSString *)accountKey;
68+
+ (void)settingsFromPlist;
9869

9970
/**
100-
* Setting API Key for Quickblox API
101-
*
102-
* @param authKey - NSString value of API Key.
71+
Load QuickBlox application settings from specific plist with name.
72+
73+
@param name plist file name
10374
*/
104-
+ (void)setAuthKey:(NSString *)authKey;
75+
+ (void)settingsFromPlistWithName:(NSString *)name;
10576

106-
/**
107-
* Setting API Secret for Quickblox API
108-
*
109-
* @param authSecret - NSString value of API Secret.
110-
*/
111-
+ (void)setAuthSecret:(NSString *)authSecret;
77+
@end
11278

113-
/**
114-
* Setting application group identifier
115-
*
116-
* @param appGroupIdentifier - NSString value of identifier.
117-
*/
11879

119-
+ (void)setApplicationGroupIdentifier:(NSString *)appGroupIdentifier;
12080

121-
//MARK: - Endpoints
81+
@interface QBSettings (QBChat)
12282

123-
/**
124-
* Allows to change Services Zone to work with Production, Development and Staging environments
125-
*
126-
* @param serviceZone - Service Zone. One from QBConnectionZoneType. Default - QBConnectionZoneTypeAutomatic.
127-
*/
128-
+ (void)setServiceZone:(QBConnectionZoneType)serviceZone;
83+
/**Enable or disable chat auto reconnect. The default value is NO */
84+
@property (nonatomic, class) BOOL autoReconnectEnabled;
12985

130-
/**
131-
* Return current Service Zone
132-
*
133-
* @note serviceZone - Service Zone. One from QBConnectionZoneType. Default - QBConnectionZoneTypeAutomatic
134-
*/
135-
+ (QBConnectionZoneType)currentServiceZone;
86+
/** Enable or disable message carbons */
87+
@property (nonatomic, class) BOOL carbonsEnabled;
88+
89+
/** Set timeout value for Stream Management send a message operation */
90+
@property (nonatomic, class) NSUInteger streamManagementSendMessageTimeout;
13691

13792
/**
138-
* Returns Api Endpoint for current zone
139-
*
140-
* @return NSString value of Api Endpoint
93+
A reconnect timer may optionally be used to attempt a reconnect periodically.
94+
Default value is 5 seconds
14195
*/
142-
+ (nullable NSString *)apiEndpoint;
143-
144-
//MARK: - Chat Endpoints
96+
@property (nonatomic, class) NSTimeInterval reconnectTimerInterval;
14597

14698
/**
147-
Get server's Chat endpoint
148-
149-
@note you have to prepend http or https prefix
150-
@return Current server's Chat endpoint
99+
Many routers will teardown a socket mapping if there is no activity on the socket.
100+
For this reason, the stream supports sending keep-alive data.
101+
This is simply whitespace, which is ignored by the protocol.
102+
103+
Keep-alive data is only sent in the absence of any other data being sent/received.
104+
105+
The default value is 20s.
106+
The minimum value for TARGET_OS_IPHONE is 10s, else 20s.
107+
108+
To disable keep-alive, set the interval to zero (or any non-positive number).
109+
110+
The keep-alive timer (if enabled) fires every (keepAliveInterval / 4) seconds.
111+
Upon firing it checks when data was last sent/received,
112+
and sends keep-alive data if the elapsed time has exceeded the keepAliveInterval.
113+
Thus the effective resolution of the keepalive timer is based on the interval.
151114
*/
152-
+ (NSString *)chatEndpoint;
115+
@property (nonatomic, class) NSTimeInterval keepAliveInterval;
153116

154117
/**
155118
The port the xmpp server is running on.
@@ -158,83 +121,131 @@ typedef NS_ENUM(NSUInteger, QBConnectionZoneType) {
158121
159122
The default port is 5223.
160123
**/
161-
@property (assign, nonatomic, class) NSUInteger chatEndpointPort;
124+
@property (nonatomic, class) NSUInteger chatEndpointPort;
125+
126+
@end
127+
162128

163-
//MARK: - Network Indicator
129+
130+
@interface QBSettings (UIKit)
164131

165132
/**
166-
* A Boolean value indicating whether the manager is enabled.
133+
A Boolean value indicating whether the manager is enabled.
134+
135+
@note If YES, the manager will change status bar network activity indicator according to network
136+
operation notifications it receives. The default value is NO.
167137
168-
* If YES, the manager will change status bar network activity indicator according to network operation notifications it receives.
169-
* The default value is NO.
138+
@param enabled
170139
*/
171140
#if TARGET_OS_IOS
172-
+ (void)setNetworkIndicatorManagerEnabled:(BOOL)enabled;
141+
@property (nonatomic, class) BOOL networkIndicatorManagerEnabled;
173142

174143
/**
175-
A Boolean value indicating whether the network activity indicator is currently displayed in the status bar.
144+
A Boolean value indicating whether the network activity indicator is currently displayed in the
145+
status bar.
176146
*/
177147
+ (BOOL)isNetworkIndicatorVisible;
178148

179149
#endif
180150

181-
//MARK: - Logging
151+
@end
182152

183-
/**
184-
Set SDK log level (by default: QBLogLevelDebug). Possible values: QBLogLevelDebug, QBLogLevelNothing.
185-
186-
@param logLevel New log level
187-
*/
188-
+ (void)setLogLevel:(QBLogLevel)logLevel;
189153

190-
/**
191-
* Enable full XMPP Framework logging to console. By default is disabled.
192-
*/
154+
155+
@interface QBSettings (Logging)
156+
157+
/** Set SDK log level (by default: QBLogLevelDebug). Possible values: QBLogLevelDebug, QBLogLevelNothing. */
158+
@property (nonatomic, class) QBLogLevel logLevel;
159+
160+
/** Enable full XMPP Framework logging to console. By default is disabled. */
193161
+ (void)enableXMPPLogging;
194162

163+
/** Disable full XMPP Framework logging to console. */
164+
+ (void)disableXMPPLogging;
165+
195166
/**
196-
* Enable log to file
197-
* The approximate maximum size to allow log files to grow.
198-
* If a log file is larger than this value after a log statement is appended,
199-
* then the log file is rolled.
200-
* @param maximumFileSize maximum file size in bytes, for example: 1024 * 1024 * 10 = 10Mb
167+
Enable log to file
168+
169+
The approximate maximum size to allow log files to grow.
170+
If a log file is larger than this value after a log statement is appended,
171+
then the log file is rolled.
172+
173+
@param maximumFileSize maximum file size in bytes, for example: 1024 * 1024 * 10 = 10Mb
201174
*/
202175
+ (void)enableFileLoggingWithMaximumFileSize:(unsigned long long)maximumFileSize;
203176

204-
/**
205-
* Disable logging to file
206-
*/
177+
/** Disable logging to file */
207178
+ (void)disableFileLogging;
208179

209180
/**
210-
* Returns log file paths if loggint to file is enabled
211-
* Example name of log file: /var/mobile/Containers/Data/Application/518F9FD2-BB4C-4AF4-89D8-7FF85B0518B7/Library/Caches/Logs/com.quickblox.supersample 2016-03-25 11-23.log
212-
*
213-
* @return Array of log file paths or nil if logging to file is disabled
181+
Returns log file paths if loggint to file is enabled
182+
Example name of log file:
183+
/var/mobile/Containers/Data/Application/<UDID>/Library/Caches/Logs/com.quickblox.<app_name> 2016-03-25 11-23.log
184+
185+
@return Array of log file paths or nil if logging to file is disabled
214186
*/
215187
+ (nullable NSArray<NSString *> *)logFilePaths;
216188

189+
@end
190+
191+
@interface QBSettings (NSURLSessionConfiguration)
192+
217193
/**
218-
* Disable full XMPP Framework logging to console.
194+
Set custom session configuration that will be used for REST API requests.
195+
'[NSURLSessionConfiguration defaultSessionConfiguration]' is used if nil is passed.
219196
*/
220-
+ (void)disableXMPPLogging;
221197

222-
//MARK: - NSURLSessionConfiguration
198+
@property (nonatomic, class, nullable) NSURLSessionConfiguration *sessionConfiguration;
199+
200+
@end
201+
202+
typedef NS_ENUM(NSUInteger, QBConnectionZoneType) {
203+
204+
QBConnectionZoneTypeAutomatic = 1, //Default. Endpoints are loaded from QuickBlox
205+
QBConnectionZoneTypeProduction = 2,
206+
QBConnectionZoneTypeDevelopment = 3,
207+
QBConnectionZoneTypeStage = 4
208+
} DEPRECATED_ATTRIBUTE;
209+
210+
@interface QBSettings (DEPRECATED)
211+
212+
/**
213+
Allows to set api endpoint and chat endpoint for service zone.
214+
215+
@note QBConnectionZoneTypeAutomatic is used by default.
216+
If you are using shared server and you are migrating to enterprise account,
217+
then you don't need to resubmit your application, endpoints will be updated automatically.
218+
219+
To set custom endpoints use QBConnectionZoneTypeProduction or QBConnectionZoneTypeDevelopment service zone.
220+
Then you should manually activate your service zone by calling setServiceZone:
221+
222+
@param apiEndpoint apiEndpoint - Endpoint for service i.e. http://my_custom_endpoint.com. Possible to pass nil to return to default settings
223+
@param chatEndpoint chat endpoint
224+
@param zone QBConnectionZoneType - service zone
225+
@warning Deprecated in 2.12. Use QBSettings.apiEndpoint and QBSettings.chatEndpoint to set custom endpoints
226+
*/
227+
+ (void)setApiEndpoint:(nullable NSString *)apiEndpoint
228+
chatEndpoint:(nullable NSString *)chatEndpoint
229+
forServiceZone:(QBConnectionZoneType)zone
230+
DEPRECATED_MSG_ATTRIBUTE("Deprecated in 2.12. Use QBSettings.apiEndpoint and QBSettings.chatEndpoint to set custom endpoints");
223231

224232
/**
225-
* Set custom session configuration that will be used for REST API requests.
226-
* '[NSURLSessionConfiguration defaultSessionConfiguration]' is used if nil is passed.
227-
*
228-
* @param configuration Your NSURLSessionConfiguration object.
233+
Allows to change Services Zone to work with Production, Development and Staging environments
234+
235+
@param serviceZone - Service Zone. One from QBConnectionZoneType. Default - QBConnectionZoneTypeAutomatic.
236+
@warning Deprecated in 2.12. Use QBSettings.apiEndpoint and QBSettings.chatEndpoint to set custom endpoints
229237
*/
230-
+ (void)setSessionConfiguration:(nullable NSURLSessionConfiguration *)configuration;
238+
+ (void)setServiceZone:(QBConnectionZoneType)serviceZone
239+
DEPRECATED_MSG_ATTRIBUTE("Deprecated in 2.12. Use QBSettings.apiEndpoint and QBSettings.chatEndpoint to set custom endpoints");
231240

232241
/**
233-
* Get custom session configuration.
234-
*
235-
* @return Your NSURLSessionConfiguration object.
242+
Return current Service Zone
243+
244+
@note serviceZone - Service Zone. One from QBConnectionZoneType. Default - QBConnectionZoneTypeAutomatic
245+
@warning Deprecated in 2.12. Use QBSettings.apiEndpoint and QBSettings.chatEndpoint to set custom endpoints
236246
*/
237-
+ (nullable NSURLSessionConfiguration *)sessionConfiguration;
247+
+ (QBConnectionZoneType)currentServiceZone
248+
DEPRECATED_MSG_ATTRIBUTE("Deprecated in 2.12. Use QBSettings.apiEndpoint and QBSettings.chatEndpoint to set custom endpoints");
238249

239250
@end
240251

Framework/Quickblox.framework/Headers/Quickblox.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
#import <Quickblox/QBChatHeader.h>
1717
#import <Quickblox/QBAddressBookHeader.h>
1818

19-
//! Framework version 2.12
19+
//! Framework version 2.13
2020
FOUNDATION_EXPORT NSString * const QuickbloxFrameworkVersion;
-13 Bytes
Binary file not shown.
287 KB
Binary file not shown.

0 commit comments

Comments
 (0)