-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
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
Add spotlight support for Simplenote #1140
Conversation
I think this feature is great but I'm wondering what you think of making it opt-in. I would imagine some users may not like the idea of their notes showing up in spotlight in case they have personal information in them. WDYT? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks super sharp!!
+1 to what Dan said, perhaps we should have an opt-in setting, for privacy reasons?
Generated by 🚫 Danger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sending a couple questions (I'm not sure the indexSpotlightItemsIfNeeded
API still makes sense?).
Other than that, REAL nice work!!!
Fix
It was requested in #1000 to index all of the notes in Simplenote so they can be searched for in spotlight. This is a great idea, so I have done just that!
With this PR you will be able to type in the text or title of any note into spotlight and the not will appear in the search results. Then you will be able to launch Simplenote directly to that note from spotlight.
fixes #1000
Test
Prep:
We want to confirm indexing and removing indexing before confirming the one time indexing of all of the existing notes. So at first we want to not run that indexing.... so:
[self indexSpotlightItemsIfNeeded];
so we don't index all your notes right awayTest adding and removing notes from the spotlight index:
One time index:
6. now uncomment out the code we disabled before in the SimplenoteAppDelegate
7. relaunch the app. Give the app some time to do the indexing, this will happen in the background so you won't notice or get any indication that it is doing so.
8. Now search for text from any of your notes. Confirm it appears in spotlight
9. Put a break point in SimplenoteAppDelegate L602. Run the app again and confirm you do not hit this breakpoint. We only want to run that indexing once.
Review
(Required) Add instructions for reviewers. For example:
Release
(Required) Add a concise statement to
RELEASE-NOTES.txt
if the changes should be included in release notes. Include details about updating the notes in this section. For example: