* 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 "atom/browser/api/atom_api_app.h"
#include <string>
#include <vector>
#include "atom/browser/api/atom_api_menu.h"
#include "atom/browser/api/atom_api_session.h"
#include "atom/browser/api/atom_api_web_contents.h"
#include "atom/browser/api/gpuinfo_manager.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/browser/atom_paths.h"
#include "atom/browser/login_handler.h"
#include "atom/browser/relauncher.h"
#include "atom/common/application_info.h"
#include "atom/common/atom_command_line.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/image_converter.h"
#include "atom/common/native_mate_converters/net_converter.h"
#include "atom/common/native_mate_converters/network_converter.h"
#include "atom/common/native_mate_converters/once_callback.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/node_includes.h"
#include "atom/common/options_switches.h"
#include "base/command_line.h"
#include "base/environment.h"