Warning: Undefined array key "pathway" in /home/clients/160b20c93964292618c158d21ce27bf5/sites/tech.org-services.ch/wp-content/themes/Newspaper/functions.php on line 543
Monday, December 5, 2022
HomeiOS DevelopmentEnabling Concurrency warnings in Xcode 14 – Donny Wals

Enabling Concurrency warnings in Xcode 14 – Donny Wals


If you wish to guarantee that your code adopts Swift concurrency as accurately as potential in Swift 5.7, it is a good suggestion so as to add the -warn-concurrency compiler flag to your venture’s construct settings.

To do that, choose your venture’s goal and navigate to the Construct Settings tab. Be sure to choose All from the checklist of settings that’s proven (Primary is the default) and sort Different Swift within the searchbar to seek out the Different Swift Flags construct settings. Double click on on the empty area beneath your app identify and hit the + button within the popup that is offered. Sort -warn-concurrency, and hit enter.

The screenshot beneath reveals all of the related elements so that you can see:

blank

You have now succesfully enabled a stricter set of compiler checks to your concurrency code that may, for instance, produce warnings to your code that touches Sendable in a extra correct method. This lets you regulate your code now, quite than when a few of these warnings develop into errors in Swift 6.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments