We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, this lib comes in handy, but I struggle with a bug:
I just debug the case:
self.initialIdentifier has value in handleContinueUserActivity:
self.initialIdentifier
handleContinueUserActivity
self.initialIdentifier = uniqueItemIdentifier; // set break point here and got the correct value
- (void)handleContinueUserActivity:(NSUserActivity *)userActivity { NSString *uniqueItemIdentifier = userActivity.userInfo[CSSearchableItemActivityIdentifier]; if (!uniqueItemIdentifier) { return; } self.initialIdentifier = uniqueItemIdentifier; if (!self.hasListeners) { return; } [self sendEventWithName:kSpotlightSearchItemTapped body:uniqueItemIdentifier]; }
But self.initialIdentifier became nil here:
RCT_EXPORT_METHOD(getInitialSearchItem:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { resolve(self.initialIdentifier); }
It leads to undefined on JS:
undefined
SpotlightSearch.getInitialSearchItem().then(console.log);
The text was updated successfully, but these errors were encountered:
This is also returning undefined in my case: "react-native-spotlight-search": "^2.0.0" "react-native": "0.64.1"
Sorry, something went wrong.
null in JS for us also anyone got a fix?
This is fixed in the PR: #58
No branches or pull requests
Hi, this lib comes in handy, but I struggle with a bug:
I just debug the case:
self.initialIdentifier
has value inhandleContinueUserActivity
:But
self.initialIdentifier
became nil here:It leads to
undefined
on JS:The text was updated successfully, but these errors were encountered: