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 with presentation options
- PageSheet which is the default
- Push on the VC stack
Before iOS9
and on Android
it defaults to RN Linking.openURL()
Getting started
$ npm install react-native-safari-modal --save
Mostly automatic installation
RN > 0.61 automatic install
Else ..
$ react-native link react-native-safari-modal
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-safari-modal
and addRNSafariModalController.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNSafariModalController.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Declaration
openURL: (url: string, modal: boolean) => void;
Usage
import SafariModal from 'react-native-safari-modal';
SafariModal.openURL('https://www.medium.com');