Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vincislok opened this issue Sep 16, 2022 · 16 comments

Comments

@vincislok
Copy link

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

@dev-thinks
Copy link

how to overcome this issue in xcode 14 ios 16.

@KingUttu
Copy link

KingUttu commented Sep 19, 2022

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

change it to this

@ArunJRK
Copy link

ArunJRK commented Sep 19, 2022

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.

@mugikhan
Copy link

+1 facing the same issue

@fidelisakilan
Copy link

+1 stuck with this issue

@kwangmeng
Copy link

+1 having same issue

@ykiran
Copy link

ykiran commented Sep 25, 2022

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

@dev-thinks
Copy link

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

@kwangmeng
Copy link

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

@ykiran
Copy link

ykiran commented Sep 26, 2022

@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

@dev-thinks
Copy link

Thank you @ykiran. and also @kwangmeng

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

@Thaanu2001
Copy link

Thank you @ykiran

It worked of me.

@shahmirzali49
Copy link

@ykiran it's not working for me.

@ykiran
Copy link

ykiran commented Oct 4, 2022

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

@shahmirzali49
Copy link

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

@SACHILOKUGE
Copy link

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

change it to this
its work m1 chip

Thank you KingUttu

d1y added a commit to waifu-project/movie that referenced this issue Jun 24, 2024
d1y added a commit to waifu-project/movie that referenced this issue Jun 24, 2024
之前是 12.0

参考:  zhangao0086/DKImagePickerController#705 (comment)

```sh
cd ios
pod updaet
```
d1y added a commit to waifu-project/movie that referenced this issue Jun 24, 2024
之前是编译在 12.0>=

参考:
zhangao0086/DKImagePickerController#705 (comment)

cd ios
pod update
d1y added a commit to waifu-project/movie that referenced this issue Jun 24, 2024
之前是编译在 12.0>=

参考:
zhangao0086/DKImagePickerController#705 (comment)

cd ios
pod update
d1y added a commit to waifu-project/movie that referenced this issue Jun 24, 2024
之前是编译在 12.0>=

参考:
zhangao0086/DKImagePickerController#705 (comment)

cd ios
pod update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests