diff --git a/README.md b/README.md index 69efbb2..be9ca98 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,15 @@ npm install react-native-audioplayer --save ``` ### Installation (iOS) +#### With CocoaPods +1. Add the plugin dependency to your Podfile, pointing at the path where NPM installed it: +``` +pod 'react-native-audioplayer', path: '../node_modules/react-native-audioplayer' +``` +2. Run `pod install` + +#### Manual +If you didn't install via CocoaPods you can alternatively manually install. In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name] ➜ Go to node_modules ➜ react-native-audioplayer and add the .xcodeproj file diff --git a/package.json b/package.json index a188300..acada8b 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "react-native-audioplayer", "version": "0.2.0", "description": "Small audio player library for react native", + "homepage": "https://github.com/andreaskeller/react-native-audioplayer", "main": "AudioPlayer.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" diff --git a/react-native-audioplayer.podspec b/react-native-audioplayer.podspec new file mode 100644 index 0000000..c02073c --- /dev/null +++ b/react-native-audioplayer.podspec @@ -0,0 +1,22 @@ +require 'json' + +package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) + +Pod::Spec.new do |s| + s.name = 'react-native-audioplayer' + s.version = package['version'] + s.summary = package['description'] + s.description = package['description'] + s.license = package['license'] + s.author = package['author'] + s.homepage = package['homepage'] + s.source = { :git => 'https://github.com/andreaskeller/react-native-audioplayer', :tag => s.version } + + s.requires_arc = true + s.platform = :ios, '8.0' + + s.preserve_paths = 'LICENSE', 'README.md', 'package.json', 'AudioPlayer.js' + s.source_files = '*.{h,m}' + + s.dependency 'React' +end