1 |
efrain |
1 |
/*
|
|
|
2 |
* Copyright 2017 Google
|
|
|
3 |
*
|
|
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
5 |
* you may not use this file except in compliance with the License.
|
|
|
6 |
* You may obtain a copy of the License at
|
|
|
7 |
*
|
|
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
9 |
*
|
|
|
10 |
* Unless required by applicable law or agreed to in writing, software
|
|
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
13 |
* See the License for the specific language governing permissions and
|
|
|
14 |
* limitations under the License.
|
|
|
15 |
*/
|
|
|
16 |
|
|
|
17 |
#import <Foundation/Foundation.h>
|
|
|
18 |
|
|
|
19 |
#import "FirebaseInAppMessaging/Sources/Private/Flows/FIRIAMActivityLogger.h"
|
|
|
20 |
#import "FirebaseInAppMessaging/Sources/Private/Flows/FIRIAMBookKeeper.h"
|
|
|
21 |
#import "FirebaseInAppMessaging/Sources/Private/Flows/FIRIAMDisplayExecutor.h"
|
|
|
22 |
#import "FirebaseInAppMessaging/Sources/Private/Flows/FIRIAMMessageClientCache.h"
|
|
|
23 |
#import "FirebaseInAppMessaging/Sources/Private/Flows/FIRIAMServerMsgFetchStorage.h"
|
|
|
24 |
#import "FirebaseInAppMessaging/Sources/Private/Runtime/FIRIAMSDKSettings.h"
|
|
|
25 |
|
|
|
26 |
NS_ASSUME_NONNULL_BEGIN
|
|
|
27 |
// A class for managing the objects/dependencies for supporting different fiam flows at runtime
|
|
|
28 |
NS_EXTENSION_UNAVAILABLE("Firebase In App Messaging is not supported for iOS extensions.")
|
|
|
29 |
@interface FIRIAMRuntimeManager : NSObject
|
|
|
30 |
@property(nonatomic, nonnull) FIRIAMSDKSettings *currentSetting;
|
|
|
31 |
@property(nonatomic, nonnull) FIRIAMActivityLogger *activityLogger;
|
|
|
32 |
@property(nonatomic, nonnull) FIRIAMBookKeeperViaUserDefaults *bookKeeper;
|
|
|
33 |
@property(nonatomic, nonnull) FIRIAMMessageClientCache *messageCache;
|
|
|
34 |
@property(nonatomic, nonnull) FIRIAMServerMsgFetchStorage *fetchResultStorage;
|
|
|
35 |
@property(nonatomic, nonnull) FIRIAMDisplayExecutor *displayExecutor;
|
|
|
36 |
|
|
|
37 |
// Initialize fiam SDKs and start various flows with specified settings.
|
|
|
38 |
- (void)startRuntimeWithSDKSettings:(FIRIAMSDKSettings *)settings;
|
|
|
39 |
|
|
|
40 |
// Pause runtime flows/functions to disable SDK functions at runtime
|
|
|
41 |
- (void)pause;
|
|
|
42 |
|
|
|
43 |
// Resume runtime flows/functions.
|
|
|
44 |
- (void)resume;
|
|
|
45 |
|
|
|
46 |
// allows app to programmatically turn on/off auto data collection for fiam, which also implies
|
|
|
47 |
// running/stopping fiam functionalities
|
|
|
48 |
@property(nonatomic) BOOL automaticDataCollectionEnabled;
|
|
|
49 |
|
|
|
50 |
// Get the global singleton instance
|
|
|
51 |
+ (FIRIAMRuntimeManager *)getSDKRuntimeInstance;
|
|
|
52 |
|
|
|
53 |
// a method used to suppress or allow message being displayed based on the parameter
|
|
|
54 |
// @param shouldSuppress if true, no new message is rendered by the sdk.
|
|
|
55 |
- (void)setShouldSuppressMessageDisplay:(BOOL)shouldSuppress;
|
|
|
56 |
@end
|
|
|
57 |
NS_ASSUME_NONNULL_END
|