-
Notifications
You must be signed in to change notification settings - Fork 37
/
PassKit.android.js
35 lines (28 loc) · 929 Bytes
/
PassKit.android.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
/**
* @flow
*/
'use strict'
import { NativeModules } from 'react-native'
import type EmitterSubscription from 'EmitterSubscription'
const nativeModule = NativeModules.RNPassKit
export default {
...nativeModule,
presentAddPassesViewController: (base64Encoded: string): Promise<void> => {
// eslint-disable-next-line no-console
console.warn(
'PassKit.presentAddPassesViewController is deprecated. Use PassKit.addPass instead.'
)
return nativeModule.addPass(base64Encoded)
},
containsPass: (base64Encoded: string): Promise<boolean> => {
// eslint-disable-next-line no-console
console.warn('PassKit.containsPass is not implemented on android.')
return Promise.resolve(false)
},
addEventListener: (
eventType: string,
listener: Function,
context: ?Object
): ?EmitterSubscription => null,
removeEventListener: (eventType: string, listener: Function): void => {}
}