Carpaccio icon indicating copy to clipboard operation
Carpaccio copied to clipboard

Xcode 13 Beta

Open thejimmyg opened this issue 3 years ago • 4 comments

Hello, and I'd like to echo others in saying thank you for this project. It has been really helpful.

I found when using it in Xcode 13 Beta (on macOS 12.0 beta) I needed to make this change to Sources/Carpaccio/CIImage+Extensions.swift:

https://github.com/thejimmyg/Carpaccio/commit/2d0078ca4e9ae7af799ae47d1900ea49bfee1f2c

+       // This is deprecated in XCode 13 Beta and causes the code not to build. What should be used instead?
+       // https://developer.apple.com/documentation/coreimage/cirawfilteroption/3334940-ciinputenableedrmodekey
        
        // Preserve pixel values beyond 0.0 … 1.0, which wide colour images will have
-       rawFilter.setValue(true, forKey: kCIInputEnableEDRModeKey)
+       // rawFilter.setValue(true, forKey: kCIInputEnableEDRModeKey)

Without it I get this error and the project won't build:

Cannot convert value of type 'CIRAWFilterOption' to expected argument type 'String'

I'm not sure what the correct thing to do is rather than just commenting that line out but with this change the code builds and seems to work OK to my eyes but I thought I'd ask if you knew a better solution?

See https://developer.apple.com/documentation/coreimage/cirawfilteroption/3334940-ciinputenableedrmodekey

Thanks!

thejimmyg avatar Jul 01 '21 07:07 thejimmyg

I've tested the latest master on Xcode 13 on macOS 11.6 and this is still an issue when building for iOS. Given that Xcode 13 is no longer in Beta, it might be worth taking a look?

Following a couple of Xcode 13 Fix prompts gives this line which compiles fine.

rawFilter.setValue(true, forKey: CIRAWFilterOption.ciInputEnableEDRModeKey.rawValue)

thejimmyg avatar Sep 22 '21 09:09 thejimmyg

If you have a chance, could you post a PR (which still retains Xcode 12 build capability), please? We will eventually look into this but probably not in the next few weeks.

mz2 avatar Sep 22 '21 09:09 mz2

Actually, I rebased on top of latest upstream main and I'm now getting a crash. I think I need to investigate that further before recommending a change.

thejimmyg avatar Sep 22 '21 10:09 thejimmyg

The crash was unrelated so I've opened PR #14. I'm not able to test on Xcode 12 though, so don't worry if it takes a few weeks for someone else to do so.

thejimmyg avatar Sep 22 '21 10:09 thejimmyg