@@ -88,7 +88,7 @@ - (void)start {
8888// /
8989- (MPKitExecStatus *)executeWithViewName : (NSString * _Nullable)viewName
9090 attributes : (NSDictionary <NSString *, NSString *> * _Nonnull)attributes
91- placements : (NSDictionary <NSString *, RoktEmbeddedView *> * _Nullable)placements
91+ placements : (NSDictionary <NSString *, MPRoktEmbeddedView *> * _Nullable)placements
9292 callbacks : (MPRoktEventCallback * _Nullable)callbacks
9393 filteredUser : (FilteredMParticleUser * _Nonnull)filteredUser {
9494 NSDictionary <NSString *, NSString *> *mpAttributes = [filteredUser.userAttributes transformValuesToString ];
@@ -122,14 +122,19 @@ - (MPKitExecStatus *)executeWithViewName:(NSString * _Nullable)viewName
122122 return [[MPKitExecStatus alloc ] initWithSDKCode: [[self class ] kitCode ] returnCode: MPKitReturnCodeSuccess];
123123}
124124
125- - (NSDictionary <NSString *, RoktEmbeddedView *> * _Nullable) confirmPlacements : (NSDictionary <NSString *, RoktEmbeddedView *> * _Nullable)placements {
125+ - (NSDictionary <NSString *, RoktEmbeddedView *> * _Nullable) confirmPlacements : (NSDictionary <NSString *, MPRoktEmbeddedView *> * _Nullable)placements {
126126 NSMutableDictionary <NSString *, RoktEmbeddedView *> *safePlacements = [NSMutableDictionary dictionary ];
127127
128128 for (NSString * key in placements) {
129- id value = [placements objectForKey: key];
129+ MPRoktEmbeddedView *mpView = [placements objectForKey: key];
130130
131- if ([value isKindOfClass: RoktEmbeddedView.class]) {
132- [safePlacements setObject: value forKey: key];
131+ if ([mpView isKindOfClass: MPRoktEmbeddedView.class]) {
132+ // Create a new RoktEmbeddedView instance
133+ RoktEmbeddedView *roktView = [[RoktEmbeddedView alloc ] initWithFrame: mpView.bounds];
134+ // Add the RoktEmbeddedView as a child view of MPRoktEmbeddedView
135+ [mpView addSubview: roktView];
136+ // Add the RoktEmbeddedView to our safe placements dictionary
137+ [safePlacements setObject: roktView forKey: key];
133138 }
134139 }
135140
0 commit comments