zhangao0086 / DKImagePickerController

Image Picker Controller for iOS written in Swift 4 & 5.
MIT License
1.49k stars 471 forks source link

Xcode 14: Swift Compiler Error: Stored properties cannot be marked potentially unavailable with '@available' #699

Closed stx closed 2 years ago

stx commented 2 years ago
Could not build the precompiled application for the device.
Swift Compiler Error (Xcode): Stored properties cannot be marked potentially unavailable with '@available'

Pods/DKImagePickerController/Sources/DKImagePickerController/DKImagePickerController.swift:67:5
imprecis commented 2 years ago

I have the same issue. Commenting the line '@available(iOS 13.0, *)' solves the issue that I can't run the app, but I can't pick images (I'm using Image Picker for Flutter).

EDIT: It was a file picker for flutter, not image picker, and not being able to pick images seems unrelated.

zhangao0086 commented 2 years ago

Fixed by https://github.com/zhangao0086/DKImagePickerController/pull/700 @pirder

pirder commented 2 years ago

@imprecis You can add this Ruby code to your Podfile to filter dependencies you don't need, provided you use the latest tag (in flutter_file_picke)

code:

def removeFlutterFilePickerUnwantedPod
  if !Pod.const_defined?(:PICKER_MEDIA) || PICKER_MEDIA
    Pod.const_set(:PICKER_MEDIA, false)
  end
  if !Pod.const_defined?(:PICKER_AUDIO) || PICKER_AUDIO
    Pod.const_set(:PICKER_AUDIO, false)
  end
end
removeFlutterFilePickerUnwantedPod()

Basis: update commit

image
armandojimenez commented 2 years ago

After updating, now It ask me to select a development team, and does not let me compile with Bitcode enabled. Is there any updates with this? I opened issues, I can test my app with ios 16 without a fix for this