File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,6 @@ - (instancetype)initWithConfiguration:(SEGAnalyticsConfiguration *)configuration
52
52
// TODO: Figure out if this is really the best way to do things here.
53
53
self.integrationsManager = [[SEGIntegrationsManager alloc ] initWithAnalytics: self ];
54
54
55
- if (configuration.edgeFunctionMiddleware ) {
56
- configuration.sourceMiddleware = @[[configuration.edgeFunctionMiddleware sourceMiddleware ]];
57
- configuration.destinationMiddleware = @[[configuration.edgeFunctionMiddleware destinationMiddleware ]];
58
- }
59
-
60
55
self.runner = [[SEGMiddlewareRunner alloc ] initWithMiddleware:
61
56
[configuration.sourceMiddleware ?: @[] arrayByAddingObject: self .integrationsManager]];
62
57
Original file line number Diff line number Diff line change 8
8
9
9
#import " SEGAnalyticsConfiguration.h"
10
10
#import " SEGAnalytics.h"
11
+ #import " SEGMiddleware.h"
11
12
#import " SEGCrypto.h"
12
13
#if TARGET_OS_IPHONE
13
14
#import < UIKit/UIKit.h>
@@ -107,4 +108,10 @@ - (void)setMiddlewares:(NSArray<id<SEGMiddleware>> *)middlewares
107
108
return self.sourceMiddleware ;
108
109
}
109
110
111
+ - (void )setEdgeFunctionMiddleware : (id <SEGEdgeFunctionMiddleware>)edgeFunctionMiddleware
112
+ {
113
+ self.sourceMiddleware = edgeFunctionMiddleware.sourceMiddleware ;
114
+ self.destinationMiddleware = edgeFunctionMiddleware.destinationMiddleware ;
115
+ }
116
+
110
117
@end
You can’t perform that action at this time.
0 commit comments