Raildex
Raildex

Reputation: 4737

CAMetalLayer is only available on iOS 13.0

I am using CAMetalLayer to draw onto a UIView. The compiler throws a warning that CAMetalLayer is only available on iOS 13.0.
The docs however say iOS 8.0+.
Can I ignore this warning? I only have iOS 13.0 devices here and we'd like to support 12 and 11, too.

enter image description here

Upvotes: 5

Views: 1896

Answers (2)

warrenm
warrenm

Reputation: 31782

This normally happens when compiling with a pre-iOS 13 deployment target for the Simulator. You'll notice if you click through the warning that you see headers from the Simulator SDK:

The CAMetalLayer header for the Simulator shows that the class is explicitly marked as available from iOS 13, when Metal became supported in the Simulator.

You shouldn't receive this diagnostic when compiling for a device.

Upvotes: 4

Hamid Yusifli
Hamid Yusifli

Reputation: 10137

CAMetalLayer is actually available on iOS 8.0+, I can confirm this. This warning is a known Apple mistake, you can ignore it.

Upvotes: 6

Related Questions