user-agent-ios
user-agent-ios copied to clipboard
Fix Deprecation Build Warnings ⚠️
The class GCDReadWriteLock
in ReadWriteLock.swift
throws deprecation warnings, specifically:
'OSAtomicCompareAndSwap32Barrier' was deprecated in iOS 10.0: Use atomic_compare_exchange_strong() from <stdatomic.h> instead
I tried unsuccessfully for a while to fix this. I can fix the "Use os_unfair_lock_lock
instead" warning, since os_unfair_lock_lock
is actually available, but I can't seem to import and reference atomic_compare_exchange_strong
from the standard library or stdatomic.h
.
This seems to be a known issue: https://openradar.appspot.com/27161329
My recommendation is to leave this ticket open, wait a bit, and see if this works once we increase the build target.