Skip to content

Commit 420363e

Browse files
committed
fix unload for old arch
1 parent d399a77 commit 420363e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ios/RNUnityView.mm

+6-4
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,13 @@ - (void)handleCommand:(nonnull const NSString *)commandName args:(nonnull const
211211
#else
212212

213213
-(id)initWithFrame:(CGRect)frame {
214-
return [super initWithFrame:frame];
215-
}
214+
self = [super initWithFrame:frame];
215+
216+
if (self) {
217+
[self initUnityModule];
218+
}
216219

217-
- (void)didMoveToWindow {
218-
[self initUnityModule];
220+
return self;
219221
}
220222

221223
#endif

0 commit comments

Comments
 (0)