Skip to content

Commit

Permalink
using local QBImagePicker as podspec
Browse files Browse the repository at this point in the history
  • Loading branch information
ivpusic committed Jan 28, 2020
1 parent 0fba817 commit 9278de8
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 22 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,6 @@ pod install

After this use `ios/<project_name>.xcworkspace`. **Do not use** `ios/<project_name>.xcodeproj`.

##### Using local QBImagePicker

Add following to your Podfile:

```
pod 'QBImagePickerController', :path => '../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec'
```

#### - If you are not using Cocoapods which is not recommended:

```bash
Expand Down
10 changes: 9 additions & 1 deletion RNImageCropPicker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ Pod::Spec.new do |s|
s.source_files = 'ios/src/*.{h,m}'
s.platform = :ios, "8.0"
s.dependency 'RSKImageCropper'
s.dependency 'QBImagePickerController'
s.dependency 'React-Core'
s.dependency 'React-RCTImage'

s.subspec 'QBImagePickerController' do |qb|
qb.name = "QBImagePickerController"
qb.source_files = "ios/QBImagePicker/QBImagePicker/*.{h,m}"
qb.exclude_files = "ios/QBImagePicker/QBImagePicker/QBImagePicker.h"
qb.resource_bundles = { "QBImagePicker" => "ios/QBImagePicker/QBImagePicker/*.{lproj,storyboard}" }
qb.requires_arc = true
qb.frameworks = "Photos"
end
end
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ target 'example' do
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

pod 'QBImagePickerController', :path => '../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec'
pod 'RNImageCropPicker', :path => '../../'

use_native_modules!
end
19 changes: 9 additions & 10 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ PODS:
- DoubleConversion
- glog
- glog (0.3.5)
- QBImagePickerController (3.4.0)
- RCTRequired (0.61.2)
- RCTTypeSafety (0.61.2):
- FBLazyVector (= 0.61.2)
Expand Down Expand Up @@ -224,7 +223,11 @@ PODS:
- React-jsi (= 0.61.2)
- ReactCommon/jscallinvoker (= 0.61.2)
- RNImageCropPicker (0.27.0):
- QBImagePickerController
- React-Core
- React-RCTImage
- RNImageCropPicker/QBImagePickerController (= 0.27.0)
- RSKImageCropper
- RNImageCropPicker/QBImagePickerController (0.27.0):
- React-Core
- React-RCTImage
- RSKImageCropper
Expand All @@ -237,7 +240,6 @@ DEPENDENCIES:
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- QBImagePickerController (from `../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
- React (from `../node_modules/react-native/`)
Expand All @@ -261,7 +263,7 @@ DEPENDENCIES:
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
- ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`)
- RNImageCropPicker (from `../../`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
Expand All @@ -280,8 +282,6 @@ EXTERNAL SOURCES:
:podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
glog:
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
QBImagePickerController:
:path: "../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec"
RCTRequired:
:path: "../node_modules/react-native/Libraries/RCTRequired"
RCTTypeSafety:
Expand Down Expand Up @@ -323,7 +323,7 @@ EXTERNAL SOURCES:
ReactCommon:
:path: "../node_modules/react-native/ReactCommon"
RNImageCropPicker:
:path: "../node_modules/react-native-image-crop-picker"
:path: "../../"
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"

Expand All @@ -334,7 +334,6 @@ SPEC CHECKSUMS:
FBReactNativeSpec: 5a764c60abdc3336a213e5310c40b74741f32839
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
QBImagePickerController: d54cf93db6decf26baf6ed3472f336ef35cae022
RCTRequired: c639d59ed389cfb1f1203f65c2ea946d8ec586e2
RCTTypeSafety: dc23fb655d6c77667c78e327bf661bc11e3b8aec
React: 7e586e5d7bec12b91c1a096826b0fc9ab1da7865
Expand All @@ -355,10 +354,10 @@ SPEC CHECKSUMS:
React-RCTText: e3ef6191cdb627855ff7fe8fa0c1e14094967fb8
React-RCTVibration: fb54c732fd20405a76598e431aa2f8c2bf527de9
ReactCommon: 5848032ed2f274fcb40f6b9ec24067787c42d479
RNImageCropPicker: fcdbbbef2f0ea869c6d9ce39b8e4fd67e94009f4
RNImageCropPicker: 9d74cf3dadd8774c05a5f772b9a3397027576fa8
RSKImageCropper: a446db0e8444a036b34f3c43db01b2373baa4b2a
Yoga: 14927e37bd25376d216b150ab2a561773d57911f

PODFILE CHECKSUM: 39fe1408e793fbdebf591bcd10d0013cb2170da9
PODFILE CHECKSUM: c105f81c59b354c8c6043ddcc6156cc74cc4a621

COCOAPODS: 1.8.3
2 changes: 1 addition & 1 deletion example/ios/example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_ROOT}/RSKImageCropper/RSKImageCropper/RSKImageCropperStrings.bundle",
);
name = "[CP] Copy Pods Resources";
Expand Down
4 changes: 4 additions & 0 deletions ios/src/ImageCropPicker.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
#elif __has_include(<QBImagePickerController/QBImagePickerController.h>)
#import <QBImagePickerController/QBImagePickerController.h>
#import <RSKImageCropper/RSKImageCropper.h>
#elif __has_include("QBImagePickerController.h") // local QBImagePickerController subspec
#import "QBImagePickerController.h"
#import <RSKImageCropper/RSKImageCropper.h>
#else
#import
#import "QBImagePicker/QBImagePicker.h"
#import <RSKImageCropper/RSKImageCropper.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-image-crop-picker",
"version": "0.27.0",
"version": "0.28.0",
"description": "Select single or multiple images, with cropping option",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 9278de8

Please sign in to comment.