diff --git a/README.md b/README.md index 3f4e443..486bf00 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ Note: this project is under development and functionality will improve over time npm install react-native-file-download --save ``` +## Breaking change -- Now supports React Native v25+. Not compatible with prior versions. You can continue using older versions of React Native with react-native-file-download@0.0.9. + ## Getting started - iOS 1. In XCode, in the project navigator right click `Libraries` ➜ `Add Files to [your project's name]` diff --git a/index.ios.js b/index.ios.js index 2fb9961..aa6fe4e 100644 --- a/index.ios.js +++ b/index.ios.js @@ -1,8 +1,10 @@ 'use strict' -var React = require('react-native') -var RNFileDownload = React.NativeModules.RNFileDownload -var NativeAppEventEmitter = React.NativeAppEventEmitter +import { + NativeModules, + NativeAppEventEmitter +} from 'react-native'; +var RNFileDownload = NativeModules.RNFileDownload; var promisify = require("es6-promisify") let progressEventName = 'RNFileDownloadProgress'