-2

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
enter image description here.

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.

Harrison's user avatar
Harrison
2,49512 gold badges24 silver badges48 bronze badges
askedFeb 21, 2024 at 16:48
Suleman Mohyudin's user avatar
0

1 Answer1

0

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)
answeredFeb 22, 2024 at 14:56
narek.sv's user avatar
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.