YPImagePicker
YPImagePicker copied to clipboard
Cannot infer contextual base in reference to member 'ypSystemBackground'
Describe the bug A clear and concise description of what the bug is. I just imported the YPImagePicker with Pods, and i receiving the compiling error: Cannot infer contextual base in reference to member 'ypSystemBackground'. This happens inside the lib To Reproduce Steps to reproduce the behavior: 1 - added YPImagePicker to pods 2 - pod deintegrate 3 - pod install 4 - add framework YPImagePicker on target 4 - Try to build 5 - Error in build Note: i tried via package dependencies and the same error happen
Expected behavior No error should happen
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information): 1 - Xcode 12.4 2 - IOS 14.4
-
Device: Iphone 12[Simulator]
-
OS: 11.6
-
Xcode Version: 12.4
-
Swift Version: 5
-
Cocoapods
-
Package Dependencies
https://github.com/apple/swift-evolution/blob/main/proposals/0287-implicit-member-chains.md This might help
Hello, I was wondering if you could solve the issue?
As described in the linked page, this syntax requires Swift 5.4 or later, available in XCode 12.5 or later.
If you cannot upgrade XCode, you can alternatively change the line to:
public var cropOverlayColor: UIColor = UIColor.ypSystemBackground.withAlphaComponent(0.4)
As described in the linked page, this syntax requires Swift 5.4 or later, available in XCode 12.5 or later.
If you cannot upgrade XCode, you can alternatively change the line to:
public var cropOverlayColor: UIColor = UIColor.ypSystemBackground.withAlphaComponent(0.4)
For others to see: I can confirm that this was the issue; was running an outdated version of Xcode (12.4). Instead waiting to install a new version of XCode, I just "unlocked" the class and updated the lib to your suggestion. Built and ran perfectly.