Skip to content

Conversation

@KazaiMazai
Copy link
Owner

@KazaiMazai KazaiMazai commented Dec 18, 2025

PR fix compatibility with older iOS versions


Note

Replace OSAllocatedUnfairLock with NSLock in Index.ComparableValue to maintain compatibility with older iOS versions.

  • Model/Index:
    • Replace OSAllocatedUnfairLock with NSLock in Index.ComparableValue for wider iOS compatibility.

Written by Cursor Bugbot for commit 7636e24. This will update automatically on new commits. Configure here.

@KazaiMazai KazaiMazai self-assigned this Dec 18, 2025
@KazaiMazai KazaiMazai merged commit 60228f9 into main Dec 18, 2025
2 checks passed
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on January 18

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.


let name: String
private let lock = OSAllocatedUnfairLock()
private let lock = NSLock()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: NSLock.withLock unavailable on older iOS versions

The compatibility fix replaces OSAllocatedUnfairLock with NSLock, but the code still uses lock.withLock { } throughout the file. The withLock method on NSLocking was introduced in iOS 16/macOS 13 - the same versions that OSAllocatedUnfairLock requires. Since the Package.swift targets iOS 12, this change doesn't actually achieve the intended backward compatibility. To support older iOS versions, the code would need to use lock() / unlock() manually instead of withLock.

Fix in Cursor Fix in Web

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NSLock.withLock { ... } is available since iOS 8.0. AI is cooked ahahaha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants