DKImagePickerController
DKImagePickerController copied to clipboard
XCode 14 Build error: Stored properties cannot be marked potentially unavailable with '@available'
@available(iOS 13.0, *) @objc lazy public var shouldDismissViaUserAction = false Error : Stored properties cannot be marked potentially unavailable with '@available'
how to overcome this issue in xcode 14 ios 16.
@available(iOS 13.0, *) @objc public var shouldDismissViaUserAction: Bool { return false }
change it to this
Update: This too is not working
Note
The bug was fixed in version 4.3.4 and this solution forces installation of that version.
Solution
If you have podfile you could add this to top of the file
# Fixing DKImagePickerController Bug
use_modular_headers!
pod 'DKImagePickerController', '4.3.4'
Then do pod install and compile.
+1 facing the same issue
+1 stuck with this issue
+1 having same issue
@ArunJRK thanks a lot. This worked! Been tearing my hair out for several hours. Thanks again. 👍
@ykiran @ArunJRK can you guys please let me know how to overcome the issue with this workaround in flutter ios pod file. I tried but nothing different from previous error message.
For those having issues, please try to go to your Podfile, and change from 'https://github.com/miguelpruivo/DKImagePickerController.git' to 'https://github.com/zhangao0086/DKImagePickerController.git'. Then cd into your ios directory and run pod update. Should have successful build after you done this. Works for me.
@ykiran @ArunJRK can you guys please let me know how to overcome the issue with this workaround in flutter ios pod file. I tried but nothing different from previous error message.
This is how my Podfile looks like after making the change:
I first tried with the changes in the post_install section but that did not do anything. Only after I added the pod 'DKImagePickerController', '4.3.4' line in the target 'Runner' section was I able to build and run my app.
Hope this helps @dev-thinks
Thank you @ykiran. and also @kwangmeng
I tried both options and it worked for me with mac M1 chip.
Thank you @ykiran
It worked of me.
@ykiran it's not working for me.
@ykiran it's not working for me.
@Shahmirzali-Huseynov Can you post in detail what changes you've made and whether you have followed the instructions that @ArunJRK mentioned?
I've also posted a screenshot of my Podfile after the changes; does your Podfile also looks the same?
@ykiran I fixed my problem. my problem was in the flutter_inappview package.
@available(iOS 13.0, *) @objc public var shouldDismissViaUserAction: Bool { return false }
change it to this its work m1 chip
Thank you KingUttu