Skip to content

Commit

Permalink
Allow other continueUserActivity handlers (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertherber authored Mar 18, 2023
1 parent e8d8f2b commit fef947a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugin/src/withSpotlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const SPOTLIGHT_IMPORT = `#import "RCTSpotlightSearch.h"
const SPOTLIGHT_ACTIVITY = `- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {`;

const SPOTLIGHT_ACTIVITY_ADD = `- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
[RCTSpotlightSearch handleContinueUserActivity:userActivity];
return YES;`;
[RCTSpotlightSearch handleContinueUserActivity:userActivity];`;

const modifyAppDelegate = (appDelegate: string) => {
if (!appDelegate.includes(SPOTLIGHT_IMPORT)) {
Expand Down

0 comments on commit fef947a

Please sign in to comment.