DKImagePickerController icon indicating copy to clipboard operation
DKImagePickerController copied to clipboard

XCode 14 Build error: Stored properties cannot be marked potentially unavailable with '@available'

Open vincislok opened this issue 2 years ago • 16 comments

@available(iOS 13.0, *) @objc lazy public var shouldDismissViaUserAction = false Error : Stored properties cannot be marked potentially unavailable with '@available'

vincislok avatar Sep 16 '22 09:09 vincislok

how to overcome this issue in xcode 14 ios 16.

dev-thinks avatar Sep 18 '22 20:09 dev-thinks

@available(iOS 13.0, *) @objc public var shouldDismissViaUserAction: Bool { return false }

change it to this

KingUttu avatar Sep 19 '22 08:09 KingUttu

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.

ArunJRK avatar Sep 19 '22 08:09 ArunJRK

+1 facing the same issue

mugikhan avatar Sep 20 '22 20:09 mugikhan

+1 stuck with this issue

fidelisakilan avatar Sep 22 '22 10:09 fidelisakilan

+1 having same issue

kwangmeng avatar Sep 23 '22 08:09 kwangmeng

@ArunJRK thanks a lot. This worked! Been tearing my hair out for several hours. Thanks again. 👍

ykiran avatar Sep 25 '22 15:09 ykiran

@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.

dev-thinks avatar Sep 25 '22 17:09 dev-thinks

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. Screenshot 2022-09-26 at 12 56 55 PM

kwangmeng avatar Sep 26 '22 04:09 kwangmeng

@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: image

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

ykiran avatar Sep 26 '22 05:09 ykiran

Thank you @ykiran. and also @kwangmeng

I tried both options and it worked for me with mac M1 chip.

dev-thinks avatar Sep 27 '22 03:09 dev-thinks

Thank you @ykiran

It worked of me.

Thaanu2001 avatar Oct 01 '22 07:10 Thaanu2001

@ykiran it's not working for me.

shahmirzali49 avatar Oct 01 '22 10:10 shahmirzali49

@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 avatar Oct 04 '22 08:10 ykiran

@ykiran I fixed my problem. my problem was in the flutter_inappview package.

shahmirzali49 avatar Oct 05 '22 06:10 shahmirzali49

@available(iOS 13.0, *) @objc public var shouldDismissViaUserAction: Bool { return false }

change it to this its work m1 chip

Thank you KingUttu

SACHILOKUGE avatar Apr 17 '23 09:04 SACHILOKUGE