1.0.0 • Published 5 years ago

react-native-ios-file-opener v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

react-native-ios-file-opener

npm version

This is a file opener helper(iOS only). It supports: 1. open ios File App. 2. use other file open.

install

use yarn

yarn add react-native-ios-file-opener

iOS Environment

podfile add

  pod 'react-native-ios-file-opener', :podspec => '../node_modules/react-native-ios-file-opener/react-native-ios-file-opener.podspec'

info.plist add permission

  <key>UIFileSharingEnabled</key>
  <true
  <key>LSSupportsOpeningDocumentsInPlace</key>
  <true/>
  

How to use

  import Helper from 'react-native-ios-file-opener';
  
  ... 
    // open ios file app
   Helper.openIOSFileApp();
  
  
   // open it with another application
   const filePath = '';
   Helper.openWithFilePath(filePath);
  ...