Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-ios-files-app-save

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-ios-files-app-save

react-native-ios-files-app-save is a React Native package that allows you to easily download any file from the internet and save it to your Files app on Android and iOS devices.

  • 0.1.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28
decreased by-3.45%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-ios-files-app-save

react-native-ios-files-app-save is a React Native package that allows you to easily download any file from the internet and save it to your Files app on Android and iOS devices.

App Screenshot

Installation

To install react-native-ios-files-app-save, use npm or yarn

npm

npm install react-native-ios-files-app-save

yarn

yarn add react-native-ios-files-app-save

Android AndroidManifest.xml

<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

iOS info.plist

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

Usage

To use react-native-ios-files-app-save simply import the startDownloadAppSave function and call it with the URL of the file you want to download:

import { startDownloadAppSave } from 'react-native-ios-files-app-save';

export default function App() {
  const demoDownload = () => {
    if (!hasPermission) {
      //* Handle Permission
      return;
    }
   let options: FileSaveOptions = {
      url: "YOUR URL,
      fileName: "name.pdf,
      isBase64: false
    }
    startDownloadAppSave(options).then((res) => {
      const fileSaveSuccess = res as FileSaveSuccess;
      console.log(fileSaveSuccess);
      console.log(fileSaveSuccess.message);
    }).catch((error) => {
      console.log("error", error);
    })
  };

  return (
    <View style={styles.container}>
      <Text onPress={demoDownload}>{'Start Download'}</Text>
    </View>
  );
}

Contributing

Contributions are welcome! If you have any issues, ideas, or suggestions for react-native-ios-files-app-save, feel free to open an issue or submit a pull request on Github.

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

If you find my work useful, please consider supporting me by buying me a coffee!

Your support helps me continue to develop and maintain this package.

Thank you!

Buy Me A Coffee

Keywords

FAQs

Package last updated on 14 Nov 2023

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc