JSPM

react-native-safari-modal

1.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 159
  • Score
    100M100P100Q68487F
  • License MIT

RN library to open a URL in a modal SafariViewController. Defaults to Linking.openURL()

Package Exports

  • react-native-safari-modal

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-safari-modal) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-native-safari-modal

On iOS, opens a URL in SafariViewController presented in a modal

Before iOS 9 and Android it defaults to RN Linking.openURL()

Getting started

$ npm install react-native-safari-modal --save

Mostly automatic installation

RN > 0.61 automatic install

TODO: for automatic installation, podspec should be in project root

Else ..

$ react-native link react-native-safari-modal

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-safari-modal and add RNSafariModalController.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNSafariModalController.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Usage

import SafariModal from 'react-native-safari-modal';

SafariModal.openURL('https://www.medium.com');