Hello guys this is my first time trying to publish an App on iOS. I am using Xcode version 13.0 beta
I am getting this Semantic Issue error while archiving and building the App on Xcode
.
if (@available(iOS 15.0, tvOS 15.0, *)) _displayLink.preferredFrameRateRange = CAFrameRateRangeMake(targetFPS, targetFPS, targetFPS);You can check the image.
Its been days I am trying to solve this error. Please help.
1 Answer1
To properly set thevar preferredFrameRateRange: CAFrameRateRange property you can simply use this initializerinit(minimum: Float, maximum: Float, preferred: Float?). Here is a usage example:
_displayLink.preferredFrameRateRange = CAFrameRateRange(minimum: minFPS, maximum: maxFPS, preferred: targetFPS)As the official documentation states
If the range contains the same minimum and maximum frame rate,this property is identical as preferredFramesPerSecond. Otherwise, the actualcallback rate will be dynamically adjusted to better align with otheranimation sources.
So in your case you can simply do this:
_displayLink.preferredFrameRateRange = CAFrameRateRange(minimum: targetFPS, maximum: targetFPS)Comments
Explore related questions
See similar questions with these tags.
