Socket
Book a DemoInstallSign in
Socket

react-native-supress-apple-pay

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-supress-apple-pay

Suppress apple pay in React-Native

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

react-native-supress-apple-pay

Important!

Before to use this library you should add Apple Pay Pass Kit Supress capability and this is given by Apple, first of all you need to send email to

apple-pay-inquiries@apple.com apple-pay-provisioning@apple.com

include the reason of supress and these informations

Company: {{COMPANY NAME}} Team ID: {{TEAM_ID}} Apple ID: {{APPLE_ID}} Application ID: {{BUNDLE_ID}}

when they approve your application you will be able add Supress Apple Pay capability and our library.

Getting started

$ yarn add react-native-supress-apple-pay

Mostly automatic installation React-Native <0.60.0

$ react-native link react-native-supress-apple-pay

Manual installation

iOS

  • In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  • Go to node_modulesreact-native-supress-apple-pay and add PassKitHelper.xcodeproj
  • In XCode, in the project navigator, select your project. Add libPassKitHelper.a to your project's Build PhasesLink Binary With Libraries
  • Run your project (Cmd+R)<

Usage

import PassKitHelper from "react-native-supress-apple-pay";

// to suppress apple pay

if (Platform.OS === "ios") {
  PassKitHelper.suppressApplePay((result) => {
    switch (result) {
      case 0:
        console.log(
          "Apple pay automatic presentation suppression not supported"
        );
        break;
      case 1:
        console.log("Apple pay automatic presentation already suppressed");
        break;
      case 2:
        console.log("Apple pay automatic presentation suppression denied");
        break;
      case 3:
        console.log("Apple pay automatic presentation suppression cancelled");
        break;
      case 4:
        console.log("Apple pay automatic presentation suppressed successfully");
        break;
      default:
        console.log("Unknown result");
    }
  });
}

// to enable apple pay

if (Platform.OS === "ios") {
  PassKitHelper.enableApplePay((result) => {
    switch (result) {
      case 0:
        console.log("iOS level under 9 (not supported)");
        break;
      case 1:
        console.log("Apple pay presentation already enabled");
        break;
      case 2:
        console.log("Apple pay not supported");
        break;
      case 3:
        console.log("Apple pay automatic presentation activated");
        break;
      default:
        console.log("Unknown result");
    }
  });
}

Keywords

react-native

FAQs

Package last updated on 16 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.