This method requires a special entitlement issued by Apple. If the entitlement is not present, the request will fail. For more information, see Apple Developer - Apple Pay.
$ yarn add react-native-pass-kit-helper
$ react-native link react-native-pass-kit-helper
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-pass-kit-helper
and addPassKitHelper.xcodeproj
- In XCode, in the project navigator, select your project. Add
libPassKitHelper.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
import PassKitHelper from 'react-native-pass-kit-helper';
// to suppress apple pay
if (Platform.OS === 'ios') {
PassKitHelper.suppressApplePay();
}
// to enable apple pay
if (Platform.OS === 'ios') {
PassKitHelper.enableApplePay();
}