-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.ios.js
54 lines (49 loc) · 1.2 KB
/
index.ios.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* @providesModule UserActivity
* @flow
*/
'use strict';
import {
NativeModules,
} from 'react-native';
var NativeUserActivity = NativeModules.UserActivity;
/**
* High-level docs for the UserActivity iOS API can be written here.
*/
type ActivityOptions = {
activityType: string,
eligibleForSearch: boolean,
eligibleForPublicIndexing: boolean,
eligibleForHandoff: boolean,
title: string,
webpageURL: string,
userInfo: any,
locationInfo: any,
supportsNavigation: boolean,
supportsPhoneCall: boolean,
phoneNumber: string,
description: string,
thumbnailURL: string,
identifier: string
};
var UserActivity = {
createActivity: function (options: ActivityOptions) {
NativeUserActivity.createActivity(
options.activityType,
options.eligibleForSearch,
options.eligibleForPublicIndexing,
options.eligibleForHandoff,
options.title,
options.webpageURL,
options.userInfo,
options.locationInfo,
options.supportsNavigation || false,
options.supportsPhoneCall || false,
options.phoneNumber,
options.description,
options.thumbnailURL,
options.identifier
);
},
};
export default UserActivity;