mirror of
https://github.com/status-im/react-native-image-crop-picker.git
synced 2025-02-23 10:58:16 +00:00
Add podspec (#409)
* Added a conditional include Added a conditional include to handle compile if installed using podspec * Podspec Using https://github.com/ivpusic/react-native-image-crop-picker/pull/372 as reference added a podspec. * Update README.md Add steps to install using Cocoapods * Update README.md Add installation step using cocoapods * Update README.md
This commit is contained in:
parent
d0c481ec74
commit
ba6df59d5b
24
README.md
24
README.md
@ -113,23 +113,39 @@ ImagePicker.clean().then(() => {
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
### Install package
|
||||||
|
|
||||||
```
|
```
|
||||||
npm i react-native-image-crop-picker --save
|
npm i react-native-image-crop-picker --save
|
||||||
|
```
|
||||||
|
|
||||||
|
You can link the package using react-native link or cocoapods.
|
||||||
|
|
||||||
|
|
||||||
|
###### Manual
|
||||||
|
|
||||||
|
```
|
||||||
react-native link react-native-image-crop-picker
|
react-native link react-native-image-crop-picker
|
||||||
```
|
```
|
||||||
|
|
||||||
|
###### Cocoapods
|
||||||
|
|
||||||
|
Add this line to your Podfile and run `pod install`
|
||||||
|
```
|
||||||
|
pod 'react-native-image-crop-picker', :path => '../node_modules/react-native-image-crop-picker'
|
||||||
|
```
|
||||||
|
|
||||||
#### Post-install steps
|
#### Post-install steps
|
||||||
|
|
||||||
##### iOS
|
##### iOS
|
||||||
|
|
||||||
In Xcode open Info.plist and add string key `NSPhotoLibraryUsageDescription` with value that describes why do you need access to user photos. More info here https://forums.developer.apple.com/thread/62229. Depending on what features you use, you also may need `NSCameraUsageDescription` and `NSMicrophoneUsageDescription` keys.
|
In Xcode open Info.plist and add string key `NSPhotoLibraryUsageDescription` with value that describes why do you need access to user photos. More info here https://forums.developer.apple.com/thread/62229. Depending on what features you use, you also may need `NSCameraUsageDescription` and `NSMicrophoneUsageDescription` keys.
|
||||||
|
|
||||||
###### cocoapods users
|
###### Cocoapods
|
||||||
|
|
||||||
- Add `platform :ios, '8.0'` to Podfile (!important)
|
You are done.
|
||||||
- Add `pod 'RSKImageCropper'` and `pod 'QBImagePickerController'` to Podfile
|
|
||||||
|
|
||||||
###### non-cocoapods users
|
###### Manual
|
||||||
|
|
||||||
- Drag and drop the ios/ImageCropPickerSDK folder to your xcode project. (Make sure Copy items if needed IS ticked)
|
- Drag and drop the ios/ImageCropPickerSDK folder to your xcode project. (Make sure Copy items if needed IS ticked)
|
||||||
- Click on project General tab
|
- Click on project General tab
|
||||||
|
@ -21,9 +21,12 @@
|
|||||||
#if __has_include("QBImagePicker.h")
|
#if __has_include("QBImagePicker.h")
|
||||||
#import "QBImagePicker.h"
|
#import "QBImagePicker.h"
|
||||||
#import "RSKImageCropper.h"
|
#import "RSKImageCropper.h"
|
||||||
#else
|
#elseif __has_include("QBImagePicker/QBImagePicker.h")
|
||||||
#import "QBImagePicker/QBImagePicker.h"
|
#import "QBImagePicker/QBImagePicker.h"
|
||||||
#import <RSKImageCropper/RSKImageCropper.h>
|
#import <RSKImageCropper/RSKImageCropper.h>
|
||||||
|
#else
|
||||||
|
#import "QBImagePickerController/QBImagePickerController.h"
|
||||||
|
#import <RSKImageCropper/RSKImageCropper.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#import "UIImage-Resize/UIImage+Resize.h"
|
#import "UIImage-Resize/UIImage+Resize.h"
|
||||||
|
18
react-native-image-crop-picker.podspec
Normal file
18
react-native-image-crop-picker.podspec
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
require "json"
|
||||||
|
package = JSON.parse(File.read('package.json'))
|
||||||
|
|
||||||
|
Pod::Spec.new do |s|
|
||||||
|
s.name = package['name']
|
||||||
|
s.version = package['version']
|
||||||
|
s.summary = package['description']
|
||||||
|
s.author = "Ivan Pusic"
|
||||||
|
s.license = package['license']
|
||||||
|
s.requires_arc = true
|
||||||
|
s.homepage = "https://github.com/ivpusic/react-native-image-crop-picker"
|
||||||
|
s.source = { :git => 'https://github.com/ivpusic/react-native-image-crop-picker.git' }
|
||||||
|
s.platform = :ios, '8.0'
|
||||||
|
s.source_files = "ios/*.{h,m}", "ios/UIImage-Resize/*.{h,m}"
|
||||||
|
|
||||||
|
s.dependency "QBImagePickerController"
|
||||||
|
s.dependency "RSKImageCropper"
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user