* Electron version: 1.6.10
* Operating system: macOS Sierra 10.12.4 (16E195)

# Improve Handoff API support

Hi!

Today the API of Handoff provides the methods: `setUserActivity`, `getCurrentActivityType` and dispatch the event `continue-activity`

I'm using Handoff and noticed that in some circumstances the broadcast takes a long time to update its userInfo which does not happen on the native iOS client

1. To invalidate or resign the current activity we currently need to create a non-existing activity type and set it as the current activity. There's no way to handle the activity life cycle through electron.
2. When we need to update a given user activity userInfo frequently (i.e in response to a search bar's text changes), we have no efficient way. Setting a new userActivity with the updated information takes several seconds to bridge, whereas doing this on iOS native app is instantaneous.

I believe that exposing a bit more of the NSUserActivity API to Electron would help, namely `becomeCurrent`, `resignCurrent` and `invalidate` which would address point 1, and `needsSave` and a new event to allow updating an activity when needed to address point 2.
These are described in more detail in https://developer.apple.com/reference/foundation/nsuseractivity.

I'm are open to help in any way i can such as explaining how the native API work, providing sample code or testing possible implementations

Thank you!
atom/browser/api/atom_api_app.cc
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/system/sys_info.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/icon_manager.h"
#include "chrome/common/chrome_paths.h"
#include "content/browser/gpu/compositor_util.h"        
#include "content/browser/gpu/gpu_data_manager_impl.h"  
#include "content/public/browser/browser_accessibility_state.h"
#include "content/public/browser/browser_child_process_host.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/common/content_switches.h"
#include "media/audio/audio_manager.h"
#include "native_mate/object_template_builder.h"
#include "net/ssl/client_cert_identity.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "services/service_manager/sandbox/switches.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
#if defined(OS_WIN)
#include "atom/browser/ui/win/jump_list.h"
#include "base/strings/utf_string_conversions.h"
#endif
#if defined(OS_MACOSX)
#include <CoreFoundation/CoreFoundation.h>
#include "atom/browser/ui/cocoa/atom_bundle_mover.h"