Skip to content

Commit 470bb26

Browse files
Update Calendar.m
Fix ios 15.1 -- Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.
1 parent ef867c0 commit 470bb26

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/ios/Calendar.m

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -747,11 +747,14 @@ - (void) createEventInteractively:(CDVInvokedUrlCommand*)command {
747747

748748
self.interactiveCallbackId = command.callbackId;
749749

750-
EKEventEditViewController* controller = [[EKEventEditViewController alloc] init];
751-
controller.event = myEvent;
752-
controller.eventStore = self.eventStore;
753-
controller.editViewDelegate = self;
754750
dispatch_async(dispatch_get_main_queue(), ^{
751+
752+
//Fix ios 15.1 -- Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread
753+
EKEventEditViewController* controller = [[EKEventEditViewController alloc] init];
754+
controller.event = myEvent;
755+
controller.eventStore = self.eventStore;
756+
controller.editViewDelegate = self;
757+
//Fix ios 15.1
755758
[self.viewController presentViewController:controller animated:YES completion:nil];
756759
});
757760
}];

0 commit comments

Comments
 (0)