React-native-image-crop-picker: QBImagePicker/QBAssetsViewController.m:198:31: error: no known class method for selector 'labelColor'

Created on 25 Oct 2019  路  12Comments  路  Source: ivpusic/react-native-image-crop-picker

Also opened in QBImagePicker: https://github.com/questbeat/QBImagePicker/issues/225
Help is very much appreciated!

Version

Tell us which versions you are using:

Platform

Tell us to which platform this issue is related

  • iOS 12.2

Expected behaviour

Should compile successfully.

Actual behaviour

Build target:
QBImagePickerController

Error:
QBImagePicker/QBAssetsViewController.m:198:31: error: no known class method for selector 'labelColor'

Podfile:

`
platform :ios, '9.0'
use_frameworks!

target 'myProject' do
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
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 'RNCharts', :path => '../node_modules/react-native-charts-wrapper'

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

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

pod 'Firebase/Core', '~> 6.3.0'

pre_install do |installer|
    installer.analysis_result.specifications.each do |s|
        s.swift_version = '5.0' unless s.swift_version
    end
end

end
`

// stacktrace or any other useful debug info

Love react-native-image-crop-picker? Please consider supporting our collective:
馃憠 https://opencollective.com/react-native-image-crop-picker/donate

Most helpful comment

In order to compile QBAssetsViewController.m with Xcode 10, you can patch the code like that:

    #ifdef __IPHONE_13_0
    if (@available(iOS 13.0, *)) {
        labelColor = [UIColor labelColor];
    }
    #endif

All 12 comments

Related to #1154

@ivpusic any suggestions on this? it seems like QBImagePicker is no longer maintained. Could there be a solution on your side or can you propose an approach, please?

yes, we can fix things in local qbimagepicker pod.

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

Downgrading to 0.24.1 worked for me. Version 0.25.1 crashed the application, same as the latest version

I facing the same issue, and cannot "hack" through it.
react-native: 0.65.1
r-n-image-crop-picker: 0.27.0

yes, we can fix things in local qbimagepicker pod.

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

This is part of the official docs and does not resolve this particular issue.

Downgrading to 0.24.1 worked for me. Version 0.25.1 crashed the application, same as the latest version

Downgrading does not work as then there are conflicts with React/Core and React-Core. If I edit s.dependency in the Podspec for this library to reference React-Core instead of React/Core, it still does not work.

Hello.
I'm facing the same issue.
Adding the line to pods didn't solve the problem.

(RN 62.0, this library 0.27)

For now I have commented out the "if (iOS 13) {...}" code block in QBAssetsViewController.m, and thankfully the code compiles. However, I am sure there is an easy enough fix for this in Obj-C/Swift to avoid commenting out the scenario for iOS 13; I'm not very good at native iOS though.

Downgrading solved this for me.
npm i react-native-image-crop-picker@^0.26.1

Downgrading react-native-image-crop-picker version > '^0.26.2' after yarn install

Downgrading react-native-image-crop-picker version > '^0.26.2' after yarn install

Worked for me!

In order to compile QBAssetsViewController.m with Xcode 10, you can patch the code like that:

    #ifdef __IPHONE_13_0
    if (@available(iOS 13.0, *)) {
        labelColor = [UIColor labelColor];
    }
    #endif

In order to compile QBAssetsViewController.m with Xcode 10, you can patch the code like that:

    #ifdef __IPHONE_13_0
    if (@available(iOS 13.0, *)) {
        labelColor = [UIColor labelColor];
    }
    #endif

Thanks You save my day !! working fine after adding this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leelandclay picture leelandclay  路  3Comments

habovh picture habovh  路  3Comments

pavsidhu picture pavsidhu  路  3Comments

phantom1299 picture phantom1299  路  3Comments

Phenek picture Phenek  路  3Comments