Skip to content

Commit

Permalink
Fix issue 87: iOS warning: [setShortcutItems()] UI API called on a ba…
Browse files Browse the repository at this point in the history
…ckground thread jordanbyron#87
  • Loading branch information
rsml committed Nov 14, 2019
1 parent a64656a commit 3fe6a9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RNQuickAction/RNQuickAction/RNQuickActionManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ - (NSArray*)dynamicShortcutItemsForPassedArray:(NSArray*)passedArray {

RCT_EXPORT_METHOD(setShortcutItems:(NSArray *) shortcutItems)
{
dispatch_async(dispatch_get_main_queue(), ^{
NSArray *dynamicShortcuts = [self dynamicShortcutItemsForPassedArray:shortcutItems];
[UIApplication sharedApplication].shortcutItems = dynamicShortcuts;
});
}

RCT_EXPORT_METHOD(isSupported:(RCTResponseSenderBlock)callback)
Expand Down

0 comments on commit 3fe6a9e

Please sign in to comment.